How to use the fscdsconv command to migrate VxFS file systems in a CDS environment between systems running AIX, HP-UX, Linux, or SunOS

Article: 100018521
Last Published: 2019-02-24
Ratings: 0 0
Product(s): InfoScale & Storage Foundation

Problem

How to migrate a VxFS file system in a CDS environment between systems running  HP-UX to Linux (applicable for all platforms)

Solution

The fscdsconv utility converts the byte order of the file system specified by special. A file system's metadata is stored in the native byte order of the system on which it was created. To be able to access a file system created on a system with a different byte order, the file system's byte order must first be converted to the native byte order of the system from which it will be accessed.

After starting a conversion and before actually modifying the file system, you will be prompted to confirm the operation. If you choose not to proceed with the operation, the file system will be left unchanged.

The process of converting a file system's byte order can fail for various reasons: system failure, power failure, command failures, user interruption, etc. A temporary file is created by fscdsconv as specified by the -f option so that the file system can be restored to its original condition in the event of a failure. In case of a failure, fscdsconv must be reinvoked with the -r option.

To initiate a endian conversion, you must first unmount the file system that will be converted, then use fscdsconv to check and convert.

Example ( performing the conversion on the source machine ):
# umount /export/data
# fscdsconv -v -t os_name=Linux /dev/vx/rdsk/datadg/dvol               << check
...
UX:vxfs fscdsconv: INFO: V-3-26130: There are no files violating the CDS limits for this target.
UX:vxfs fscdsconv: INFO: V-3-26041: The filesystem would need to be byteswapped for use on this target.

# fscdsconv -f /var/tmp/recovery_dvol -t os_name=Linux -e /dev/vx/rdsk/datadg/dvol

If you need to recover the file system to the same system, you can reverse the conversion using the following command:

# fscdsconv -r -f /var/tmp/rollback_dvol /dev/vx/rdsk/datadg/dvol

The following is output from a test conversion of a file system to demonstrate the procedure.  Actual conversion time is  dependent on system IO bandwidth to storage, FS size  and the FS metadata size.  The disk group in this procedure is 'nadg' and the volume tested is 'xvol'.  This volume is being mounted at '/xvol'.

# df -h | grep xvol
/dev/vx/dsk/nadg/xvol 27G 6.2G 20G 25% /xvol

Conversion duration for 6.2G data / 27G total space:

# time fscdsconv -f /xvol_recov os_name=Linux /dev/vx/rdsk/nadg/xvol
UX:vxfs fscdsconv: INFO: V-3-21842: Do you wish to commit to conversion? (ynq) y
real 0m15.611s
user 0m0.199s
sys 0m1.132s

Size of recovery file:

# ls -lh /xvol_recov
-rw------- 1 root root 596M May 23 12:09 /xvol_recov

Recover the file system (the target system was not available):

# fscdsconv -r -f /xvol_recov /dev/vx/rdsk/nadg/xvol
# mount -F vxfs /dev/vx/dsk/nadg/xvol /xvol
# df -k xvol

Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/nadg/xvol
28399616 6180262 20842118 23% /xvol

Filling up the filesystem to demonstrate impact on conversion duration and recovery file size:

# df -h xvol
Filesystem size used avail capacity Mounted on
/dev/vx/dsk/nadg/xvol
27G 19G 7.5G 72% /xvol
# umount /xvol
# time fscdsconv -f /xvol_recov /dev/vx/rdsk/nadg/xvol

UX:vxfs fscdsconv: INFO: V-3-21842: Do you wish to commit to conversion? (ynq) y
real 0m17.518s
user 0m0.329s
sys 0m1.704s
# ls -lh /xvol_recov
-rw------- 1 root root 622M May 23 12:47 /xvol_recov


 
 

Applies To

The fscdsconv command performs file  system  tasks  required for  the Cross-Platform Data Sharing (CDS) migration of VxFS file systems from a source system running AIX or HP-UX or Linux or SunOS to a target system with a different platform.

# man fscdsconv 

     fscdsconv  -v   -t    <target_specifiers> <special>                                          << to verify
     fscdsconv  -e   -f   <recovery_file>   -t   <target_specifiers>  <special>          << to convert and export the FS for use on a specified target.
     fscdsconv  -i   -f    <recovery_file>  <special>                                               << to convert and import the FS for use on the current system.
     fscdsconv  -r   -f    <recovery_file>  <special>                                               << to restore the filesystem to its original state
 
    target_specifiers are :  
                      os_name = AIX or HP-UX or Linux or SunOS
                      arch = sparc or x86 for SunOS
                       bits = 32 or 64 kernel bits of the target system
 
Please refer to the fscdsconv manpage further details.

Was this content helpful?