LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 02-13-2007, 01:16 PM   #1
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Rep: Reputation: 30
a doubt on shrinking logical volume


hi,
i am running zod and my partitions are based on lvm.
i read from resize2fs man page as

If you wish to shrink an ext2 partition, first use resize2fs to shrink
the size of filesystem. Then you may use fdisk(8) to shrink the size
of the partition. When shrinking the size of the partition, make sure
you do not make it smaller than the new size of the ext2 filesystem!

now my question is when we resize a partition , the resized no is appropriate.example if i resize a partition to extend or shrink to 500mb , it may be resized between the ranges of 470mb-530mb ,i think.

to shrink a partition they ask me to reduce the ext2 filesytem size first and then the partition second.So how can i predict the exact value of the resized partition , so that i shall reduce the filesystem value first.

is there any methods directly?

or i have to make the the file system to lower size and extend it for the remaining?

thanks for any response
regards,
Nirmal Tom.
 
Old 02-13-2007, 02:33 PM   #2
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
Maybe you are mixing LV and partition here.
If I understand correctly, you want to shrink the file system, and then the logical volume. Do you also want to shrink the underlying harddisk partition, or not?
 
Old 02-13-2007, 02:57 PM   #3
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Original Poster
Rep: Reputation: 30
hi,
i dont want to shrink the the underluing physical partition.i want to shrink the logical volume ,say, from 800mb to 500mb

thanks and regards,
Nirmal Tom.
 
Old 02-13-2007, 03:04 PM   #4
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
What are the PE (physical extend) size of your VG and your PV (see vgdisplay and pvdisplay)?
 
Old 02-13-2007, 03:21 PM   #5
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Original Poster
Rep: Reputation: 30
hi,
from vgdisplay,
PE Size 32.00 MB
from pvdisplay,
PE Size (KByte) 32768

thanks,
Nirmal Tom.
 
Old 02-13-2007, 04:26 PM   #6
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
Right, so if make your new filesystem size a multiple of 32MB, then lvreduce will not adapt that size because it is an multiple of the PE size.

Still, I strongly advise you to take a backup first.
 
Old 02-14-2007, 01:46 AM   #7
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Original Poster
Rep: Reputation: 30
hi,
thanks fpor the infn
regards,
Tom
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Doubt with 5.1 volume control using ALSA malesandro Linux - Software 3 01-11-2007 11:55 AM
Logical Volume recovery plythgam Linux - Software 2 03-27-2006 07:44 PM
resizing a logical volume nicentral AIX 2 06-11-2005 05:03 PM
logical volume manager plythgam Linux - Software 1 11-08-2004 11:47 AM
Logical Volume Management jatimon Linux - General 0 04-17-2002 03:57 PM


All times are GMT -5. The time now is 09:33 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration