Tuesday, December 14, 2010

File System Administration - VxVM - VxFS

This post is common to Solaris, HP-UX, Linux and AIX Operating Systems.

How to create the VxFS Filesystem ?

On Solaris :

To create and mount a VxFS filesystem :
# mkfs -F vxfs /dev/vx/rdsk/datadg/datavol
# mkdir /data
# mount -F vxfs /dev/vx/dsk/datadg/datavol /data

To create and mount a UFS filesystem :
# newfs /dev/vx/rdsk/datadg/datavol
# mkdir /data
# mount /dev/vx/dsk/datadg/datavol /data

On Linux :
To create and mount a VxFS filesystem :
# mkfs -t vxfs /dev/vx/rdsk/datadg/datavol
# mkdir /data
# mount -t vxfs /dev/vx/dsk/datadg/datavol /data

On HP-UX :
To create and mount a VxFS filesystem :
# mkfs -F vxfs /dev/vx/rdsk/datadg/datavol
# mkdir /data
# mount -F vxfs /dev/vx/dsk/datadg/datavol /data

To create and mount a HFS filesystem :
# newfs -F hfs /dev/vx/rdsk/datadg/datavol
# mkdir /data
# mount -F hfs /dev/vx/dsk/datadg/datavol /data

On AIX :
To create and mount a VxFS filesystem :
# mkfs -V vxfs /dev/vx/rdsk/datadg/datavol
# mkdir /data
# mount -V vxfs /dev/vx/dsk/datadg/datavol /data

To create and mount a VxFS filesystem using crfs :
# crfs -v vxfs -d /dev/vx/rdsk/datadg/datavol -m /data -A yes
# mount /data

To create and mount a jfs2 filesystem using crfs :
# crfs -v jfs2 -d /dev/vx/rdsk/datadg/datavol -m /data -A yes
# mount /data

Note:
You have to add the filsystem details to the OS Filesystem table (/etc/fstab or /etc/vfstab) in solaris, HP and Linux. If you use crfs, filesystem table will be updated automatically in AIX.

Additional Commands :

1. To create a VxFS filesystem in solaris with nolargefiles and block size of 2048 :
# mkfs -F vxfs -o nolargefiles -o bize=2048 /dev/vx/rdsk/datadg/datavol

Note: By default, largefiles flag i enabled and the default block size is 1024.

2. To create a VxFS filesystem of version 4 in solaris :
# mkfs -F vxfs -o version=4 /dev/vx/rdsk/datadg/datavol

Note:  Default VxFS filesystem version is 6 in VxFS 4.1

3. To upgrade the file system layout version :
# vxupgrade -n 5 /data

Note: You must upgrade in stages only. ie., from version 4 to 5, and then version 5 to 6.

4. To display the current file system layout version :
# vxupgrade /data

5. To monitor directory fragramentation on a file system :
# fsadm -D /data


6. To monitor extent fragramentation on a file system :
# fsadm -E /data

7.  To do directory fragramentation on a file system :
# fsadm -d -D /data

8.  To do extent fragramentation on a file system :
# fsadm -e -E -s /data

9. To check full file system consistency using intent log :
# fsck -F vxfs -o full /dev/vx/rdsk/datadg/datavol


10. To check file system consistency with out using intent log :
# fsck -F vxfs -o nolog /dev/vx/rdsk/datadg/datavol

11. To check two file systems in parallel :
# fsck -F vxfs -o p /dev/vx/rdsk/datadg/datavol /dev/vx/rdsk/datadg/dbvol

12. To display intent log information of a file system :
# fsadm -L /data

13. To change the log size :
# fsadm -F vxfs -o logsize=256m /data

Note:
a. Default intent log size depends on the file system size.
b. Minimum log size is 256 KB and maximum size is 256 MM.

14. To enable FCL (File Change Log) on a file system :
# fcladm on /data


15. To disable FCL on a file system :
# fcladm off /data

16. To remove FCL from a file system  (You must switch off FCL before removing it):
# fcladm rm /data

17. To display the current FCL state of a file system :
# fcladm state /data

No comments:

Post a Comment

Post a Comment