Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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 installed Fedora 15 on my laptop a couple of days ago, but now i want to install windows next to it.
T do this i have to resize the lvm partition.
vgreduce does NOT resize a PV it - removes it. Since sda2 is the only PV in your VG you can not reduce it. At this point you can "vgremove" to remove the entire volume group if that is your intent.
If your intent is to resize the VG rather than remove it you can use the pvresize command which will allow you to shrink the size of the PV on sda2 then you can use fdisk or parted to resize the partition on /dev/sda.
If you type "man pvresize" it gives you some good information.
So i found out that lv_home and lv_swap are at the beginning of the pv and lv_root at the end. SO how do i move the lv_root on the pv so i get the free space at the and?
Haven't done this. From research it appears moving extents with the same PV can be done on the same disk using "pvmove --alloc" with additional flags. (Do a web search for that in quotes as shown and you'll get lots of hits.) I can't give any guidance as I haven't done that but it appears others have. I've seen it suggested that "pvmove --alloc anywhere" would do it but the "anywhere" makes me think you couldn't be sure where the extents would end up.
You could for this purpose get rid of the swap completely then add it back after the resize is all done by using swapoff to remove your swap usage on the system. (man swapoff). You'd then do an lvremove to remove the swap LV. That will free up the space at the front of the PV which might make your pvmove --alloc move other extents to the front.
***WARNING***
As noted I haven't done the above - try it at your own risk. You should definitely have a full backup before attempting this.
***WARNING***
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.