0

I have installed 14.04 LTS on a 512GB disk. I am cloning it to a 1TB disk and would like to extend the root (/) partition. Currently the /dev/sda5 partition has both the root (/) and the swap mount points (this is how the install CD configured the disk).

NAME                           MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                              8:0    0   477G  0 disk
├─sda1                           8:1    0   243M  0 part /boot
├─sda2                           8:2    0     1K  0 part
└─sda5                           8:5    0 476.7G  0 part
  ├─datanode--vg-root (dm-0)   252:0    0 220.8G  0 lvm  /
  └─datanode--vg-swap_1 (dm-1) 252:1    0   241G  0 lvm  [SWAP]

I am able to use Gparted to extend the /dev/sda5 partition to use the whole disk but because both the root and swap are mounted to the same partition I have not been able to extend the root (/).

I am new to Linux and am in need of some help.

Thank you.

Mike

0

gparted may not allow you to resize the mounted & active root / partition when you are logged into Ubuntu (i.e. mounted /). There are many solutions to resize the root partition depending on your knowledge and experience. However, I would suggest using the gparted live CD. Burn the iso to USB or CD and boot your system from it. Once booted, you can make changes to the root partition and the root filesystem. Bonus for using gparted is that it gives you GUI.

gparted Live CD

  • I did use the Gparted live CD but there is still the problem of both the root and swap mount points on the same partition. – Mike Aug 17 '18 at 14:24
  • strange. how about if you use the fdisk i.e. linuxconfig.org/… – heavyguidence Aug 17 '18 at 14:27
0

I see that your SWAP is 241GB - you have to reduce the size. It is huge size for SWAP. What I recommend it is to delete the swap partition (datanode--vg-swap_1), extend the root / partition (leave free space for the SWAP partition) and create new SWAP partition with the left free space. This is for your case. The other option is to reduce the SWAP space and extend the root LVM partition.

  • The swap mount is not a partition, it is a mount on a LVM partition. I am not sure how I would delete the swap in this configuration. – Mike Aug 17 '18 at 14:44
  • You can see in this article askubuntu.com/questions/532121/problem-removing-swap-partition Sorry for the link but I am trying to be shorter and we can escape from duplications. – Stefan Aug 17 '18 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.