2

Here is information regarding my disk space consumption.

Command (m for help): p
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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: 0x360c373e
Device     Boot    Start       End   Sectors   Size Id Type
/dev/sda1  *        2048  17577983  17575936   8.4G 83 Linux
/dev/sda2       17580030 976771071 959191042 457.4G  5 Extended
/dev/sda5       17580032  23437311   5857280   2.8G 83 Linux
/dev/sda6       23439360  47773695  24334336  11.6G 82 Linux swap / Solaris
/dev/sda7       47775744  48553983    778240   380M 83 Linux
/dev/sda8       48556032 976771071 928215040 442.6G 83 Linux

But Gparted is not able to change (shrink) the size of home!

My tmp was full and my root is low on space. I used sudo apt-get clean In fact, I transferred the docs from root to home as a workaround.

What are the alternatives? I want to end this by increasing root size but can't able to do it. This is what Gparted shows me:

enter image description here

  • Maybe you can also provide the output of df -- we can't tell if you're disk is simply entirely out of space or how you've divided up your mounts. – Angelo Jan 12 '17 at 18:43
  • @Angelo I have added the results. – Love Grover Jan 12 '17 at 18:54
  • 2
    Moving these partitions around will be a pain. Were you not able to resize home because it was mounted? Try using a live CD to move things around. And make backups of anything you can't lose first. – Angelo Jan 12 '17 at 18:57
  • As mentioned, the best idea would probably (after backing things up of course) be to boot into a LiveCD or LiveUSB environment, and using a tool such as gparted to resize your partitions to taste. – DopeGhoti Jan 12 '17 at 20:20
  • @Angelo Now what to do? – Love Grover Jan 12 '17 at 20:33
3

You can try to create a brand new / partition in the empty space. I can only give you the general outline, not the details for your own system.

It will take meticulous attention to detail, so only attempt this if you have backups. Also note that I have NOT tested this and have not done this in a while, so read through all the steps and make sure you understand and can perform them first.

(1) Run gparted from a live CD so that you can unmount all the partitions for your disk. You won't be able to change / while running from it. If the partitions are mounted when you boot, unmount them.

(2) Create a new larger partition in the extended partition that will be the new root partition. If you want you can move and resize the other partitions in the extended partition as well, but be aware that it may take a long time and if the system shuts off or has a problem in the middle you will lose some data.

(3) Mount the old root partition (sda1) and the new root partition somewhere so you can copy files, e.g. /mnt/old and /mnt/new

(4) Copy the files to your new partition with rsync, e.g.

rsync -avH /mnt/old/ /mnt/new/

(5) Use your original partition as a new /boot partition, e.g.

rsync -avH --delete /mnt/new/boot/ /mnt/old/

(6) Unmount sda1 from /mnt/old and remount it as /mnt/new/boot

(7) Update /mnt/new/etc/fstab to reflect your mount changes: your old root partition (sda1) should now be mounted as /boot and your new partition should be mounted as /

(8) Update the boot loader, e.g.

grub2-install --root-directory=/mnt/new /dev/sda

(9) Reboot your system.

|improve this answer|||||

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.