Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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
resize2fs (assuming you're using ext2/ext3 filesystems)