|
|
HP-UX Reference > Vvxfsconvert(1M)HP-UX 11i Version 2: December 2007 Update |
|
NAMEvxfsconvert — convert a file system to a vxfs file system or upgrade a VxFS disk layout version. DESCRIPTIONvxfsconvert converts a file system of a supported type to a VxFS file system with a Version 4 disk layout. Currently vxfsconvert only supports conversion of an HFS file system to a VxFS file system. Conversion of all file system block and fragment sizes is supported. After a file system is converted to VXFS, its block size is the value of the fragment size before conversion. vxfsconvert also converts VxFS Version 2 and Version 3 disk layouts to Version 4 disk layouts. Do a full backup of the file system before running vxfsconvert. File system conversion is complex and while most file systems will convert without problems, some may not. You could lose data if you don't have a backup. See the WARNINGS section. vxfsconvert requires sufficient disk space to convert existing metadata to vxfs metadata. The space is acquired from free space within the file system or from the space available immediately after the end of the file system. In either case, the space must be available on the same device or volume that contains the file system. vxfsconvert requires approximately 12%-15% of the total file system size as free space, depending on the number of directories and files. special is the character disk or volume manager device. Running vxfsconvert on the character device is usually faster than running it on a block device. vxfsconvert converts HFS access control list (ACL) entries to the respective VxFS ACL entries with limitations. Only the entries that comply with the VxFS ACL standard are converted. See the description of the conversion process, below, for details. vxfsconvert takes approximately 2 to 3 times longer to convert a file system than running a full fsck on an HFS file system. Optionsvxfsconvert recognizes the following options:
Operandsvxfsconvert recognizes the following operand:
NotesTo take full advantage of the VxFS file system, use fsadm to reorganize the file system after the conversion. The online reorganization feature of fsadm is available in only with the HP OnLineJFS product. vxfsconvert cannot convert a Version 4 disk layout to a Version 5 disk layout. Use the vxupgrade online upgrade procedure instead. Use the vxupgrade command to upgrade mounted file systems. To take full advantage of the VxFS file system, use fsadm to reorganize the file system after the conversion. The online reorganization feature of fsadm is available in only with the HP OnLineJFS product. The converted VxFS file system uses the Version 4 disk layout, which is only recognized by JFS 3.3 and later versions. Do not convert a file system which is shared by a system running HP-UX 10.x or HP-UX 11.00 without JFS 3.3. The ability to shrink a VxFS file system after conversion depends on the amount and location of free space in the original file system. If an attempt to shrink a converted file system fails, try shrinking again specifying a smaller shrink size. Shrinking is generally not possible for conversions performed using the -s option. For VxFS file systems on a Volume Manager volume, always shrink the file system before shrinking the volume. Use the fsadm command to shrink a file system. You must call vxfsconvert with its full pathname: /sbin/fs/vxfs/vxfsconvert. Quota conversion is not supported. Conversion ProcessTo prepare a file system for conversion:
Now run vxfsconvert. vxfsconvert does the following steps to convert a file system:
Up to this point, all metadata of the original file system is intact and the conversion process can be stopped. The file system can be used after you run the original file system-specific fsck. If you specified the -e or -s option, running the file system-specific fsck is not required.
At this point, make appropriate changes to the mnttab and fstab files to indicate that the file system is now a VxFS file system. Run the VxFS-specific full fsck on the converted file system. During pass 4, fsck displays several error messages that require a yes response to complete the conversion process. These errors occur because vxfsconvert does not create all metadata files; you must run fsck to complete the process. No error messages display during passes zero through three. The following is sample fsck output after successful conversion. # fsck -F vxfs -y -o full /dev/vg01/rlvol5 superblock indicates that intent logging was disabled cannot perform log replay pass0 - checking structural files pass1 - checking inode sanity and blocks pass2 - checking directory linkage pass3 - checking reference counts pass4 - checking resource maps fileset 1 au 0 imap incorrect - fix (ynq)y fileset 1 au 0 iemap incorrect - fix (ynq)y fileset 999 au 0 imap incorrect - fix (ynq)y fileset 999 au 0 iemap incorrect - fix (ynq)y corrupted CUT entries, clear? (ynq)y au 0 emap incorrect - fix? (ynq)y au 0 summary incorrect - fix? (ynq)y au 1 emap incorrect - fix? (ynq)y au 1 summary incorrect - fix? (ynq)y au 1 state file incorrect - fix? (ynq)y fileset 1 iau 0 summary incorrect - fix? (ynq)y fileset 999 iau 0 summary incorrect - fix? (ynq)y free block count incorrect 0 expected 48878 fix? (ynq)y free extent vector incorrect fix? (ynq)y OK to clear log? (ynq)y set state to CLEAN? (ynq)y EXAMPLESThe following example checks available free space in the /dev/vg01/lvol5 file system, unmounts the file system, and returns the amount of free space required for conversion. Available free space must always be greater than or equal to the required free space. # df -k /dev/vg01/lvol5 /usr (/dev/vg01/lvol5) : 43264 total allocated Kb 30785 free allocated Kb 12479 used allocated Kb 28 % allocation used # umount /dev/vg01/lvol5 # /sbin/fs/vxfs/vxfsconvert -e /dev/vg01/rlvol5 vxfs vxfsconvert: Total of 1219K bytes required to complete the conversion To convert the file system, enter: # /sbin/fs/vxfs/vxfsconvert /dev/vg01/rlvol5 vxfs vxfsconvert: Do you wish to commit to conversion? (ynq) y vxfs vxfsconvert: CONVERSION WAS SUCCESSFUL Upon successful conversion, check file system sanity, mount, and reorganize the file system (with fsadm) as in the following example: # fsck -F vxfs -y -o full /dev/vg01/rlvol5 super-block indicates that intent logging was disabled cannot perform log replay pass0 - checking structural files pass1 - checking inode sanity and blocks pass2 - checking directory linkage fileset 999 directory 3 block 7591 offset 952 has reclen 0 clear block? (ynq)y pass3 - checking reference counts pass4 - checking resource maps fileset 1 au 0 imap incorrect - fix (ynq)y fileset 1 au 0 iemap incorrect - fix (ynq)y fileset 999 au 0 imap incorrect - fix (ynq)y fileset 999 au 0 iemap incorrect - fix (ynq)y fileset 999 au 0 imap incorrect - fix (ynq)y fileset 999 au 0 iemap incorrect - fix (ynq)y corrupted CUT entries, clear? (ynq)y au 0 emap incorrect - fix? (ynq)y au 0 summary incorrect - fix? (ynq)y au 1 state file incorrect - fix? (ynq)y au 1 emap incorrect - fix? (ynq)y au 1 summary incorrect - fix? (ynq)y au 1 state file incorrect - fix? (ynq)y fileset 1 iau 0 summary incorrect - fix? (ynq)y fileset 999 iau 0 summary incorrect - fix? (ynq)y fileset 999 iau 0 summary incorrect - fix? (ynq)y free block count incorrect 0 expected 35764 fix? (ynq)y free extent vector incorrect fix? (ynq)y OK to clear log? (ynq)y set state to CLEAN? (ynq)y # mount -F vxfs /dev/vg01/lvol5 /usr # fsadm -ed /mntpt fsadm: /etc/default/fs is used for determining the file system type If the conversion fails, due to I/O failure, for example, run fsck to return to the original file system. fsck -F hfs /dev/vg01/rlvol5 To convert a file system on a volume manager (for example, LVM) volume, using only disk space at the end of the file system (with the -s option), you may need to increase the volume size to provide the additional space to do the conversion. If LVM is used, you can do the following: vxfsconvert -e /dev/vg01/rlvol5 lvextend -L new_size /dev/vg01/rlvol5 vxfsconvert -s required_space /dev/vg01/rlvol5 After the conversion completes, the increased volume space becomes a part of the converted VxFS file system. Note: DO NOT reduce the volume after the conversion. If the conversion fails, continue using the original file system. You do not need to run fsck. Reclaim the disk space by entering (on LVM): lvreduce /dev/vg01/rlvol5 old_size WARNINGSDo not run vxfsconvert on the /stand or whole-disk bootable file systems. In the rare case of unsuccessful conversion, there is a risk of data loss or corruption. Always do a full system backup before the conversion. FILES
SEE ALSOfsck(1M), fsck_vxfs(1M), fsck_hfs(1M), mkfs_vxfs(1M), fsadm_vxfs(1M), vxupgrade(1M), fs_vxfs(4), fstab(4), mnttab(4) lvm(7). VERITAS Volume Manager Administrator's Guide |
|