Unallocated space
-
@Sebastian-Roth Sorry to be difficult, and thanks for helping. The last link that junkhacker placed in this thread seemed like it would work, when i attempted follow the steps in the link none of the commands appeared to work. I did use the title of the link and found some articles where geared more towards my version Linux. I’m sure my lack of knowledge with Linux is not helping either. What I have is unpartitioned space from that i want to add to the current partition. Check out the graphic above.
-
@sjensen So what are you asking for? Should we post step by step commands? If we don’t know what you have tried so far (and I mean exactly the commands, not just tried it all and didn’t work) and what the outcome was it’s pretty much impossible to help.
-
@Sebastian-Roth Step by step commands would be great. I understand the basic commands to view the partitions, but once I get into the real meat of the process I get confused and concerned I may delete something I’m not supposed to. Again my knowledge of Linux is very minimal. Thanks again.
-
@sjensen You know, I am a bit over it to keep asking you for the commands you tried and the output you got. So this is my very last try.
Run the three commands
pvs
andvgs
andlvs
and post output here. -
-
@sjensen The following commands should work for you. I am not liable for any issue or consequence that may arise from using those commands! Make sure you have a full backup/snapshot of the server and use the commands with precaution and think about it instead of blindly doing copy & paste!!
There are probably different ways of extending your space in this scenario. To keep it as simple as possible for you I decided to not extend the existing LVM physical volume (way more things can go wrong going this way) but adding the new space to the existing logical volume.
So we start by creating a new partition in that unallocated space using GParted. Probably that will be
sda6
then.If that has been achieved you want to create a LVM physical volume (PV) on that new partition.
pvcreate /dev/sda6 Physical volume "/dev/sda6" successfully created
Now extend the volume group (VG) to use that new PV and check afterwards:
vgextend FOGserver-vg /dev/sda6 Volume group "FOGserver-vg" successfully extended pvs PV VG Fmt ... /dev/sda5 FOGserver-vg lvm2 ... /dev/sda6 FOGserver-vg lvm2 ...
After extending the VG you should be able add that new space to the logical volume of your root partition:
lvextend /dev/FOGserver-vg/root /dev/sda6 Extending logical volume root to xx.xx GiB Logical volume root successfully resized
As a final step you need to resize the filesystem to use that new space:
resize2fs /dev/FOGserver-vg/root
-
Thanks this good it helps me to learn a little more about linux. I will let you know the outcome.
-
@sjensen ok so i got through this part: So we start by creating a new partition in that unallocated space using GParted. Probably that will be sda6 then.
If that has been achieved you want to create a LVM physical volume (PV) on that new partition.
Then noticed this warning.
-
@sjensen Hmmm, possibly GParted want’s to format the newly created partition with a filesystem. You don’t want that as we want to add that new partition to an existing filesystem. Just ignore the warning and see if you can mark this partition to be LVM instead of ext4!
It being
sda3
is ok. GParted is creating a primary partition instead of an extended and therefore uses 3 instead of 6 as number. That’s fine. -
The only choice i get for LVM is LVM2pv, would that be ok to use?
-
@sjensen Yes, sounds fine to me.
-
That worked, this is what i see now. I would assume i should go back to the commands you listed before and try to run those?
-
@sjensen said:
I would assume i should go back to the commands you listed before and try to run those?
Yes, just use
/dev/sda3
instead of where I wrote/dev/sda6
… -
Here is the final result. Does this look correct?
-
@sjensen To see if you have more space available where you want it, run
df -h
-
@Sebastian-Roth said in Unallocated space:
df -h
Looks like i’m good to go. Thanks very much for all your help. I will save the commands for future reference.