Normally, I would just try stuff to see what worked, but in this case there's real data that I don't want to lose, so thought I'd ask for advice here first.
I have three partitions on this disk, laid out thusly:
|--root--|--swap--|-------------- hda3 (lvm) --------------|
hda3 is the only one using lvm. What I want to do is shrink hda3 from the front, to give a couple of more (contiguous) gigabytes to swap. There's plenty of room. Here's the output of lvdisplay:
Quote:
# lvdisplay
--- Logical volume ---
LV Name /dev/dynamic/usr
VG Name dynamic
LV UUID CDMnar-5290-7F1t-e4wf-Mvw6-ghv9-ombuVG
LV Write Access read/write
LV Status available
# open 1
LV Size 120.00 GB
Current LE 30720
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:0
--- Logical volume ---
LV Name /dev/dynamic/var
VG Name dynamic
LV UUID jdJHED-8bMO-qZ1P-IM9J-unzL-ScqQ-uyBcJU
LV Write Access read/write
LV Status available
# open 1
LV Size 120.00 GB
Current LE 30720
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:1
--- Logical volume ---
LV Name /dev/dynamic/home
VG Name dynamic
LV UUID xjGtYV-04XE-7ihk-tlkR-RrMB-Vljd-d7kun2
LV Write Access read/write
LV Status available
# open 1
LV Size 17.98 GB
Current LE 4602
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:2
|
and here's the output of pvdisplay:
Quote:
# lvm pvs
PV VG Fmt Attr PSize PFree
/dev/hda3 dynamic lvm2 a- 435.96G 177.98G
|
So, there's plenty of room; but what I don't understand is there doesn't seem to be any way to tell lvresize or pvresize how to move the lv's or pv's around. In other words, I want to tell pvresize (and probably fdisk, too, right?) to scoot everything over to the right by a couple of gig, then tell fdisk to increase the swap partition by said amount.
I've found several examples on the net, but none demonstrate how to exercise this fine a control over the starting and ending locations, and, as I say, I'd be much more open to just experimenting if these weren't currently in use with (a lot) of real, live data.
TIA!