1

I'd like to give /dev/root more space on my CentOS 7.4 system.

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        20G   18G  302M  99% /
devtmpfs        7.8G     0  7.8G   0% /dev
tmpfs           7.8G   28K  7.8G   1% /dev/shm
tmpfs           7.8G  826M  7.0G  11% /run
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/sda2       1.8T  2.7G  1.7T   1% /home
tmpfs           1.6G     0  1.6G   0% /run/user/0

As you can see I have more than enough space mounted to /home.

# /sbin/fdisk -l
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0xf2e91416

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        4096    40962047    20478976   83  Linux
/dev/sda2        40962048  3905974271  1932506112   83  Linux
/dev/sda3      3905974272  3907020799      523264   82  Linux swap / Solaris

How can I add 500 GB to /dev/root ?

Is this possible without going into rescue mode?

If not which commands do I need to do it in a Debian based rescue environment?

Edit: Ended up reinstalling with better partitioning.

0

1 Answer 1

0

I can't see any easy way to do this. I don't know how you finished up with / in your boot partition: normally this is mounted as /boot/efi (or it is on Ubuntu at least).

What I would do is:-

  • Back up the whole disc /dev/sda (you'll need to do this anyway), then re-install from scratch, hoping to get the partition structure correct this time.
  • Then from a Live Boot disc mount /dev/sda2 (which is where / should be), maybe at /mnt/newsys, as well as the back-up of /dev/sda1 (/dev/sdb1, perhaps?), maybe at /mnt/oldsys.
  • Now run cp -ua /mnt/oldsys/ /mnt/newsys/.
  • Next mount the back-up of /dev/sda2, perhaps at /mnt/oldhome.
  • Lastly run cp -ua /mnt/oldhome/ /mnt/newsys/home/.

There may be ways to avoid regenerating, but you will probably spend more time trying to avoid it than you would doing it.

Not the answer you're looking for? Browse other questions tagged .