Reduce file system size in unix ??

If online JFS is installed means

#swlist | grep -i "onlinejfs"

#bdf Filesystem
#fuser -cu <FS name>

Then reduce the Fs size first

#fsadm -F vxfs -b "new size in kb" "Mount Directory"

Ex: fsadm -F vxfs -b 1024 /test

Then reduce the lvol size also

#lvreduce -L "newsize in kb" /dev/vg01/lvolname

Ex: lvreduce -L 1024 /dev/vg01/lvol2

If online JFS not installed means

1. Backup all user data

2. Umount the filesystem
   #umount /home

3. Reduce the size
#lvreduce -L "size" /dev/vg01/lvolname

4. Re-create the filesystem

#newfs -F vxfs /dev/vg01/rlvolname

5) Mount the Logical Volume:
mount /dev/vg01/lvolname /mountdir

6) Restore the user data


Post a Comment

Blogger Tips and TricksLatest Tips And TricksBlogger Tricks