Unallocated space



  • I recently moved our fog server to vSphere environment. After the move I added more drive space in vSphere, now on the linux server I see the unallocated space but cannot add it to the current volumes. I tried gparted, the only option i got there was to create a new partition. No option in resize either. Keep in mind as you look at this i do not work with linux much at all.

    d6134456-a41f-40bb-af4b-0fd0a05a7005-image.png



  • @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.


  • Developer

    @sjensen To see if you have more space available where you want it, run df -h



  • Here is the final result. Does this look correct?
    484cae7e-2225-4cb7-9ef7-87fa752327d2-image.png


  • Developer

    @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



  • 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?

    951797db-853b-468e-bdc3-bbe7cd0764dd-image.png


  • Developer

    @sjensen Yes, sounds fine to me.



  • The only choice i get for LVM is LVM2pv, would that be ok to use?


  • Developer

    @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.



  • @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.
    5b29de46-7012-43e5-9b9d-64799571aff7-image.png



  • Thanks this good it helps me to learn a little more about linux. I will let you know the outcome.


  • Developer

    @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
    

    ref




  • Developer

    @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 and vgs and lvs and post output here.



  • @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.


  • Developer

    @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 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.


  • Developer

    @sjensen said in Unallocated space:

    do not work with the version of Linux I’m using

    Well than you might want to share what exactly you did and what the results (outputs) were. We can’t help you if you don’t tell us what you did and what happened.



  • It appears none of the commands listed in the article do not work with the version of Linux I’m using. However i’m very very new to Linux so maybe i’m not doing something wrong.


  • Developer

    @sjensen if it doesn’t exactly match, it should work at least as a rough guide on what you need to do to expand your LVM


Log in to reply
 

363
Online

5.7k
Users

13.0k
Topics

122.0k
Posts