Why does a copy operation to a directory that serves as a mountpoint not copy the data to the mounted drive?
I bought a 2 terabyte drive and mounted it in a subdirectory within my home directory.
Where /dev/sdb is my 500GB system drive and /dev/sda is my 2TB data drive:
Partition Mountpoint /dev/sdb1 -> / /dev/sdb3 -> /home /dev/sdb2 -> swap /dev/sda1 -> /home/data This all seems to work, and even shows up in df -h properly (i.e., /dev/sda1 is mounted on /home/data [to regenerate the fstab I booted into my arch disk live environment and mounted the partitions to the folders in /mnt that I wanted to partition, running genfstab -U /mnt > /mnt/etc/fstab; it worked])
Last night I set my box to running a 650GB copy operation to /home/data. Imagine my surprise when tons of copy operations failed due to being out of diskspace.
df -h shows that /dev/sdb3 is full but /dev/sda1 is nearly empty (77MB). The mount point is functioning properly, so far as I can tell, but the copy operation put all the data in /dev/sdb3! Presumably, if I unmount the drive, the music will still be in /home/data.
Clearly there is something about mounting and fstab that I am not fully understanding.
The particular entry in fstab reads:
# /dev/sdb1 UUID=<UUID> / ext4 rw,relatime 01 # /dev/sdb3 UUID=<UUID> /home ext4 rw,relatime 02 # /dev/sda1 UUID=<UUID> /home/data ext4 rw,relatime 02 Before regenerating the fstab, I had a swap entry in fstab. I'm not sure why it didn't regenerate.
Update: I managed to get the output of mount:
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) dev on /dev type devtmpfs (rw,nosuid,relatime,size=4051032k,nr_inodes=1012758,mode=755) run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755) /dev/sdb1 on / type ext4 (rw,relatime) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755) cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd) pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime) bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio) cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids) cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct) cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=44,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13569) mqueue on /dev/mqueue type mqueue (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev) configfs on /sys/kernel/config type configfs (rw,relatime) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M) /dev/sdb3 on /home type ext4 (rw,relatime) /dev/sda1 on /home/data type ext4 (rw,relatime) tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=811560k,mode=700,uid=1000,gid=1000)
fstabis correct? It also mountssdb3under/home/dataalthough that is your/homepartition.mountto your question.