Available Disk Space

us flag

I have an ubuntu server with 2x 4Tb hard drives. This was set up with Hetzner's install image using software RAID 1.

I'm confused by the output of df -h. It lists 1.9T available for / and 1.6T for /home.

What confuses me is that /home is a sub-directory of /, so does this mean that the total available space here is 1.9T, or does it mean that the total space available is 3.5T of which 1.6T is allocated specifically to /home and 1.9T to the other stuff in / (ie, I could put 1.6T data in /home and a further 1.9T is /tmp for instance)?

Output of df -h

udev             16G     0   16G   0% /dev
tmpfs           3.2G  880K  3.2G   1% /run
/dev/md2        2.0T  1.6G  1.9T   1% /
tmpfs            16G     0   16G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            16G     0   16G   0% /sys/fs/cgroup
/dev/md1        989M   94M  845M  10% /boot
/dev/md3        1.7T   28K  1.6T   1% /home
tmpfs           3.2G     0  3.2G   0% /run/user/0
kz flag

You obviously do not know what a mount point is, and how filesystems in the unix / linux world are working. You should definately read about it, otherwise you will be lost administrating your server...

Short story: Opposed to the windows world, where you have drive letters (C:, D:, etc), in linux all partitions sum up in ONE directory tree - your root ( / ). The rootfs must be mounted at boot time, all other file system can be mounted later (but do not have to). The data of those filesystems are saved in respect to where you are: All data below /home is stored in /dev/md1 (In your case). In the root filesystem, only the empty mount point ( /home ) is stored, everything else is stored inside the mounted device.

In your case this means: you have 2.0 TB available for your system data, and additional 1.7 TB available for your users home directories.

in flag
It's not `one filesystem`. It's one directory tree that can contain many filesystems.
Martin avatar
kz flag
you are correct of course, thank you for the hint!
us flag
@Martin thank you... I wasn't quite clicking how it worked, but now that you've explained it I get it... Its the same as mounting a USB stick for example where in terms of directory structure is a sub-directory of root, but a completely different FS... Thanks for clearing it up

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.