Previous  |  Next  >  
Product: File System Manual Pages for Storage Foundation   
Manual: Maintenance Commands (1m)   

vxfsconvert

NAME

vxfsconvert - convert an unmounted file system to VxFS or upgrade a VxFS disk layout version

SYNOPSIS


vxfsconvert [ -l logsize ] [ -s size ] [ -efnNvyY ] special

AVAILABILITY

VRTSvxfs

DESCRIPTION

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 any previous VxFS disk layout versions to Version 4 disk layouts.

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 2 to 3 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.

NOTES

Use fsadm to reorganize the file system after the conversion.

Use the vxupgrade command to upgrade mounted file systems. Only the vxupgrade command can be used to upgrade a file system to a disk layout version greater than 4.

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.

The vxfsconvert command cannot convert a Version 4 disk layout to a Version 6 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.

OPTIONS

-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 HFS and VxFS disk layout Version 2 and Version 3. The supported target type is VxFS disk layout Version 4.

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

CONVERSION PROCESS

To prepare a file system for conversion:

  • Clean and unmount 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 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.
  • 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.
  • Converts all symbolic link, character special, block special, FIFO, and socket inodes to VxFS.
  • Converts HFS ACL entries to their respective VxFS ACL entries. Only entries that comply with the VxFS ACL standard are converted. The compliant entries are those that specify permissions for either a user or a group, but not both. That is, entries with formats (user.%) or (%.group) are converted, but entries with the format (user.group) are omitted. For files with both supported and unsupported entries, the supported entries are converted, but unsupported entries are omitted.
  • 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.

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
    

EXAMPLES

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 /dev/vx/rdsk/dg_name/volname

After the conversion completes, the increased volume space becomes a part of the converted VxFS file system.


Note   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

DIAGNOSTICS

All error, I/O failure, and exit messages display on standard out.

FILES

/etc/fstab

Contains static information about file systems.

/etc/mnttab

Table of mounted file systems.

SEE ALSO

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
 ^ Return to Top Previous  |  Next  >  
Product: File System Manual Pages for Storage Foundation  
Manual: Maintenance Commands (1m)  
VERITAS Software Corporation
www.veritas.com