Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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 dual boot system, windows and fedora 26. I have shrunk one of windows partitions for about 20Gb. But, I do not know how to extend my linux hardware capacity using this unallocated empty space.
It would be fairly complicated to merge that free space into your linux OS.
It is more complicated by the fact that your linux is lvm.
The normal procedure would be to boot a live USB or DVD and use Gparted. Unmount the 2 logical partitions, sda5 and sda6
You could then increase the size of the extended partition, sda4, and then expand sda6.
You have to be prepared to repair your bootloader - there is a good chance it will fail after that operation.
As I said, that is the normal procedure, but I am not very familiar with lvm, and I don't know if there are special steps you have to take with that...
What about the data I asked for in post #3 ?.
The general scenario would be to increase the extended partition to consume that space, create a partition, pvcreate then add it to the vg then lv. After that resize the appropriate filesystem. None of the names are known to us.
Last edited by syg00; 08-25-2017 at 12:53 AM.
Reason: typo
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
OR, you could partition the free space and mount it at /var or /usr. You'd have to copy all the data over. My /usr is using 36GB, so 24GB in none too much. But my system needs a bit of maintenance. I'm glad your post got me to look at my /usr usage.
LVM is easily the best way to do this. As has been described, first you create "pv's" corresponding to the partitions that you want LVM to be able to dole out. Then, you create "lv's" that consume space from one or more of them. The file system will not perceive that the data is coming from more than one physical area: with LVM, a mount-point no longer corresponds to a physical thing and is no longer confined to that one thing. When the time comes that you need more space (and, it will ...), you can map more space and you don't even have to reboot to do it.
What about the data I asked for in post #3 ?.
The general scenario would be to increase the extended partition to consume that space, create a partition, pvcreate then add it to the vg then lv. After that resize the appropriate filesystem. None of the names are known to us.
Truth is, I just had the result of uuid and all those hex numbers got me thinking that may not be safe to put them all out in the internet, and I didn't find time to read what they really are. So, I just did not send the info.
LVM is easily the best way to do this. As has been described, first you create "pv's" corresponding to the partitions that you want LVM to be able to dole out. Then, you create "lv's" that consume space from one or more of them. The file system will not perceive that the data is coming from more than one physical area: with LVM, a mount-point no longer corresponds to a physical thing and is no longer confined to that one thing. When the time comes that you need more space (and, it will ...), you can map more space and you don't even have to reboot to do it.
I have no idea how LVM can do this. I will search the internet to learn how to work with LVM.
So... what I have done so far is that I installed a free partition tool on windows and moved the unallocated space to the right side of my linux partitions. Then I installed "Gparted" on linux and I tried to resize my /dev/sda6 but it is locked and thought the empty space is just on the right side of it I cannot merge them.
With LVM, we can create logical partitions that can span across one or more physical hard drives. First, the hard drives are divided into physical volumes, then those physical volumes are combined together to create the volume group and finally the logical volumes are created from volume group.
It's important to remember that Linux recognizes partition-tables and automatically assigns numbers to each. So, in the example cited on the page: pvcreate /dev/sda6 would refer to the sixth partition in the first (sda) hard drive.
So, to put it another way:
You define the partitions that can be used for allocation.
You bundle these into a physical volume group.
You create logical volumes from those physical groups.
It is a supremely-flexible system which insulates the operating system (which sees a logical view) from the physical storage setup which furnishes resources to that logical view. The operating system perceives contiguous, uninterrupted space, never knowing that it came from multiple physical places. "Schweet!!"
As others have posted /dev/sda6 is a logical partition which "resides" inside the extended partition /dev/sda4. You can not resize sda6 since there is no more empty space within the extended partition.
Resize /dev/sda4 to include the empty space that exists on the "right side"
Typically Fedora automatically creates a VG with a root and swap LV that reside within the PV i.e /dev/sda6. That would of been apparent if you posted the info as requested by syg00.
Once you resize /dev/sda4 you can as suggested create another partition as a PV and add that space to your existing vg/root LV or resize the root vg/lv to include the newly added space. The first might be slightly easier.
while gparted can manipulate the PV you still need to use command line tools to handle the volume group/logical volume stuff.
So... what I have done so far is that I installed a free partition tool on windows and moved the unallocated space to the right side of my linux partitions. Then I installed "Gparted" on linux and I tried to resize my /dev/sda6 but it is locked and thought the empty space is just on the right side of it I cannot merge them.
Any ideas is greatly appreciated.
The reason you can't do anything with sda6 is you have it mounted. Because you're using it. I suggest DLing gparted by itself and put it on a bootable USB. Boot to that and you'll be able to deal with it.
So... what I have done so far is that I installed a free partition tool on windows and moved the unallocated space to the right side of my linux partitions. Then I installed "Gparted" on linux and I tried to resize my /dev/sda6 but it is locked and thought the empty space is just on the right side of it I cannot merge them.
Any ideas is greatly appreciated.
Now that you have moved the free space around can you post again the output of the following commands
As others have said it may be easier to create a new partition in the empty space, format it as an LVM PV and then add it to your existing VG. You don't need a bootable GParted for that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.