I have installed ubuntu 20.04 on an 120GB SSD then I mounted my home folder on a larger disk as /etc/fstab
says the (/home/pc_magas
is my home folder):
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=7bbdd0c0-a528-4144-b05e-10319a15be39 / ext4 errors=remount-ro 0 1
/swapfile none swap sw 0 0
UUID=419d21fa-f1e1-4bca-bbc7-fa71eb3882a1 /mnt ext4 defaults 0 0
/home/pc_magas /mnt/pc_magas none bind
/mnt/var /var none bind
The disks I have are (as sudo dlkid
says):
/dev/sda1: UUID="7bbdd0c0-a528-4144-b05e-10319a15be39" TYPE="ext4" PARTUUID="50b1776c-781e-4a90-af3e-f1af03c714d8"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sdb1: UUID="419d21fa-f1e1-4bca-bbc7-fa71eb3882a1" TYPE="ext4" PARTUUID="000332e6-01"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
/dev/loop11: TYPE="squashfs"
/dev/loop12: TYPE="squashfs"
/dev/loop13: TYPE="squashfs"
/dev/loop14: TYPE="squashfs"
/dev/loop15: TYPE="squashfs"
/dev/loop16: TYPE="squashfs"
/dev/sdg1: UUID="B5F4-61B7" TYPE="vfat"
The hard disk is the /dev/sdb1
having this size:
$ df -h /dev/sdb1
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 458G 3,1G 432G 1% /mnt
And the home folder has this size:
$ df -h /home/pc_magas/
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 110G 103G 1,9G 99% /
So why the mounted home folder has little space even though it is mounted on a different disk?
Also why /home/pc_magas
is mounted on /dev/sda1
as well?
Assumming that
/dev/sda1
is the smallest disk and runs out of space ,you mismounted the/home/pc_magas
as you mentioned on/etc/fstab
. Also I assume that the OS is installed on/dev/sda1
To solve this boot from a live usb. Then mount your disks:
Copy the files from
/mnt/sda1
into/mnt/sdb1
Notice the
-p
option that preserves any file ownership and permissionsAnd then fix the
/etc/fstab
by:sudo nano /mnt/sda1/etc/fstab
Set:
/mnt/pc_magas /home/pc_magas none bind 0 0
Instead of:
/home/pc_magas /mnt/pc_magas none bind
Then the only thing to do it to empty out the
/dev/sda1/home/pc_magas
, keep in mind this is also important because once booted into a normal OS, you will still have lack of space and you cannot release space in/dev/sda1
. The command to do that is:Then boot normally to your host OS anbd enjoy the ubuntu 20.04