vxfsconvert - convert an unmounted file system to VxFS or upgrade a VxFS disk layout version
vxfsconvert [ -l logsize ] [ -s size ] [ -efnNvyY ] special
The vxfsconvert utility converts an HFS file system to a Veritas File System. The conversion must be done on an HP-UX system. Conversion of all HFS file system block sizes is supported. After a file system is converted to VxFS, its block size is the value of the fragment size before conversion. The vxfsconvert utility also converts VxFS disk layout versions 2 and 3 to Version 7 disk layout.
The vxfsconvert utility 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 on which the file system resides. Free space required by vxfsconvert is approximately 12%-15% of the total file system size, depending on the number of directories, size of directories, files, and the number of allocated inodes.
special is the character (raw) disk device containing the file system to convert. Running vxfsconvert on the raw device is almost always faster than running it on a block device.
The vxfsconvert utility takes approximately 4 to 5 times longer than running file system-specific fsck on HFS.
The vxfsconvert utility does not convert the quota files in HFS file systems to the VxFS quota file format. However, it does create empty VxFS user and group quota files.
The vxfsconvert utility converts HFS access control list (ACL) entries to their respective VxFS ACL entries if they comply with the VxFS ACL standard. See the description of the conversion process below for details.
Use the fsadm command to reorganize the file system after the conversion.
Use the vxupgrade command to upgrade mounted file systems.
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 either the fsadm or the VxVM vxresize command to shrink a file system.
Access Control List (ACL) and quota conversion is not supported.
The vxfsconvert command cannot convert a Version 4 disk layout to a Version 7 disk layout. Use the vxupgrade online upgrade procedure instead.
Quota conversion is not supported.
The vxfsconvert command does not have an option to convert from a VxFS file system back to an HFS file system. To do this, you must recreate the HFS file system and restore the data.
Estimates the amount of space required to complete the conversion. This option does not convert the file system to VxFS, no data is written to the file system, and the file system remains clean.
-e generally overestimates the free space because it considers the worst case scenario for allocating blocks (that is, fully fragmented).
Displays the list of supported file system types. Currently, the supported source types are HFS and VxFS disk layout Version 2 and Version 3. The supported target type is VxFS disk layout Version 7.
Specifies the size of the file system intent log. The minimum value for logsize is the number of blocks that make the log no less than 256K bytes. The maximum value for logsize is the number of blocks that make the log no greater than 16384K bytes. The default logsize is usually 1024 blocks; for a small file system the default may be smaller to avoid wasting space.
-n | N
Assumes a no response to all questions asked by vxfsconvert. This option implies that the conversion is never committed and the file system is not converted to VxFS. Despite the aborted conversion, the UFS-specific fsck must still be run on the file system.
Directs vxfsconvert to use free disk space past the current end of the file system to store VxFS metadata (such as the intent log). size specifies the amount of available disk space past the end of the file system in kilobytes. vxfsconvert uses the space past the current end of the file system for the conversion process. If there is not enough space available for the conversion process, and the device on which the file system resides is a Veritas Volume Manager volume, you can use the VxVM vxassist command to grow the volume to create more space. If the device is a raw partition, you can use -s only if there is sufficient space on the partition past the end of the file system.
If -s is not specified, vxfsconvert uses free blocks from within the layout of the file system being converted. File systems converted with -s cannot be shrunk to a size smaller than their initial post-conversion size.
Specifies verbose mode. Verbose mode shows the progress of the conversion process. For every inode converted, one of the following characters is displayed.
The inode is a regular file
The inode is a block special file
The inode is a character special file
The inode is a directory
The inode is a symbolic link
The inode is a fifo
The inode is a socket
The inode is unknown
-y | Y
Assumes a yes response to all questions asked by vxfsconvert. This option implies that the conversion is committed unless vxfsconvert fails to allocate the required disk space. If an unknown inode type is detected during the conversion, vxfsconvert ignores them. If you specify -y | Y and vxfsconvert fails to allocate the required disk space, the command returns an estimate of the amount of space required to complete the conversion.
To prepare a file system for conversion:
Run vxfsconvert. vxfsconvert goes through 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 a sample fsck output after successful conversion.
# fsck -F vxfs -y -o full /dev/vx/rdsk/dg_name/devicename
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
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
The following example checks available free space, unmounts the current 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/vx/dsk/dg_name/devicename
# umount /dev/vx/dsk/dg_name/devicename
# vxfsconvert -e /dev/vx/rdsk/dg_name/devicename
To convert the file system, enter:
# vxfsconvert /dev/vx/rdsk/dg_name/devicename
Upon successful conversion, check file system sanity, mount, and reorganize the file system:
# fsck -F vxfs -y -o full /dev/vx/rdsk/dg_name/devicename
# mount -F vxfs /dev/vx/dsk/dg_name/devicename /mntpt
# fsadm -ed /mntpt
If the conversion fails (due to I/O failure, for example), run fsck to return to the original file system.
# fsck -F ufs /dev/vx/rdsk/dg_name/devicename
To convert a file system on a Veritas Volume Manager volume, increase the volume size to provide the additional space to do the conversion:
# vxfsconvert -e /dev/vx/rdsk/dg_name/volname
# vxassist growby volname required_space
# vxfsconvert -s required_space
After the conversion completes, the increased volume space becomes a part of the converted VxFS file system.
Note DO NOT shrink 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:
vxassist shrinkby volname required_space
All error, I/O failure, and exit messages display on standard out.
Contains static information about file systems.
Table of mounted file systems.
fsadm_vxfs(1M), fsck(1M), fsck_hfs(1M), fsck_vxfs(1M), mkfs_vxfs(1M), vxassist(1M), vxresize(1M), vxupgrade(1M), fs_vxfs(4), fstab(4), mnttab(4)
Veritas Volume Manager Administrator's Guide