Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.