LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-05-2014, 11:19 PM   #1
linuxmantra
Member
 
Registered: Dec 2013
Posts: 104

Rep: Reputation: Disabled
Reduce Logical volume size


[root@redhatserver ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
27G 1.7G 24G 7% /
tmpfs 733M 0 733M 0% /dev/shm
/dev/sda1 485M 33M 428M 8% /boot
/dev/mapper/VolGroup-vol01
17G 70M 16G 1% /option

I want to reduce the size of logical volume /dev/mapper/VolGroup-vol01 to 5G. I made following steps to reduce the lv size:
1. unmount /option
2. e2fsck -f /dev/mapper/VolGroup-vol01
3. resize2fs -p /dev/mapper/VolGroup-vol01 <size of FS>
4. lvreduce -L-12G /dev/mapper/VolGroup-vol01
and so on....
Main problem for me is, how much to put the size of FS in step no 3. I could not figure it out. I can do all, if some one suggest me how to choose the size of FS in step 3.

Thank you in advance.

Last edited by linuxmantra; 05-06-2014 at 07:54 AM.
 
Old 05-05-2014, 11:55 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Any size smaller than the lv will become. Make it one Gig to be safe, then re-run the resize2fs (note the command name) after the lvreduce - without specifying a size, and it will fill the lv.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unable to reduce the size of volume group? karthik-naren Linux - Newbie 6 06-16-2013 06:40 AM
I have spce in volume group but it can not increase the size of logical volume anis123 Linux - Newbie 14 04-16-2012 07:23 AM
Unable to reduce the size of volume group? pinga123 Linux - Newbie 3 01-04-2012 02:23 AM
how to reduce or logical volume of ext3 filesystem in rhel3es shellarchive Red Hat 3 07-03-2007 12:36 AM
how to reduce logical volume LinuxLover Linux - Enterprise 2 10-29-2005 09:26 AM


All times are GMT -5. The time now is 11:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration