UFS to VXFS migration using vxfsconvert (Veritas Utility).

UFS to VXFS migration using vxfsconvert (Veritas Utility):

The vxfsconvert utility converts a UFS file system to a Veritas File System. The conversion must be done on a Solaris system. Conversion of all UFS filesystem block sizes is supported. After a file system is converted to VxFS, its block size is the value of the fragment size before conversion. However, filesystems with a fragment size of 512 bytes cannot be converted. The vxfsconvert utility also converts any previous VxFS disk layout versions to Version 5 disklayouts.

The vxfsconvert utility requires sufficient disk space to convert existing metadata to VxFS metadata. The space is acquired from free space within the filesystem 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 runningit on a block device.

I am assuming Veritas Storage Foundation is already installed on your system and the under lying volumes are in veritas.

Note: Before starting check for VRTSvxfs package and vxfsconvert utility/command:

# pkginfo -l VRTSvxfs

# find /opt -name vxfsconvert  or  find / -name vxfsconvert

PS: vxfsconvert utility will not be there if VRTSvxfs is not installed, as its a part of VRTSvxfs package.

1.) Check the current Filesystesm type, mount details and vfstab entries:

root@test# fstyp /dev/vx/rdsk/testdg/test
ufs

root@test# df -k /test
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/vx/dsk/testdg/test
                     30239382 18617928 11319061    63%    /test

root@test# grep -i was /etc/vfstab
/dev/vx/dsk/testdg/test  /dev/vx/rdsk/testdg/test /test    ufs     3       yes     logging

2.) Ensure no one is using the FS and unmount the FS:

root@test# fuser -cu /test
root@test# fuser -ck /test

root@test# umount /test

3.) Run fsck to ensure the data consistency:

root@test#  fsck -o f /dev/vx/rdsk/testdg/test
** /dev/vx/rdsk/testdg/test
** Last Mounted on /test
** Phase 1 – Check Blocks and Sizes
** Phase 2 – Check Pathnames
** Phase 3a – Check Connectivity
** Phase 3b – Verify Shadows/ACLs
** Phase 4 – Check Reference Counts
** Phase 5 – Check Cylinder Groups
379981 files, 18587920 used, 11621454 free (451366 frags, 1396261 blocks, 1.5% fragmentation)
root@test#

4.) 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 filesystem, and the file system remains clean.

vxfsconvert need some free space in the filesystem to complete the operation/conversion.

-e generally overestimates the free space because it considers the worst case scenario for allocating blocks (that is, fully fragmented).

root@test# /opt/VRTS/bin/vxfsconvert -e /dev/vx/rdsk/testdg/test
UX:vxfs vxfsconvert: INFO: V-3-21783: Total of 1021331K bytes required to complete the conversion

5.) UFS to VXFS conversion:

root@test# /opt/VRTS/bin/vxfsconvert /dev/vx/rdsk/testdg/test
UX:vxfs vxfsconvert: INFO: V-3-21842: Do you wish to commit to conversion? (ynq) y for yes, n for no, q for quit (ynq) y
UX:vxfs vxfsconvert: INFO: V-3-21852:  CONVERSION WAS SUCCESSFUL

PS: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 & mount the FS back as original.

6.) Run fsck on converted FS before mount operation to double confirm the data consistency:

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

root@test# fsck -F vxfs -y -o full /dev/vx/rdsk/testdg/test
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
fileset 999 au 1 imap incorrect – fix (ynq)y
fileset 999 au 1 iemap incorrect – fix (ynq)y
fileset 999 au 2 imap incorrect – fix (ynq)y
fileset 999 au 2 iemap incorrect – fix (ynq)y
fileset 999 au 3 imap incorrect – fix (ynq)y
fileset 999 au 3 iemap incorrect – fix (ynq)y
fileset 999 au 4 imap incorrect – fix (ynq)y
fileset 999 au 4 iemap incorrect – fix (ynq)y
no CUT entry for fileset 1, fix? (ynq)y
no CUT entry for fileset 999, fix? (ynq)y
au 0 emap incorrect – fix? (ynq)y
au 0 summary incorrect – fix? (ynq)y
au 1 state file 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
au 2 state file incorrect – fix? (ynq)y
au 2 emap incorrect – fix? (ynq)y
au 2 summary incorrect – fix? (ynq)y
au 2 state file incorrect – fix? (ynq)y
au 3 emap incorrect – fix? (ynq)y
au 3 summary incorrect – fix? (ynq)y
au 4 emap incorrect – fix? (ynq)y
au 4 summary incorrect – fix? (ynq)y
fileset 1 iau 0 summary incorrect – fix? (ynq)y
fileset 999 iau 0 summary incorrect – fix? (ynq)y
fileset 999 iau 1 summary incorrect – fix? (ynq)y
fileset 999 iau 2 summary incorrect – fix? (ynq)y
fileset 999 iau 3 summary incorrect – fix? (ynq)y
fileset 999 iau 4 summary incorrect – fix? (ynq)y
free block count incorrect 0 expected 11232275 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

root@test# fsck -F vxfs -y -o full /dev/vx/rdsk/testdg/test
log replay in progress
pass0 – checking structural files
pass1 – checking inode sanity and blocks
pass2 – checking directory linkage
pass3 – checking reference counts
pass4 – checking resource maps
OK to clear log? (ynq)y
flush fileset headers? (ynq)y
set state to CLEAN? (ynq)y
root@test#

7.) Mount the FS to vxfs filesystem, you will get one error and the resolution is:

root@test# mount -F vxfs /dev/vx/dsk/testdg/test /test
UX:vxfs mount: ERROR: V-3-22168: Cannot open portal device: No such file or directory
grn
UX:vxfs mount: ERROR: V-3-25255: mount: You don’t have a license to run this program

Resoultion:

http://www.symantec.com/business/support/index?page=content&id=TECH47217

a.) root@test# pkginfo -l VRTSvxfs | grep -i status
    STATUS:  completely installed

b.) root@test# ls -lrt /devices/pseudo/vxportal
    /devices/pseudo/vxportal: No such file or directory

    root@test# devfsadm -v -i vxportal
    devfsadm[15793]: verbose: mknod /devices/pseudo/vxportal@0:0 0l/3l/20640

c.) root@test# ls -lrt /devices/pseudo/fdd
    /devices/pseudo/fdd: No such file or directory

    root@test# devfsadm -v -i fdd
    devfsadm[15825]: verbose: mknod /devices/pseudo/fdd@0:0 0l/3l/20600

d.) Mount the FS again and check the data usage and filesystem type.

    root@test# mount -F vxfs /dev/vx/dsk/testdg/test /test

    root@test# /opt/VRTS/bin/fsadm -ed /test

-e  Extent reorganization. Minimizes file system fragmentation. Files are reorganized to have the minimum number of extents.

-d Reorganizes directories. Directory entries are reordered to place subdirectory entries first, then all other entries in decreasing order of time of last access. The directory is also compacted to remove free space.

 root@test# df -k /test
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/vx/dsk/testdg/test
                     30720000 19487725 11232275    64%    /test

root@test# ls -lrt /test
total 722504
-rw-rw-r–   1 root     other    369778176 Sep 22  2006 u01.tar
drwx——   2 root     root       12288 Aug 16  2007 lost+found
drwxr-xr-x  12 wwspuat3 users       2048 Jan 19  2010 wwspuat3
drwxr-xr-x   9 wwspuat6 users       5120 Mar 10  2010 wwspuat6
drwxr-xr-x  10 wwspuat5 users       5120 Mar 17  2010 wwspuat5
drwxr-xr-x  14 wwspuat2 users      27648 Jan  4  2011 wwspuat2
drwxr-xr-x   2 root     other       1024 Jan 15  2011 mwenv1
drwxr-xr-x  14 wwspuat1 users      22528 Jun 23  2011 wwspuat1
drwxr-xr-x   6 6547     users       2048 Mar  1  2013 wwspuat4

root@test# fstyp /dev/vx/dsk/testdg/test
vxfs

8.) Make the change permanent in vfstab (i.e vxfs entry instead of ufs):

/dev/vx/dsk/testdg/test  /dev/vx/rdsk/testdg/test /test    vxfs     3       yes     –

PS: Please do not put logging in mount option in vfstab because there is NO Logging option present in VXFS FS type.

Yogesh Raheja

Yogesh working as a Consultant in Unix Engineering by profession. And he has multiple years experience in Solaris, Linux , AIX and Veritas Administration. He has been certified for SCSA9, SCSA10, SCNA10, VXVM, VCS, ITILv3. He is very much passionate about sharing his knowledge with others. Specialties: Expertize in Unix/Solaris Server, Linux (RHEL), AIX, Veritas Volume Manager, ZFS, Liveupgrades, Storage Migrations, Cluster deployment (VCS and HACMP) and administration and upgrade on Banking, Telecom, IT Infrastructure, and Hosting Services.

4 Responses

  1. Mahesh says:

    Hi Yogesh,

    Can please same process of migration from VXFS to EXT3 in linux.
    HI Experts Team,
    one more real challenging activity we(I) are facing?
    where we have one server PG938 in linux and having one filesystem(/prd/download/eBBS/batch) of 1.7 out 539 GB is used ….
    So our requirement is to decommsion 850G out of 1.7 TB filesystem . we have collected all empty disk space for decommsioning the server.
    The Plan is also ready to perform the actvity.
    —MY Manager is saying that we need to migrate it from VXFS fiesystem to Ext3 since vxvm is linux. I am not sure whther it is required?
    When we contacted symantic suggested that add ext3 filesystem to removeable only that can be done. and also asked why ur going for migration?
    WHY filesystem MIGRATITION is required to perform the above activity.?
    EVEN migration is required how migration will be done. whether it will be done in by adding the ext3 removable disks or by using the vxfsconvert .if i run below command there will any impact .
    can any one help how the migration will be done in step by step procedure.
    VAluable suggestions are always welcome . Wating for ur reply ASAP since this activity is important..

    Also this nfs share server.

  2. Mahesh says:

    HI RAMDEV/YOGESH,
    Pls help me to reslove the above issue

  3. Ramdev Ramdev says:

    Mahesh, The vxfsconvert doesn’t support veritas to ext3 filesystem.. It is only helpful to convert from non-vxfs file system to vxfs.

    As per Redhat, there is no tool/utility available in Red Hat Enterprise Linux to convert

    either VxVM volumes to LVM volume. or VxFS to ext3/ext4 filesystems.

    Only Supported method is

    – Take backup of data resides on VxFS
    – Create lvm on partitioned disk, format it as ext3/4 filesystem
    – Restore data from back up to newly created ext3/ext4 filesystem

  4. mahesh says:

    HI Ramdev,
    We have one more plan for this method. by adding ext3 filesystem to the decomssion disks and uninitailse from the vxvm control and remove from the server. will this method will be fine?

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us