Extend partition on Ubuntu server inside a VM
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
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?
partitioning hard-drive vmware lvm
add a comment |Â
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?
partitioning hard-drive vmware lvm
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
add a comment |Â
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?
partitioning hard-drive vmware lvm
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?
partitioning hard-drive vmware lvm
edited Apr 19 at 14:00
![](https://i.stack.imgur.com/Qwl2d.jpg?s=32&g=1)
![](https://i.stack.imgur.com/Qwl2d.jpg?s=32&g=1)
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
add a comment |Â
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
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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.
edited Apr 19 at 15:02
answered Apr 19 at 13:48
![](https://i.stack.imgur.com/Qwl2d.jpg?s=32&g=1)
![](https://i.stack.imgur.com/Qwl2d.jpg?s=32&g=1)
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
add a comment |Â
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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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