shrink an lvm partition
I have Fed 17 and Windows installed.
/dev/sda1 ntfs, /dev/sda ntfs, /dev/sda3 ext4 500mb /boot, /dev/sda4 extended 267GB with /dev/sda5 lvm2 pv vg_pedro-bedro I don't like this. I want to shrink sda5 to half its size and install another Linux there. Can I do this, or must I reformat the whole hd?? gparted says it can shrink sda4, but I haven't tried it yet, for fear of losing data. |
You must do (in order):
- shrink the filesystem - shrink the lv - (maybe) shrink the vg - (maybe) shrink the pv. Then allocate a new partition for the new system. The maybe's are because it might be possible to re-use the vg and pv for the new system if LVM. Personally I wouldn't risk it - free up all the space you need and allocate new (logical) partition(s) for the new system. tldp.org has a LVM how-to. |
Actually sda5 is almost certainly used as the Physical Volume (PV) for a Volume Group (VG) so you'll definitely need to shrink the VG and the PV. Prior to doing that you'd have to be sure none of the Logical Volumes (LVs) are using the space. Shrinking the filesystems/LVs should only be necessary if the VG doesn't have free space in it already. Shrinking filesystems is done before shrinking LVs and also should be done only after running an fsck on the filesystem.
You'd really need to read and understand man pages for lvm vgdisplay lvdisplay pvdisplay pvresize lvresize resize2fs (assuming you're using ext2/ext3 filesystems) |
Definitely ???.
A new system doing a pvscan will find it. Must test if two systems can use the same pv/vg (presuming some free space in at least the vg) one day ... |
Quote:
|
All times are GMT -5. The time now is 10:16 PM. |