Home > Veritas Storage Foundation™ File System Manual Pages
VXFSCONVERT (1M) |
Maintenance Commands |
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
The vxfsconvert utility does not convert the quota files in file systems to the VxFS quota file format. However, it does create empty VxFS user and group quota files.
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 does not have an option to convert from a VxFS file system back to file system. To do this, you must recreate the file system and restore the data.
Do not shrink the volume after the conversion.
- -e
- 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).
- -f
- Displays the list of supported file system types.
- -l logsize
- 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.
- -s size
- 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.
- -v
- 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
- b
- The inode is a block special file
- c
- The inode is a character special file
- d
- The inode is a directory
- l
- The inode is a symbolic link
- p
- The inode is a fifo
- s
- 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.
- Unmount and clean the file system to convert. The vxfsconvert command cannot convert a mounted or dirty file system.
- Do a full backup on the file system before starting the conversion process.
- Run full fsck on the file system and remove any hard links to directories.
Run vxfsconvert. vxfsconvert goes through the following steps to convert a file system:
- Examines the super-block to make sure it is marked CLEAN.
- Based on information in the file system super-block, sets up VxFS metadata. This includes initializing all metadata required by VxFS. At this time, the original file system super-block is marked DIRTY unless you specified the -e or -s option.
- Reads every inode in the file system and converts it to a VxFS inode.
- For every regular file inode, vxfsconvert allocates and initializes enough extent data to map all of the file's data blocks. This translates only the representation of the file's data blocks from the old format to that of VxFS. It never copies or relocates user data blocks.
- Converts all symbolic link, character special, block special, FIFO, and socket inodes to VxFS.
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.
- vxfsconvert replaces the original super-block with the VxFS super-block and clears any alternate super-blocks written by the original file system. The VxFS super-block is never written if you have specified the -n or -e options. After the super-block is overwritten, the original file system is no longer accessible and is fully converted to VxFS.
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.
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
# df -k /dev/vx/dsk/dg_name/devicename # umount /dev/vx/dsk/dg_name/devicename
To convert the file system, enter:
# vxfsconvert /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:
required_space # vxfsconvert -s required_space /dev/vx/rdsk/dg_name/volname# vxfsconvert -e /dev/vx/rdsk/dg_name/volname# vxassist growby volname
After the conversion completes, the increased volume space becomes a part of the converted VxFS file system.
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 volnamerequired_space
Veritas
Last updated: 1 Aug 2008
Copyright ©2009 Symantec Corporation
All rights reserved.