-1

I need to expand the root partition '/' on my linux machine to occupy entire available space. I launched a machine with 60 GB storage space. 'lsblk' for my machine is as follows.

$ lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
xvda    202:0    0   60G  0 disk 
├─xvda1 202:1    0  6.4G  0 part /
├─xvda2 202:2    0  290M  0 part /home
├─xvda3 202:3    0  2.5G  0 part /var
├─xvda4 202:4    0  690M  0 part /var/log
├─xvda5 202:5    0  290M  0 part /var/log/audit
└─xvda6 202:6    0  1.5G  0 part /tmp

I need to expand '/' to occupy the remaining space. I tried this -

sudo resize2fs /dev/xvda1
resize2fs 1.42.12 (29-Aug-2014)
The filesystem is already 1674240 (4k) blocks long.  Nothing to do!
MadHatter
  • 79,770
  • 20
  • 184
  • 232

1 Answers1

0

You have to resize the partition before you can resize the filesystem. That might be difficult as there are others behind it.

Boot a livecd with gparted to move/resize. I'd suggest to a LVM based partitioning scheme in the future.

fuero
  • 9,591
  • 1
  • 35
  • 40