vxupgrade(ADM)


vxupgrade - upgrade the disk layout of a VERITAS File System

Synopsis

vxupgrade [ -n new_version] [ -r rawdev] mount_point

Description

vxupgrade prints the current disk layout version number for a VxFS file system or upgrades the file system to a new disk layout. vxupgrade operates on file systems mounted for read/write access: mount_point must be a mounted VxFS file system. Only a privileged user can query or upgrade a VxFS file system.

When invoked with the -n option, vxupgrade upgrades the disk layout to the specified version. When invoked without the the -n option, vxfs prints the disk layout version number of the file system.

Options

-n new_version
Disk layout version number to upgrade to. new_version may be 2 or 4.

-r rawdev
Pathname of raw device to use. This option can be used when vxupgrade cannot determine what the raw device corresponding to the mount point is (when /etc/mnttab is corrupted, for instance).

To perform an upgrade, vxupgrade freezes the file system, allocates and initializes the new structures, frees the space used by the old structures, and then thaws the file system. This process should not keep the file system frozen for more than a few seconds.

vxupgrade makes use of a lock file (lost+found/.fsadm) on the file system to ensure that only one instance of vxupgrade is running at any time. vxupgrade and fsadm cannot be run simultaneously, so the lock file also ensures that vxupgrade is not run while a file system reorganization is in progress. When vxupgrade is invoked for an upgrade, it opens the lock file in the root of the file system specified by mount_point. If the file doesn't exist, it is created. The fcntl(S) system call is used to obtain a write lock on the file. If the write lock fails, vxupgrade will assume that another vxupgrade or an fsadm is running and will fail (see fsadm(ADM).

Notices

Once a file system has been upgraded to disk layout Version 4, it is no longer mountable with releases of VxFS prior to VxFS 3.2.

Once a file system has been upgraded to disk layout Version 2, it is no longer mountable with releases of VxFS prior to VxFS 2.0.

File systems cannot be downgraded.

Free space requirement

vxupgrade requires some free space on the file system in order to perform the upgrade, and the upgrade may fail if not enough free space is available. It is difficult to determine the exact amount of space required to upgrade a VxFS file system; however, one can estimate the maximum space required.

To upgrade a disk layout Version 1 file system with n * 1024 inodes (total of both allocated and free inodes) to disk layout Version 2, a worst-case minimum value is at least n * 896 bytes + 371 Kbytes, in extents of 8 Kbytes or larger. Free extents of larger than 8 Kbytes may be required, and n must be rounded up to an integral value, so this is only a lower bound on the worst case-minimum. Since this is the worst-case minimum, it may be possible to upgrade with less free space available.

To upgrade a disk layout Version 2 file system with n * 1024 inodes (allocated only) and m * 32768 blocks to disk layout Version 4, the worst-case minimum value is at least n * 2432 bytes + m * 8220 bytes + 115 Kbytes, in extents of 8 Kbytes or larger. Free extents of larger than 8 Kbytes may be required, so this is only a lower bound on the worst-case minimum required. Since this is the worst-case minimum, it may be possible to upgrade with less free space available. After the upgrade to disk layout Version 4 is completed, all of this free space, plus some additional free space, will be reclaimed.

A request to upgrade a Version 1 disk layout to Version 4 will first upgrade to Version 2 and then to Version 4. The upgrade may fail due to a lack of free space at each step.

Diagnostics

An exit value of 0 is returned if the upgrade was successful, 1 if the upgrade failed due to a lack of free space, and 2 if the upgrade failed for some other reason.

Files

mount_point/lost+found/.fsadm
Lock file.

References

fsadm(ADM), mkfs(ADM), fcntl(S), fs(F), vxfsio(HW)



Copyright © 2005 The SCO Group, Inc. All rights reserved.