DISCLAIMER : Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility.If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.


Filesystem commands in AIX

lsfs Lists all filesystems in the /etc/filesystems entry


lsfs -a To list all filesystems (default)


lsfs -q List all filesystems with detailed info (shows size of FS and LV in it. so we can check whether size of LV=size os FS)


lsfs -l Specify the output in list format


lsfs -c Specify the output in column format


lsfs -v jfs Lists all jfs filesystems


chfs -a size=24576 /test Change size of FS /test to 24576(blocks)x 512 bytes  (12 MB)


chfs -a size=+24576 /test Add 24576(blocks)x512 byte  to FS /test


chfs -a size=+64M /test Add 64 MB to /test


chfs -a size=10G /test fix size of the FS /test to 10 GB


chfs -m /test /new Change the mount point from /test to /new


chfs -A /test To auto mount the filesystem test


chfs -d account /test Remove account attribute of /test.(from /etc/filesystems file)


chfs -a splitcopy=/backup -a copy=2 /oracle This will mount the 2nd copy of mirrored filesystem oracle to /backup in read-only mode for backup purpose


crfs -v jfs2 -g newvg -a size=100M -m /test Creates FS /test of type jfs in VG newvg of size 100 MB with default LV.


crfs -v jfs -d /dev/lv00 -m /test Create FS /test of type jfs on device /dev/lv00


rmfs /test Deletes FS /test and associated LV


rmfs -r /test Deletes FS /test its mount point and associated LV


defragfs /test To defragment the file system /test


defragfs -q /test Display the current defrag status of the file system


fsck -y n /dev/lv00 To check the filesystem associated to /dev/lv00 assuming response "yes"


fsck -p /dev/lv00 To restore superblock from backup superblock




No comments:

Post a Comment

Note: Only a member of this blog may post a comment.