Friday, November 16, 2012
How to reduce FileSystem LVM in Redhat 6
Here are steps to reduce filesystem in Linux Redhat 6 (please do full backup before your execute reducing filesystem) :
1. Umount Filesystem
[root@RedHat6]# umount /oravl99
2. Fsck that filesystem.
[root@RedHat6]# e2fsck -f /dev/vg_arch/oravl99
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/vg_arch/oravl99: 11/131072 files (0.0% non-contiguous), 16821/510976 blocks
3. Resize filesystem. example wanto to reduce 1G for existing filesystem
[root@RedHat6]# resize2fs -p /dev/vg_arch/oravl99 1G
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/vg_arch/oravl99 to 262144 (4k) blocks.
Begin pass 3 (max = 16)
Scanning inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/vg_arch/oravl99 is now 262144 blocks long.
4. reduce 1Gb on the filesystem
[root@RedHat6]# lvreduce -L 1Gb /dev/vg_arch/oravl99
WARNING: Reducing active logical volume to 1.00 GiB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce oravl99? [y/n]: y
Reducing logical volume oravl99 to 1.00 GiB
Logical volume oravl99 successfully resized
5. Mount Filesystem
[root@RedHat6]# mount /oravl99
6. Check sizing current filesystem
[root@RedHat6]# df -h /oravl99
/dev/mapper/vg_arch-oravl99
1008M 34M 924M 4% /oravl99
[root@RedHat6]#
7. done
Subscribe to:
Post Comments (Atom)
3 komentar:
There is a amazing explanation..many things gather about it your self...i really enjoy it....
seo company in chennai
Decent to see blog like this...got a more valuable informations..spent a pleasant time with this blog.keep more updates this way..
Self Employment Tax
Tax Preparation Services
Tax Accountant
Tax Advisor
Post a Comment