From CFS to Local VxFS, and Back Again
One of the really cool things about Storage Foundation Cluster File System (CFS) and Cluster Volume Manager (CVM) is that the on-disk formats they use are identical to those of regular VxFS and VxVM. You can go back and forth with no data conversion.
I recently used the following steps to convert a cluster-mounted, shared dg into a single-instance, private dg (and then back to CFS/CVM) which seems generically useful. Note that this is for Linux; the file system tab location & the _netdev option are platform specific.
1. Pre-activity prep:
Open the cfsmntadm, vxdg, vxprint, vxvol, and mount_vxfs man pages from https://sort.symantec.com/docs
# cat /etc/fstab
# /opt/VRTS/bin/vxprint
Ensure you are on the CVM master node (if you are on 5.1SP1 or higher, you can skip this step)
# /opt/VRTS/bin/vxdctl –c mode
Ensure you are not in the /data directory:
# pwd
2. Umount & Deport the cluster-mounted, shared dg:
# /opt/VRTS/bin/cfsumount /data
# /opt/VRTS/bin/cfsmntadm delete /data
# /opt/VRTS/bin/vxdg deport datadg
3. Import the dg and mount the file system back on the original mount point:
# /opt/VRTS/bin/vxdg import datadg
# /opt/VRTS/bin/vxvol -g datadg startall
Add the following entry to /etc/fstab:
/dev/vx/dsk/datadg/datavol /data _netdev 0 0
# mount /data
4. Confirm the configuration:
# /opt/VRTS/bin/vxprint
# df –k
# cat /etc/fstab
And then, going back to a shared diskgroup and a cluster-mounted file system:
1. Pre-activity prep:
Open the cfsmntadm, vxdg, vxprint, vxvol, and mount_vxfs man pages from https://sort.symantec.com/docs
# cat /etc/fstab
# /opt/VRTS/bin/vxprint
Ensure all disks in the diskgroup are visible from both nodes
# /opt/VRTS/bin/vxdisk list -oalldgs
# /opt/VRTS/bin/vxdisk list –oalldgs (repeat on the other CFS node(s))
Compare the two results.
Ensure you are on the CVM master node (if you are on 5.1SP1 or higher, you can skip this step)
# /opt/VRTS/bin/vxdctl –c mode
Ensure you are not in the /data directory:
# pwd
2. Umount & Deport the cluster-mounted, shared dg:
Remove the following entry from /etc/fstab:
/dev/vx/dsk/datadg/datavol /data _netdev 0 0
# umount /data
# /opt/VRTS/bin/vxdg deport datadg
3. Import the dg as shared, and mount the file system back on the original mount point:
# /opt/VRTS/bin/vxdg –s import datadg
# /opt/VRTS/bin/vxvol -g datadg startall
# /opt/VRTS/bin/cfsmntadm add datadg datavol /data all=
# /opt/VRTS/bin/cfsmount /data
4. Confirm the configuration:
# /opt/VRTS/bin/vxprint
# df –k
# cat /etc/fstab
# /opt/VRTS/bin/cfsmntadm display /data
# /opt/VRTS/bin/cfscluster status
# cat /etc/VRTSvcs/conf/config/main.cf
# ls /data
# ls /data (repeat on the other cfs node(s))
Compare prior two results to confirm the file system is cluster mounted and visible.