This chapter introduces the POLYCENTER Advanced File System (AdvFS), which is a file system option on the Digital UNIX operating system. AdvFS provides rapid crash recovery, high performance, and a flexible structure that enables you to manage your file system while it is on line.
An optional set of utilities is available for AdvFS that expands the capabilities of the file system. The POLYCENTER Advanced File System Utilities (AdvFS Utilities) provide functions such as adding volumes without reconfiguring the directory hierarchy of the file system, cloning filesets to enable online backups, and improving system performance with file defragmentation, domain balancing, and file striping. The AdvFS Utilities also include a graphical user interface (GUI) that simplifies file system management.
The AdvFS component is licensed with the Digital UNIX operating system and is available as an optional subset during an advanced installation. You can choose AdvFS as the file system type for the root, /usr, or /var file systems. See the Installation Guide for more information about performing advanced installations. The AdvFS Utilities are available as a separately licensed layered product.
Before setting up AdvFS, you need to understand how it differs from traditional UNIX file systems. These differences, although minor with regard to your transition from a UNIX File System (UFS), play a role in how you plan and maintain AdvFS. For information on UFS, see Chapter 6.
The remaining sections in this chapter describe the unique characteristics of the file system design, instructions on setting up a new file system, and a clarification of what you can accomplish without the optional file system utilities.
Table 7-1 lists and describes the commands unique to the base portion of AdvFS.
Command | Description |
advfsstat | Displays AdvFS performance statistics |
advscan | Locates AdvFS partitions on disks |
chfile | Changes the attributes of a file |
chfsets | Changes the attributes of a fileset |
chvol | Changes the attributes of a volume |
mkfdmn | Creates a file domain |
mkfset | Creates a fileset within a file domain |
renamefset | Renames an existing fileset |
rmfdmn | Removes a file domain |
rmfset | Removes a fileset from a file domain |
shblk | Shows AdvFS blocks |
shfragbf | Shows AdvFS frag file |
showfdmn | Displays the attributes of a file domain |
showfile | Displays the attributes of a file |
showfsets | Displays the attributes of filesets in a file domain |
vbmtchain | Displays bitmap metadata table (BMT) information |
vbmtpg | Displays a formatted page of the bitfile metadata table (BMT) |
vdump | Performs incremental backups |
vfile | Displays a file |
vfragpg | Displays a page of the frag file |
vlogpg | Displays a page of the log file |
vlsnpg | Displays the logical sequence number (LSN) of a log page |
vrestore | Restores files from devices written with the vdump command |
vtagpg | Displays a formatted page of the tag directory |
vverify | Checks the AdvFS on-disk metadata structures |
AdvFS uses the the standard UFS quota commands to establish and manage AdvFS user and group quotas. Table 7-2 lists and describes the user and group quota commands to use with AdvFS.
Command | Description |
edquota | Edits user and group quotas |
ncheck | Prints the tag and full pathname for each file in the file system |
quot | Summarizes fileset ownership |
quota | Displays disk usage and limits by user or group |
quotacheck | Checks filesystem quota consistency |
quotaon | Turns quotas on |
quotaoff | Turns quotas off |
repquota | Summarizes quotas for a file system |
Table 7-3 lists and describes the optional Advanced File System Utilities that are available as a separately licensed layered product.
Utility | Description |
addvol | Adds volumes to an existing file domain |
balance | Balances the percentage of used space between two volumes |
clonefset | Creates a read-only fileset, which you use to perform online backups |
defragment | Makes the files in a domain more contiguous |
dtadvfs | Starts the AdvFS graphical user interface |
migrate | Moves the location of a file within a file domain |
mktrashcan | Attaches directories to a trashcan directory, which stores deleted files |
rmtrashcan | Detaches a specified directory from a trashcan directory |
rmvol | Removes a volume from an existing file domain |
shtrashcan | Shows the trashcan directory, if any, that is attached to a specified directory |
stripe | Stripes a file across several volumes in a file domain |
The AdvFS and AdvFS Utilities provide an innovative design that is not based on any existing file system, such as the BSD or the System V file systems. AdvFS enables you to:
The new design overcomes many unexpected events, such as a sudden system interruption or running out of disk space.
System administrators can manage disk capacity independently of the logical file system directory structure and transparently to the user. As a result, configuration planning is less complicated and more flexible. A system administrator can add or remove disks while the file system is active.
End users can retrieve their own unintentionally deleted files from predefined trashcan directories.
Logical structures, quota controls, and backup capabilities are familiar, which promotes a smooth transition to the new file system.
From a user's perspective, AdvFS behaves like any UNIX file system. End users can use the mkdir command to create new directories, the cd command to change directories, and the ls command to list directory contents. Application programmers encounter a programming interface based on UNIX: open(), close(), creat(), and so on. AdvFS is POSIX 1003.1 compliant.
AdvFS replaces or eliminates several standard commands, such as newfs, dump, restore, and fsck.
Rebooting after a system interruption is fast. AdvFS uses write-ahead logging, instead of the fsck utility, as a way to check for and repair file system inconsistencies that can occur during an unexpected system crash or power failure. The number of uncommitted records in the log, not the amount of data in the file system, dictates the speed of a recovery. As a result, reboots are quick and predictable, measured in seconds instead of minutes. User file data can be logged as well, providing better control over data recovery.
To maintain data availability, system administrators can perform backups, file system reconfiguration, and file system tuning without taking the system off line.
An extent-based file allocation scheme allows for fewer and larger I/O transfers, which increases sequential read/write throughput and simplifies large data transfers. The file system performs large reads from disk when sequential access is anticipated. It also performs large writes by combining adjacent data into a single disk transfer.
The AdvFS Utilities enable multivolume file systems. Multiple volumes allow file-level striping and file migration. File-level striping improves file transfer rates by spreading I/O among several disks. File migration allows for load and capacity balancing and reduces file fragmentation.
Table 7-4
lists AdvFS features and their benefits, which are unavailable to traditional
file systems such as the BSD or the System V file systems. Note that some
of the
features listed require the optional POLYCENTER AdvFS Utilities license.
docroff: ignoring superfluous symbol feature
Feature | Benefit |
Rapid crash recovery | Write-ahead logging eliminates the requirement to use the fsck utility when recovering from an unexpected system failure and makes file system recovery time rapid and independent of file system size. |
Unified buffer cache | This cache interacts with the virtual memory system to dynamically adjust the amount of physical memory being used to cache file data. |
Extended capacity | The design supports large-scale storage systems by extending the size of both files and file systems. It is designed to handle files and filesets as large as nearly 16 terabytes. |
Disk spanning | A file or file system can span multiple disks within a pool of disk volumes, which you can adjust to match your storage needs. (This feature requires the optional AdvFS Utilities.) |
Graphical User Interface | Simplifies system management by organizing AdvFS functions into menu-selected tasks and graphically depicting file-system status. (This feature requires the optional AdvFS Utilities.) |
Online resizing | You can dynamically change the size of the file system by adding or removing disk volumes while the system remains in use. This enables both online storage configuration and online file system maintenance. (This feature requires the optional AdvFS Utilities.) |
File-level striping | This feature improves file transfer rates by distributing file data across multiple disk volumes. (This feature requires the optional AdvFS Utilities.) |
On-line performance tuning | System performance can be tuned using an array of utilities and can be performed without interrupting system users. |
Online backup | You can back up the contents of your file system to media without interrupting the workflow of system users. |
File undelete | System users can recover unintentionally deleted files, thus improving data availability. (This feature requires the optional AdvFS Utilities.) |
Unlike UFS, AdvFS consists of two distinct layers; each layer contains different file system mechanisms. The directory hierarchy layer implements the file-naming scheme and Digital UNIX file system-compliant functions such as creating and opening files or reading and writing to files. The physical storage layer implements write-ahead logging, caching, file allocation, and physical disk I/O functions.
The decoupled file system structure enables you to manage the physical storage layer apart from the directory hierarchy layer. This means that you can move files between a defined group of disks, without changing file pathnames. Since the pathnames remain the same, the action is completely transparent to end users.
The two-layer structure is the cornerstone of AdvFS. Supporting the design are two file system concepts: the file domain and the fileset.
The following sections describe file domains and filesets in more detail. A file domain is a named set of one or more volumes that provides a shared pool of physical storage. With respect to file domains, a volume is any mechanism that behaves like a UNIX block device: an entire magnetic disk, a disk partition, or a logical volume that is configured with the Logical Volume Manager (LVM) or the Logical Storage Manager (LSM).
Creating a file domain is the first step in setting up AdvFS. The number of file domains that you construct on your system depends on the needs of your site, the resources available to the system, and the number of independent file systems you choose to manage.
When created, all file domains consist of a single (or initial) volume. You transform a single-volume file domain into a multiple-volume file domain by adding one or more volumes. Unless you have installed the optional file system utilities and registered the license PAK, you are limited to creating single-volume file domains.
The /etc/fdmns directory, which the file system automatically creates and updates for you, contains a subdirectory for each file domain on your system. The subdirectories contain a symbolic link to every volume in the file domain.
Use the following guidelines for file domains:
To reduce the risk of domain failure, limit the number of volumes to 3 volumes per file domain.
Refer to the addvol(8), mkfdmn(8), advfs(4), fdmns(4), and showdmn(8) reference pages for more information.
A fileset represents a portion of the directory hierarchy of a file system; each fileset, which has a unique name, is a collection of directories and files that form a subtree structure. Because the hierarchy layer is independent of the storage layer, you can manage file placement without affecting the logical structure of filesets.
Filesets and file systems are equivalent in many ways. For instance, you mount filesets individually like you mount file systems. Similarly, filesets are units on which you enable quotas and back up data.
Although you can set up a fileset to simulate a traditional file system, filesets offer more flexibility. For instance, you can create multiple filesets in place of one file system, allowing you to manage each fileset independently. Conversely, you can create one large fileset in a situation where you usually define multiple file systems, thereby reducing management overhead.
Unlike file systems, filesets can have clone filesets. A clone fileset is a read-only copy of an existing fileset that you create to capture your data at one moment in time. You can back up the contents of the clone fileset to media while the original fileset remains available to system users. The clone fileset utility, clonefset, is available with the POLYCENTER Advanced File System Utilities.
Use the following guidelines for filesets:
Refer to the advfs(4), fdmns(4), mkfset(8), and showfsets(8) reference pages for more information.
The Advanced File System (AdvFS) always attempts to write each file to disk as a set of contiguous units called pages; a page is 8 KB of disk space. Contiguous, in this context, means storage on disk that is physically adjacent. A set of one or more contiguous pages is called an extent. Contiguous placement of the pages means that the I/O mechanism works more efficiently. When a file consists of many small extents, the I/O mechanism must work harder to read or write that file.
Files are not static; disk space requirements change over time. To maintain contiguous file placement without over-allocating space on the disk, AdvFS applies a policy to file storage allocation. Each time a file is appended, AdvFS adds pages to the file by preallocating one-fourth of the file size up to 16 pages. If a large write requires more file space, AdvFS attempts to allocate up to 256 contiguous pages. Excess preallocated space is truncated when the file is closed. Unused preallocated space is then available for the next write.
For multivolume file domains, new files are allocated sequentially across volumes. Volumes that are more than 86% full (allocated) are not used for new file allocation unless all volumes are over 86% full. When existing files are appended, storage is allocated on the volume on which the file was initially allocated, until that volume is full.
When a new volume is added to a file domain, it is added to the storage allocation sequence. Files are allocated to the new volume in turn.
AdvFS writes files to disk in sets of 8-KB pages. When a file uses only part of the last page, less than 8 KB, a file fragment is created. The fragment, which is from 1 KB to 7 KB in size, is allocated from the frag file. Using fragments considerably reduces the amount of unused, wasted disk space. Note that the frag file is a special file not visible in the directory hierarchy.
Given the dynamic nature of a file system, the file storage-allocation policy cannot always guarantee contiguous page placement. The following factors affect the policy:
When a disk is fragmented, AdvFS writes data to isolated physical pages, based on availability, instead of writing to contiguous pages.
Many users on a system increases file activity. As a result, files become more fragmented on the disk.
File fragmentation can reduce the I/O performance of AdvFS. You can use the defragment utility to reduce domain fragmentation. The defragment utility is available with the optional AdvFS Utilities. See the defragment(8) reference page for information on reducing file fragmentation.
As you begin planning, decide whether you want to set up AdvFS to resemble a traditional UFS configuration. Once you become familiar with AdvFS, you can begin to move away from the traditional model.
When planning your configuration, consider setting up the root and /usr file systems on AdvFS. Using AdvFS as the root file system enables booting from an AdvFS file domain and makes AdvFS features available on all local file systems. By having the /usr file system on AdvFS you can significantly reduce the amount of time your system is down after a system failure.
You can put the root file system and /usr file system on AdvFS during the initial base system installation. If you prefer, you can convert your existing root and /usr file systems after installation. See Section 7.9 and Section 7.10 for conversion guidelines.
The following procedure is a guide for setting up an active, single-volume file system:
You can add more volumes to any existing file domain (except for the root_domain) by using the addvol utility, if you have installed the file system utilities.
Name each fileset the same as its mount-point directory; for example, if the mount-point directory is /tmp, name the fileset tmp.
In the unlikely event of a severe failure where you must restore the /fdmns directory manually by reconstructing that directory, you must have a separate record of your file system configuration with the name of each file domain and its associated volumes. Always keep this record up-to-date.
The following examples use AdvFS to set up active file systems. The file-domain configurations in the examples are:
This example mounts one fileset, called usr, on the /usr mount-point directory, which already exists on the system:
#
mkfdmn /dev/rz3c domain1
#
mkfset domain1 usr
#
mount -t advfs domain1#usr /usr
This example creates a single volume domain, domain2, and two filesets in the domain, tmp and public. Because the domain has only one volume, the files in both filesets reside on one volume. This is an accepted configuration on AdvFS.
To set up this configuration, the example mounts two filesets, called tmp and public, on the respective mount-point directories:
#
mkfdmn /dev/rz2c domain2
#
mkfset domain2 tmp
#
mkfset domain2 public
#
mkdir /public
#
mount -t advfs domain2#tmp /tmp
#
mount -t advfs domain2#public /public
This example mounts one fileset, called projects, on the /projects mount-point directory, which the example creates:
#
mkfdmn /dev/rz1c domain3
#
mkfset domain3 projects
#
mkdir /projects
#
mount -t advfs domain3#projects /projects
The number sign (#) between the file domain and fileset is part of the syntax that represents a fileset; this character does not indicate a comment.
Refer to the mkfdmn(8), mkfset(8), and addvol(8) reference pages for more information.
AdvFS eliminates the slow reboot activities associated with quotas on UFS. As a result, enabling quotas is a useful way of tracking and controlling the amount of physical storage that each fileset consumes.
The AdvFS quota system is compatible with the Berkeley-style quotas of UFS. Basically, AdvFS supports user account and group quotas. However, the AdvFS quota system differs in two ways: AdvFS differentiates between quota maintenance and quota enforcement and supports fileset quotas.
AdvFS quota maintenance tracks file and disk space usage. It keeps a record of the number of files and blocks a user or group is using in the quota.user and quota.group files found in the root directory of a fileset. The AdvFS quota system always maintains quota information. Unlike UFS, this function cannot be disabled.
When quota enforcement is enabled, the AdvFS quota system enforces all quota limits set by the system administrator. You use the edquota command to set quota limits. Use the quotaon and quotaoff commands to enable and disable quota enforcement.
The AdvFS user and group quota commands are the same as UFS quota commands. Table 7-5 lists the quota commands used to set and maintain user and group quotas.
docroff: ignoring superfluous symbol quota
Command | Description |
edquota | Edits user and group quotas. |
ncheck | Prints a list of pairs (tag and pathname) for all files in a specified fileset. Use the sorted output as input for the quot command. |
quot | Prints the number of blocks in the named fileset currently owned by each user. |
quota | Displays users' disk usage and limits on filesets that have quotas enabled. |
quotacheck | Checks file system quota consistency. |
quotaon | Enables quotas on one or more filesets. By default, quotas are enabled on all filesets. |
quotaoff | Disables quotas on one or more filesets. |
repquota | Prints a summary of the disk usage and quotas for the specified file systems. |
The quota commands display disk usage in block sizes of 1024-byte blocks.
In addition to the Berkeley-style user and group quotas, AdvFS also supports fileset quotas. Fileset quotas are similar to user/group quotas in both function and management.
Fileset quotas apply to the fileset rather than individual users and/or groups. You can use them to limit the amount of disk storage and number of files consumed by a fileset. This is useful when a file domain contains several filesets. Without fileset quotas, all filesets have access to all disk space in a file domain, allowing one fileset to use all the disk space in a file domain.
Filesets can have both soft and hard disk storage and file limits. When a hard limit is reached, no more disk space allocations or file creations that would exceed the limit are allowed. The soft limit may be exceeded for a period of time (called the grace period). If the soft limit is exceeded for an amount of time that exceeds the grace period, no more disk space allocations or file creations are allowed until enough disk space is freed or enough files are deleted to bring the disk space usage or number of files below the soft limit. The grace periods for the soft limits are set with the edquota -tg command (the -g switch must be used because AdvFS uses the group quota file of the fileset to maintain fileset quotas).
Fileset quotas are managed using the commands shown in Table 7-6.
Command | Description |
chfsets | Changes file usage and block usage limits (quotas) for a fileset |
df | Displays the limits and actual number of blocks used by a fileset |
edquota | Sets the grace period for fileset quotas |
showfsets | Displays the file and block usage limits for the filesets in a domain |
showfdmn | Displays space usage for the specified domain |
Refer to the chfsets(8,) showfsets(8,) showfdmn(8,) edquota(8), ncheck(8), quot(8), quota(1), quotacheck(8), quotaon(8), and vrepquota(8) reference pages for more information.
The dump command supports UFS exclusively. As a result, AdvFS provides an equivalent backup command called vdump. AdvFS also replaces the restore command with the equivalent vrestore command.
If you already use the dump or restore commands to back up and restore data, then the vdump and vrestore commands will be familiar to you.
There are differences between the UFS commands and AdvFS commands. The vdump command supports other file system types, so you can use vdump command capabilities on files systems other than AdvFS. Several minor flags are absent from AdvFS commands; new flags increase your access to information when backing up and restoring files. The vdump command also provides the following features that are unavailable with the dump command:
This feature expands the support of the vdump command to other file systems, including UFS. This means that you can simplify the task of backing up multiple file systems by using the same backup facility across the system. Other file systems can benefit from the extended features provided by the vdump command.
This feature refines the granularity of your system backups. Instead of backing up an entire file system, you can selectively back up individual subdirectories by using the -D flag.
This feature writes data in a compressed form to a saveset, which reduces storage usage and runs faster on slow backup devices by writing less data.
Table 7-7 lists and describes new command flags for the vdump command. docroff: ignoring superfluous symbol dump
Flag | Description |
-C | Compresses data during a backup |
-D | Backs up a subdirectory |
-F | Specifies the number of in-memory buffers |
-V | Displays the current command version number |
-h | Displays usage help |
-q | Displays error messages, but not warning messages |
-v | Displays the names of files as they are backed up |
-x | Increases saveset error protection |
Table 7-8 lists and describes new command flags for the vrestore command.
Flag | Description |
-V | Displays the current command version number |
-l | Lists the saveset structure |
-q | Displays error messages, but not warning messages |
-o | Provides file overwrite options |
Refer to the vdump(8) and vrestore(8) reference pages for more information.
The /etc/fdmns directory contains a set of subdirectories, one for each file domain on your system. Each subdirectory includes symbolic links to every volume in the file domain. AdvFS cannot mount filesets without this directory.
Note
You must use the addvol and rmvol utilities to add and remove volumes. Creating and removing links alone does not add or remove a volume.
AdvFS creates a corresponding subdirectory each time you create a file domain. For example, you can create a file domain called mydomain, which contains the volume /dev/rz1c. The file system creates the /etc/fdmns/mydomain subdirectory, which contains a symbolic link to /dev/rz1c. When you add or remove a volume from the file domain, the file system updates the subdirectory by adding or removing symbolic links.
In some ways, the /etc/fdmns directory resembles the /etc/fstab file; each has special significance and requires extra attention. You must restore the /etc/fdmns directory if its contents are deleted, corrupted, or if you install a new version of the operating system. Although a missing or damaged /etc/fdmns directory prevents access to the file domain, the data within the file domain remains intact.
Restoring from backup media is the preferable method for restoring the /etc/fdmns directory, provided you have a current backup copy of the directory. You can use any standard backup facility (vdump, dump, tar, or cpio) to back up the /etc/fdmns directory. To restore the directory, use a recovery procedure that is compatible with your backup facility.
Always back up the /etc/fdmns directory whenever you create a new file domain, add a volume to an existing file domain, or remove a volume from an existing file domain.
You can reconstruct the /etc/fdmns directory manually or with the advscan command. The procedure for reconstructing the fdmns directory is similar for both single-volume and multivolume file domains.
If you choose to reconstruct manually, you must know the name of each file domain on your system and its associated volumes. In other words, you need detailed records of the file domains on your system.
The following example manually reconstructs two file domains, each containing a single volume (or special device). The file domains are:
To reconstruct the two single-volume file domains, enter:
#
mkdir /etc/fdmns
#
mkdir /etc/fdmns/domain1
#
cd /etc/fdmns/domain1
#
ln -s /dev/rz1c
#
mkdir /etc/fdmns/domain2
#
cd /etc/fdmns/domain2
#
ln -s /dev/rz2c
The following example, which requires that the optional AdvFS Utilities be installed, reconstructs one multivolume file domain. The domain1 file domain contains three volumes:
To reconstruct the multivolume file domain, enter:
#
mkdir /etc/fdmns
#
mkdir /etc/fdmns/domain1
#
cd /etc/fdmns/domain1
#
ln -s /dev/rz1c
#
ln -s /dev/rz2c
#
ln -s /dev/rz3c
Refer to the fdmns(4), mkfdmn(8), and addvol(8) reference pages for more information.
You can use the advscan command to rebuild all or a part of your /etc/fdmns file domain. The advscan command can perform the following tasks:
See the advscan(8) reference page for details on using the command to restore the /etc/fdmns directory.
Unexpected shutdowns, usually as a result of system interruption or media failure, cause you to restart your Digital UNIX operating system. When you are forced to restart your system after an unexpected shutdown, AdvFS is affected.
An example of a system interruption is when your site unexpectedly loses power. This usually happens without warning.
AdvFS uses write-ahead logging as a way to reduce the impact of system interruptions. As your system reboots, the file system scans all records in the recovery log. Any operations that were uncommitted when the interruption occurred are undone. Thus, the number of uncommitted records in the log determines the speed of the recovery. Since the recovery depends on the number of records in the log, instead of the amount of data in the file system, the recovery process dramatically improves. The default log size is 4 MB.
AdvFS automatically initiates crash recovery on a file domain as soon as you mount a fileset within that file domain. You can add filesets to the /etc/fstab file (at least one fileset per domain) so that all file domains recover during the system reboot.
Newer magnetic disks fail less frequently than devices based on older technology. Nevertheless, if any single disk in a file domain fails, you must restore all filesets in the file domain. Assuming you use the vdump command to back up your filesets, you can restore your filesets by using the vrestore command.
Refer to the advfs(4), fdmns(4), vdump(8), and vrestore(8) reference pages for more information.
Converting the root file system to AdvFS enables booting from an AdvFS file domain and supports AdvFS as the root file system. The AdvFS root domain must reside on a single disk.
This section presents instructions for converting the root file system from UFS to AdvFS. These instructions are guidelines, that is, suggestions to illustrate the process of converting the root file system to AdvFS. Specific file names and disk partitions can vary, depending on your system.
You can convert the UFS root file system on one disk to the equivalent AdvFS root file system on a different target disk.
Requirements:
Assumptions:
File system:
root
Mount directory:
/
Disk partition:
/dev/rz1a
File system:
root
Mount directory:
/newroot
Disk partition:
/dev/rz2a
File domain:
root_domain
Fileset:
root
Use the following procedure as a guide for converting the root file system:
#
mkfdmn -r -t rz26 /dev/rz2a root_domain
#
mkfset root_domain root
#
mkdir /newroot
#
mount -t advfs root_domain#root /newroot
#
vdump 0f - / | (cd /newroot; vrestore -xf -)
#
disklabel -r /dev/rrz2a > /tmp/rz2label
#
disklabel -t advfs -r -R /dev/rrz2a /tmp/rz2label rz26
/dev/rz1a / ufs rw 1 1
root_domain#root / advfs rw 1 1
The converted root file system is ready to use.
The AdvFS root domain is limited to one disk. Do not use the addvol command to extend the root domain.
Relying on the fsck utility to check and repair the /usr file system can be time-consuming. By converting the /usr (UFS) file system to AdvFS, you can reduce the amount of time your system is down after a system failure.
This section presents several methods for converting the /usr file system from UFS to AdvFS. These methods are guidelines to illustrate the process of converting file systems to AdvFS: Specific file names, tape drives, and disk partitions can vary, depending on your system.
You can convert the /usr (UFS) file system to the equivalent /usr (AdvFS) file system by backing up the existing file system to tape and restoring it to an AdvFS environment.
Requirements:
Assumptions:
File system:
/usr
Disk partition:
/dev/rz3g
File system:
/usr
Disk partition:
/dev/rz3g
File domain:
usr_domain
Fileset:
usr
Use the following procedure as a guide for converting the /usr file system:
#
mt rewind
#
cd /usr
#
vdump -0 .
/dev/rz3g /usr ufs rw 1 2
usr_domain#usr /usr advfs rw
#
shutdown -h now
>>>
b -fl i
The system will prompt you for the name of the kernel you want to boot. Press Return to accept the default vmunix kernel.
#
mount -u /
#
mkfdmn /dev/rz3g usr_domain
#
mkfset usr_domain usr
#
mount -t advfs usr_domain#usr /usr
#
vrestore -x -D /usr
You can convert the /usr (UFS) file system to the equivalent /usr (AdvFS) file system by backing up the existing file system to a file and restoring it to an AdvFS environment.
Requirements:
(The file system that contains the intermediate file can be on the same disk or on a different disk. However, do not put the intermediate file on the /usr file system.)
Assumptions:
File system:
/usr
Disk partition:
/dev/rz3g
Intermediate file:
/tmp/usr_bck
File system:
/usr
Disk partition:
/dev/rz3g
File domain:
usr_domain
Fileset:
usr
Use the following procedure as a guide for converting the /usr file system:
#
cd /usr
#
vdump -0f /tmp/usr_bck /usr
/dev/rz3g /usr ufs rw 1 2
usr_domain#usr /usr advfs rw
#
shutdown -h now
>>>
b -fl i
The system will prompt you for the name of the kernel you want to boot. Press Return to accept the default vmunix kernel.
#
mount -u /
#
mkfdmn /dev/rz3g usr_domain
#
mkfset usr_domain usr
#
mount -t advfs usr_domain#usr /usr
#
vrestore -xf /tmp/usr_bck -D /usr
You can convert the /usr (UFS) file system on one disk to the equivalent /usr (AdvFS) file system on a different target disk.
Requirements:
Assumptions:
File system:
/usr
Disk partition:
/dev/rz3g
File system:
/usr
Disk partition:
/dev/rz2c
Mount directory:
/usr.advfs
File domain:
usr_domain
Fileset:
usr
Use the following procedure as a guide for converting the /usr file system:
#
mkfdmn /dev/rz2c usr_domain
#
mkfset usr_domain usr
#
mkdir /usr.advfs
#
mount -t advfs usr_domain#usr /usr.advfs
#
cd /usr
#
vdump -0f - -D . | vrestore -xf - -D /usr.advfs
/dev/rz3g /usr ufs rw 1 2
usr_domain#usr /usr advfs rw
By converting your data file systems to AdvFS, you can eliminate lengthy reboots. Moreover, you can introduce new configurations to reduce file system management overhead.
This section presents two different methods for converting data file systems from UFS to AdvFS. The second method appends the first method with additional instructions, resulting in an AdvFS file system that consists of two independent filesets within one file domain.
The conversion methods presented here are only guidelines to illustrate the process of converting file systems to AdvFS. Specific file names, tape drives, and disk partitions can vary, depending on your system.
You can convert a data UFS file system to the equivalent data AdvFS file system by backing up the existing file system to tape and restoring it to an AdvFS environment.
Requirements:
Assumptions:
File system:
/staff2
Mount directory:
/staff2
Disk partition:
/dev/rz2c
File system:
/staff2
Disk partition:
/dev/rz2c
File domain:
staff_domain
Fileset:
staff2
Use the following procedure as a guide for converting the /staff2 file system:
#
mt rewind
#
cd /staff2
#
vdump -0 .
#
umount /staff2
#
mkfdmn /dev/rz2c staff_domain
#
mkfset staff_domain staff2
#
mount -t advfs staff_domain#staff2 /staff2
#
vrestore -x -D /staff2
/dev/rz2c /staff2 ufs rw 1 2
staff_domain#staff2 /staff2 advfs rw
The converted /staff2 file system is ready to use.
You can transfer an existing data file system to a new system, then convert the file system to AdvFS.
Requirements:
Assumptions:
File system: /staff4
File system:
/staff4
Disk partition:
/dev/rz2c
Mount directory:
/staff4
File domain:
staff_domain
Fileset:
staff4
Use the following procedure as a guide for converting the /staff4 file system:
#
tar c /staff4
#
mkfset staff_domain staff4
#
mkdir /staff4
#
mount -t advfs staff_domain#staff4 /staff4
#
mt rewind
#
tar x /staff4
staff_domain#staff4 /staff4 advfs rw