0

I have a 500 GB hard disk but unable to use the entire space. The only space available to use is around 200GB. The rest is mounted on /usr. Here is what I get after doing df -h.

    munam@munam-Inspiron-3521:~$ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda1       184G  143G   32G  82% /
    none            4.0K     0  4.0K   0% /sys/fs/cgroup
    udev            3.9G  8.0K  3.9G   1% /dev
    tmpfs           798M  1.5M  797M   1% /run
    none            5.0M     0  5.0M   0% /run/lock
    none            3.9G   80M  3.9G   2% /run/shm
    none            100M   60K  100M   1% /run/user
    /dev/sda5       275G  5.1G  256G   2% /usr
    /dev/sda3        88M   64M   19M  78% /boot

I want to utilise that 300 GB mounted on /usr. I will be really thankful if someone helps me do that. Thanks & Regards.

3 Answers3

1

This solution requires you to backup your existing /usr partition. Remove it. Repartition and format and then restore data. Not using gParted's resize.

Backup your existing /usr as root (see below). And anything else precious to you first of all.

Boot up a live Linux (Gparted Live CD or Ubuntu Live CD) to repartition.

Remove the existing /usr partition, recreate it and format, but make it smaller this time. Make another partition for your data.

Be careful not to remove the wrong partition!

Then restore your data (mount your new /usr partition and extract).

You'll have to edit your system's /etc/fstab to change the disk id.

Then reboot.

To backup your /usr (from the arch wiki backup script):

# tar --xattrs -czpvf /path/to/backup.tgz /usr

To restore from your backup:

# cd /mount/point/of/new/usr
# tar xvzf /path/to/backup.tgz --strip 1
Progrock
  • 486
1

Download GParted Live which is around 200MB and create a bootable GParted USB/CD/DVD using Startup Disk Creator on Ubuntu. Press Super (Windows) button and search for startup disk creator in the Dash.

Boot in to the USB/DVD you just created. You do not have to write commands; everything can be done from the intuitive GUI.

rsl
  • 403
0

Try

sudo apt-get install gparted

Then use it.

But be careful when you use it. If you do some mistake your data may get lost. So try on your home computer first. If you are successful then try on your workplace's computer.