Extend partition on Ubuntu server inside a VM

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












I'm trying to extend my Virtual Machine's hard drive, on Ubuntu 16.04 server and have shut down the VM and increased the HDD size and I can see that /dev/sda is now 500GB in total from the previous 349GB.



Filesystem 1K-blocks Used Available Use% Mounted on
udev 4067536 0 4067536 0% /dev
tmpfs 817544 8956 808588 2% /run
/dev/mapper/owncloud--vg-root 352357500 275943948 58491712 83% /
tmpfs 4087708 0 4087708 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 4087708 0 4087708 0% /sys/fs/cgroup
/dev/sda1 482922 58606 399382 13% /boot
tmpfs 817544 0 817544 0% /run/user/1000



Disk /dev/sda: 500 GiB, 536870912000 bytes, 1048576000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x72ffcef4

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 734001151 732999682 349.5G 5 Extended
/dev/sda5 1001472 734001151 732999680 349.5G 8e Linux LVM


What should I do next?







share|improve this question






















  • Welcome to Ubuntu! :-) What's your actual question? It looks like everything is hunky-dory from an Ubuntu perspective...
    – Fabby
    Apr 19 at 10:09






  • 1




    Hi! Well basically i can see the /dev/sda is seeing 500GB, but the usage is still 83%, so it seems the OS is still configured on a 350GB hdd? I need to extend it to use the new space available on the /dev/sda.. This is what worries me /dev/mapper/owncloud--vg-root 352357500 275943948 58491712 83% /
    – Lee Ryan Padovani Ginies
    Apr 19 at 10:26















up vote
1
down vote

favorite












I'm trying to extend my Virtual Machine's hard drive, on Ubuntu 16.04 server and have shut down the VM and increased the HDD size and I can see that /dev/sda is now 500GB in total from the previous 349GB.



Filesystem 1K-blocks Used Available Use% Mounted on
udev 4067536 0 4067536 0% /dev
tmpfs 817544 8956 808588 2% /run
/dev/mapper/owncloud--vg-root 352357500 275943948 58491712 83% /
tmpfs 4087708 0 4087708 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 4087708 0 4087708 0% /sys/fs/cgroup
/dev/sda1 482922 58606 399382 13% /boot
tmpfs 817544 0 817544 0% /run/user/1000



Disk /dev/sda: 500 GiB, 536870912000 bytes, 1048576000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x72ffcef4

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 734001151 732999682 349.5G 5 Extended
/dev/sda5 1001472 734001151 732999680 349.5G 8e Linux LVM


What should I do next?







share|improve this question






















  • Welcome to Ubuntu! :-) What's your actual question? It looks like everything is hunky-dory from an Ubuntu perspective...
    – Fabby
    Apr 19 at 10:09






  • 1




    Hi! Well basically i can see the /dev/sda is seeing 500GB, but the usage is still 83%, so it seems the OS is still configured on a 350GB hdd? I need to extend it to use the new space available on the /dev/sda.. This is what worries me /dev/mapper/owncloud--vg-root 352357500 275943948 58491712 83% /
    – Lee Ryan Padovani Ginies
    Apr 19 at 10:26













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm trying to extend my Virtual Machine's hard drive, on Ubuntu 16.04 server and have shut down the VM and increased the HDD size and I can see that /dev/sda is now 500GB in total from the previous 349GB.



Filesystem 1K-blocks Used Available Use% Mounted on
udev 4067536 0 4067536 0% /dev
tmpfs 817544 8956 808588 2% /run
/dev/mapper/owncloud--vg-root 352357500 275943948 58491712 83% /
tmpfs 4087708 0 4087708 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 4087708 0 4087708 0% /sys/fs/cgroup
/dev/sda1 482922 58606 399382 13% /boot
tmpfs 817544 0 817544 0% /run/user/1000



Disk /dev/sda: 500 GiB, 536870912000 bytes, 1048576000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x72ffcef4

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 734001151 732999682 349.5G 5 Extended
/dev/sda5 1001472 734001151 732999680 349.5G 8e Linux LVM


What should I do next?







share|improve this question














I'm trying to extend my Virtual Machine's hard drive, on Ubuntu 16.04 server and have shut down the VM and increased the HDD size and I can see that /dev/sda is now 500GB in total from the previous 349GB.



Filesystem 1K-blocks Used Available Use% Mounted on
udev 4067536 0 4067536 0% /dev
tmpfs 817544 8956 808588 2% /run
/dev/mapper/owncloud--vg-root 352357500 275943948 58491712 83% /
tmpfs 4087708 0 4087708 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 4087708 0 4087708 0% /sys/fs/cgroup
/dev/sda1 482922 58606 399382 13% /boot
tmpfs 817544 0 817544 0% /run/user/1000



Disk /dev/sda: 500 GiB, 536870912000 bytes, 1048576000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x72ffcef4

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 734001151 732999682 349.5G 5 Extended
/dev/sda5 1001472 734001151 732999680 349.5G 8e Linux LVM


What should I do next?









share|improve this question













share|improve this question




share|improve this question








edited Apr 19 at 14:00









Fabby

24.3k1352153




24.3k1352153










asked Apr 19 at 9:56









Lee Ryan Padovani Ginies

63




63











  • Welcome to Ubuntu! :-) What's your actual question? It looks like everything is hunky-dory from an Ubuntu perspective...
    – Fabby
    Apr 19 at 10:09






  • 1




    Hi! Well basically i can see the /dev/sda is seeing 500GB, but the usage is still 83%, so it seems the OS is still configured on a 350GB hdd? I need to extend it to use the new space available on the /dev/sda.. This is what worries me /dev/mapper/owncloud--vg-root 352357500 275943948 58491712 83% /
    – Lee Ryan Padovani Ginies
    Apr 19 at 10:26

















  • Welcome to Ubuntu! :-) What's your actual question? It looks like everything is hunky-dory from an Ubuntu perspective...
    – Fabby
    Apr 19 at 10:09






  • 1




    Hi! Well basically i can see the /dev/sda is seeing 500GB, but the usage is still 83%, so it seems the OS is still configured on a 350GB hdd? I need to extend it to use the new space available on the /dev/sda.. This is what worries me /dev/mapper/owncloud--vg-root 352357500 275943948 58491712 83% /
    – Lee Ryan Padovani Ginies
    Apr 19 at 10:26
















Welcome to Ubuntu! :-) What's your actual question? It looks like everything is hunky-dory from an Ubuntu perspective...
– Fabby
Apr 19 at 10:09




Welcome to Ubuntu! :-) What's your actual question? It looks like everything is hunky-dory from an Ubuntu perspective...
– Fabby
Apr 19 at 10:09




1




1




Hi! Well basically i can see the /dev/sda is seeing 500GB, but the usage is still 83%, so it seems the OS is still configured on a 350GB hdd? I need to extend it to use the new space available on the /dev/sda.. This is what worries me /dev/mapper/owncloud--vg-root 352357500 275943948 58491712 83% /
– Lee Ryan Padovani Ginies
Apr 19 at 10:26





Hi! Well basically i can see the /dev/sda is seeing 500GB, but the usage is still 83%, so it seems the OS is still configured on a 350GB hdd? I need to extend it to use the new space available on the /dev/sda.. This is what worries me /dev/mapper/owncloud--vg-root 352357500 275943948 58491712 83% /
– Lee Ryan Padovani Ginies
Apr 19 at 10:26











1 Answer
1






active

oldest

votes

















up vote
1
down vote













What you did was extend the disk itself which is possible in a virtual environment, but not possible in real life as you cannot add more disk platters to an existing disk so the space is there, but it's not allocated to any partitions/volumes yet so boot the VM, ensure all services that need the Logical Volume you want to extend are stopped and do a:



fsadm --ext-offline --yes resize /dev/mapper/owncloud--vg-root 800G


to extend the Logical Volume itself: you're confusing LVMs and partitions: they are fundamentally different, have a look here on TLDP.






share|improve this answer






















  • As you've never accepted an answer on this site before: If one of the answers solved your problem, don't forget to click the grey ☑ at the left of its text, which means Yes, this answer is the most useful of all! ;-)
    – Fabby
    Apr 19 at 13:48










  • So from my understanding, 800G would have to be 500G in my scenario, and regarding the stopping of all services, there's quite alot of services running. So would this best be done from some kind of shell mode where nothing is running? Perhaps recovery mode?
    – Lee Ryan Padovani Ginies
    Apr 23 at 9:47










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026349%2fextend-partition-on-ubuntu-server-inside-a-vm%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













What you did was extend the disk itself which is possible in a virtual environment, but not possible in real life as you cannot add more disk platters to an existing disk so the space is there, but it's not allocated to any partitions/volumes yet so boot the VM, ensure all services that need the Logical Volume you want to extend are stopped and do a:



fsadm --ext-offline --yes resize /dev/mapper/owncloud--vg-root 800G


to extend the Logical Volume itself: you're confusing LVMs and partitions: they are fundamentally different, have a look here on TLDP.






share|improve this answer






















  • As you've never accepted an answer on this site before: If one of the answers solved your problem, don't forget to click the grey ☑ at the left of its text, which means Yes, this answer is the most useful of all! ;-)
    – Fabby
    Apr 19 at 13:48










  • So from my understanding, 800G would have to be 500G in my scenario, and regarding the stopping of all services, there's quite alot of services running. So would this best be done from some kind of shell mode where nothing is running? Perhaps recovery mode?
    – Lee Ryan Padovani Ginies
    Apr 23 at 9:47














up vote
1
down vote













What you did was extend the disk itself which is possible in a virtual environment, but not possible in real life as you cannot add more disk platters to an existing disk so the space is there, but it's not allocated to any partitions/volumes yet so boot the VM, ensure all services that need the Logical Volume you want to extend are stopped and do a:



fsadm --ext-offline --yes resize /dev/mapper/owncloud--vg-root 800G


to extend the Logical Volume itself: you're confusing LVMs and partitions: they are fundamentally different, have a look here on TLDP.






share|improve this answer






















  • As you've never accepted an answer on this site before: If one of the answers solved your problem, don't forget to click the grey ☑ at the left of its text, which means Yes, this answer is the most useful of all! ;-)
    – Fabby
    Apr 19 at 13:48










  • So from my understanding, 800G would have to be 500G in my scenario, and regarding the stopping of all services, there's quite alot of services running. So would this best be done from some kind of shell mode where nothing is running? Perhaps recovery mode?
    – Lee Ryan Padovani Ginies
    Apr 23 at 9:47












up vote
1
down vote










up vote
1
down vote









What you did was extend the disk itself which is possible in a virtual environment, but not possible in real life as you cannot add more disk platters to an existing disk so the space is there, but it's not allocated to any partitions/volumes yet so boot the VM, ensure all services that need the Logical Volume you want to extend are stopped and do a:



fsadm --ext-offline --yes resize /dev/mapper/owncloud--vg-root 800G


to extend the Logical Volume itself: you're confusing LVMs and partitions: they are fundamentally different, have a look here on TLDP.






share|improve this answer














What you did was extend the disk itself which is possible in a virtual environment, but not possible in real life as you cannot add more disk platters to an existing disk so the space is there, but it's not allocated to any partitions/volumes yet so boot the VM, ensure all services that need the Logical Volume you want to extend are stopped and do a:



fsadm --ext-offline --yes resize /dev/mapper/owncloud--vg-root 800G


to extend the Logical Volume itself: you're confusing LVMs and partitions: they are fundamentally different, have a look here on TLDP.







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 19 at 15:02

























answered Apr 19 at 13:48









Fabby

24.3k1352153




24.3k1352153











  • As you've never accepted an answer on this site before: If one of the answers solved your problem, don't forget to click the grey ☑ at the left of its text, which means Yes, this answer is the most useful of all! ;-)
    – Fabby
    Apr 19 at 13:48










  • So from my understanding, 800G would have to be 500G in my scenario, and regarding the stopping of all services, there's quite alot of services running. So would this best be done from some kind of shell mode where nothing is running? Perhaps recovery mode?
    – Lee Ryan Padovani Ginies
    Apr 23 at 9:47
















  • As you've never accepted an answer on this site before: If one of the answers solved your problem, don't forget to click the grey ☑ at the left of its text, which means Yes, this answer is the most useful of all! ;-)
    – Fabby
    Apr 19 at 13:48










  • So from my understanding, 800G would have to be 500G in my scenario, and regarding the stopping of all services, there's quite alot of services running. So would this best be done from some kind of shell mode where nothing is running? Perhaps recovery mode?
    – Lee Ryan Padovani Ginies
    Apr 23 at 9:47















As you've never accepted an answer on this site before: If one of the answers solved your problem, don't forget to click the grey ☑ at the left of its text, which means Yes, this answer is the most useful of all! ;-)
– Fabby
Apr 19 at 13:48




As you've never accepted an answer on this site before: If one of the answers solved your problem, don't forget to click the grey ☑ at the left of its text, which means Yes, this answer is the most useful of all! ;-)
– Fabby
Apr 19 at 13:48












So from my understanding, 800G would have to be 500G in my scenario, and regarding the stopping of all services, there's quite alot of services running. So would this best be done from some kind of shell mode where nothing is running? Perhaps recovery mode?
– Lee Ryan Padovani Ginies
Apr 23 at 9:47




So from my understanding, 800G would have to be 500G in my scenario, and regarding the stopping of all services, there's quite alot of services running. So would this best be done from some kind of shell mode where nothing is running? Perhaps recovery mode?
– Lee Ryan Padovani Ginies
Apr 23 at 9:47

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026349%2fextend-partition-on-ubuntu-server-inside-a-vm%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491