LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 12: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, 01:33 PM   #2
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
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, 01: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, 02:04 PM   #4
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
What are the PE (physical extend) size of your VG and your PV (see vgdisplay and pvdisplay)?
 
Old 02-13-2007, 02: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, 03:26 PM   #6
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
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, 12: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 10:55 AM
Logical Volume recovery plythgam Linux - Software 2 03-27-2006 06:44 PM
resizing a logical volume nicentral AIX 2 06-11-2005 04:03 PM
logical volume manager plythgam Linux - Software 1 11-08-2004 10:47 AM
Logical Volume Management jatimon Linux - General 0 04-17-2002 02:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:43 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
Open Source Consulting | Domain Registration