Please enter search query.
Search <product_name> all support & community content...
Article: 100023751
Last Published: 2015-09-10
Ratings: 2 0
Product(s): InfoScale & Storage Foundation
Problem
How to collect a metasave from a mounted Veritas (VxFS) file system
Solution
Use the following steps to obtain a VxFS file system Metasave output from a live mounted file system:
1. Create a temporary directory to collect the data
# DIRNAME=/var/tmp/veritas_`date '+%Y%m%d-%H%M%S'`
# mkdir $DIRNAME
1. Create a temporary directory to collect the data
# DIRNAME=/var/tmp/veritas_`date '+%Y%m%d-%H%M%S'`
# mkdir $DIRNAME
2. Create a temporary volume in a different disk group to be able to take a snapshot the file system
Note: For most file systems, 2 GB storage should be sufficient to create the temporary snapshot volume. However, the total size of the snapshot volume required may be larger than 2 GB if the size of the file system metadata itself is larger than 2 GB. In such a case if the Metasave collection fails due to the size of the Metasave being larger than 2 GB, then please increase the size of the snapshot volume and repeat the steps.
3. Create the mount point:
# vxdg init snapdg snapdisk=<daname>
# vxassist -g snapdg make snapvol 2g
Note: For most file systems, 2 GB storage should be sufficient to create the temporary snapshot volume. However, the total size of the snapshot volume required may be larger than 2 GB if the size of the file system metadata itself is larger than 2 GB. In such a case if the Metasave collection fails due to the size of the Metasave being larger than 2 GB, then please increase the size of the snapshot volume and repeat the steps.
3. Create the mount point:
# mkdir /snap_mnt
4. Create the file system level snapshot of the problem file system
Solaris: # /opt/VRTS/bin/mount -F vxfs -o snapof=/<mount-point> /dev/vx/dsk/snapdg/snapvol /snap_mnt
Linux: # /opt/VRTS/bin/mount -t vxfs -o snapof=/<mount-point> /dev/vx/dsk/snapdg/snapvol /snap_mnt
AIX:
# /opt/VRTS/bin/mount -V vxfs -o snapof=/<mount-point> /dev/vx/dsk/snapdg/snapvol /snap_mnt
HPUX: # /opt/VRTS/bin/mount -F vxfs -o snapof=/<mount-point> /dev/vx/dsk/snapdg/snapvol /snap_mnt
Note: The command may not work if you use the OS 'mount' executable, hence you need to use the Veritas 'mount' executable by specifying the full path
5. Run a file system check (fsck) with the -n option on the snapshot volume
Solaris # /opt/VRTS/bin/fsck -F vxfs -o full -n /dev/vx/rdsk/snapdg/snapvol > $DIRNAME/fsck_n.out
Linux # /opt/VRTS/bin/fsck -t vxfs -o full -n /dev/vx/rdsk/snapdg/snapvol > $DIRNAME/fsck_n.out
AIX # /opt/VRTS/bin/fsck -V vxfs -o full -n /dev/vx/rdsk/snapdg/snapvol > $DIRNAME/fsck_n.out
HPUX # /opt/VRTS/bin/fsck -F vxfs -o full -n /dev/vx/rdsk/snapdg/snapvol > $DIRNAME/fsck_n.out
Note: The '-n' option to the fsck command assumes a 'NO' response to all prompts by fsck and does not allow the file system to open for writing. This option helps verify the file system level inconsistencies and does not actually perform any corrections on the file system metadata.
6. Collect the Metasave output from the snapshot of the file system
# ls -l /opt/VRTSspt/FS/MetaSave/metasave*
# /opt/VRTSspt/FS/MetaSave/metasave_<OS-Version> -f $DIRNAME/<volume_name>_metasave.out /dev/vx/rdsk/snapdg/snapvol
Note: The Metasave binary is independent for each OS version and platform. So for instance the metasave binary to use on a Solaris 10 system will be called 'metasave_10' and similarly the Metasave binary to use on a Redhat RHCE 6.x system would be called '
metasave_rhel6_x86_64'. Please use the correct metasave binary for the specific OS platform and version.
7. Verify the collected Metasave output
# /opt/VRTSspt/FS/MetaSave/metasave_<OS-Version> -i $DIRNAME/<volume_name>_metasave.out
> $DIRNAME/<volume_name>_metasave_i.out
8. Collect all the data into a compressed archive which needs to be sent for investigation and analysis
# cd /var/tmp
# tar -cvf $DIRNAME.tar $DIRNAME
# gzip $DIRNAME.tar
9. After the metasave is collected successfully, the snapshot can be removed by umounting the snapshot file system. # umount /snap_mnt
The same volume can then be used for another snapshot again.