lvm resizing and shifting
Craig White
craigwhite at azapple.com
Sat Aug 23 17:13:05 UTC 2008
On Sat, 2008-08-23 at 08:07 -0700, Craig White wrote:
> On Sat, 2008-08-23 at 09:07 +0200, Peter Boy wrote:
> > Am Freitag, den 22.08.2008, 23:05 -0700 schrieb Craig White:
> > > this as a result of resizing/shrinking /dev/VolGroup00/LogVol00 down
> > > from approximately 180 Gb down to 90 Gb (obviously the ext3 filesystem
> > > was resized first because it's working).
> > >
> > > I wanted to create free space in the process to do another install not
> > > in the LVM but apparently the swap portion /dev/VolGroup00/LogVol01 is 1
> > > Gb and I'm guessing that it has to be moved to be contiguous
> > > with /dev/VolGroup00/LogVol00 and that should somehow make the allow the
> > > rest of the space to be free to be re-used in other ways.
> > >
> > > What piece of information am I missing to make the now approx 90Gb free?
> >
> > Not shure if I understand you correctly. You modified the *logical*
> > volumes. This process does not modify the LVM and the physical partition
> > on the disk (sda1). Now there is space in the LVM to create just another
> > logical volume, but that is not what you want.
> >
> > If you wish to create an additional non-LVM you have to create
> > a /dev/sda2 which in turn requires to modify (shrink) the /dev/sda1
> > partition where the LVM is located. I don't know if there are tools
> > available to do that in a safe manner. You may check man pvresize
> >
> > Regarding swap you may disable swap in fstab and simply delete the lv.
> > When you are finished you may recreate and enable it.
> ----
> ah...pvresize
>
> I have to shrink the physical volume too - light bulb finally on,
> thanks.
>
> I'm downloading gpartd live CD because I think this should make it
> easy...will report back.
----
I'm kind of stuck...
I was able to reduce the size of the logical volumes, move the logical
volumes so they are adjacent and then reduce the size of the physical
LVM but I cannot seem to reduce the partition itself and I'm gathering
that this may not be possible.
# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name VolGroup00
PV Size 95.00 GB / not usable 31.81 MB
Allocatable yes
PE Size (KByte) 32768
Total PE 3039
Free PE 127
Allocated PE 2912
PV UUID oAYcCQ-5n28-0C6i-1LLE-voCR-E19v-SQYQK0
# fdisk -l /dev/sda
Disk /dev/sda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00086350
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 24792 199037317+ 8e Linux LVM
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 88G 54G 30G 65% /
/dev/sda1 99M 36M 59M 39% /boot
so in the end, /dev/sda2 remains approximately 200G and even the
gpartd-liveCD cannot resize /dev/sda2 ;-(
Is it even possible?
Craig
More information about the fedora-list
mailing list