test veritas logo



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 ext2, ext3 or ext4 file system to a Veritas File System with latest disk layout version. The conversion must be done on a Linux system. Conversion of all ext2, ext3 and ext4 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 Version 4 to latest disk layout version.

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 ext2.

The vxfsconvert utility does not convert the quota files in ext2, ext3 or ext4 file systems to the VxFS quota file format. However, it does create empty VxFS user and group quota files.

The vxfsconvert utility does not convert the extended attributes of an ext2, ext3 or ext4 file system to VxFS extended attributes. Usually, the ACL of a file is stored as one of its extended attributes.


Use the fsadm command to reorganize the file system after the conversion.

Use the vxupgrade command to upgrade mounted VxFS file systems. Only the vxupgrade command can be used to upgrade a file system with disk layout Version 6 through 8 to disk layout Version 10.

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 an ext2, ext3 or ext4 file system. To do this, you must recreate the ext2, ext3 or ext4 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. Currently, the supported source types are ext2, ext3, ext4 and VxFS disk layout Version 4. The supported target type is VxFS latest disk layout version.
-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 262144K bytes. The default logsize increases with the file system size, as shown on the following table:
File system size Default log size
---------------- ----------------
0 MB to 8 MB 256k
8 MB to 512 MB 1 MB
512 MB to 16 GB 16 MB
16 GB to 512 GB 64 MB
512+ GB 256 MB

Smaller file systems are given smaller log size 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 file system-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. 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.


To prepare a file system for conversion:
o Unmount and clean the file system to convert. The vxfsconvert command cannot convert a mounted or dirty file system.
o Do a full backup on the file system before starting the conversion process.
o 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:

o Examines the super-block to make sure it is marked CLEAN.
o 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.
o Reads every inode in the file system and converts it to a VxFS inode.
o 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.
o For every directory inode, vxfsconvert allocates sufficient disk space to hold all the directory entries. For every directory entry in that directory, vxfsconvert converts it to a VxFS directory entry and writes all converted directory blocks.
o 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.
o 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.
At this point, make appropriate changes to the mtab and vfstab 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 -t 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 no CUT entry for fileset 1, fix? (ynq)y no CUT entry for fileset 999, fix? (ynq)y no CUT entry for fileset 1000, fix? (ynq)y au 2 emap incorrect - fix? (ynq)y au 2 summary incorrect - fix? (ynq)y au 172 emap incorrect - fix? (ynq)y au 172 summary incorrect - fix? (ynq)y au 174 emap incorrect - fix? (ynq)y au 174 summary incorrect - fix? (ynq)y free block count incorrect 0 expected 5583344 fix? (ynq)y free extent vector incorrect fix? (ynq)y OK to clear log? (ynq)y flush fileset headers? (ynq)y set state to CLEAN? (ynq)y

The messages regarding fileset 1000 and au 174 pertain to the Storage Checkpoint fileset and do not appear if the file system does not have any Storage Checkpoints.


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 -t vxfs -y -o full /dev/vx/rdsk/dg_name/devicename # mount -t 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 -t ext2 /dev/vx/dsk/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 /dev/vx/rdsk/dg_name/volname

After the conversion completes, the increased volume space becomes a part of the converted VxFS file system.
If the conversion from running vxfsconvert -s 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.


/etc/fstab Contains static information about file systems.
/etc/mtab Table of mounted file systems.


fsadm_vxfs(1M), fsck_vxfs(1M), mkfs_vxfs(1M), vxassist(1M), vxresize(1M), vxupgrade(1M), fs_vxfs(4), fstab(5), fsck(8)

Storage Foundation Administrator’s Guide

VxFS 8.0 vxfsconvert(1M)