kiler129
Dabbler
- Joined
- Apr 16, 2016
- Messages
- 22
I think I did something dumb while playing with my TrueNAS SCALE installation. After installation I created a radidz pool with standard settings. Then I created two datasets:
Then I started copying data via NFS and I ended up with something quite strange:
It looks like the data is being poured into the main mountpoint and not into the child datasets.
After some investigation I think it may be a bug in TrueNAS SCALE thou. I was changing dataset options multiple times and I believe TNS didn't do a proper NFS restart after remounting the ZFS dataset. This essentially caused the NFS to create "home_movies" and "photos" *directories* in the main /mnt/vault hiding the real mounts:
This seems to confirm my thesis but I'm not sure how I really managed to do that and if this is my fault or not.

Code:
root@truenas[/mnt/vault]# ls -R -aslh /mnt/vault /mnt/vault: total 2.0K 512 drwxr-xr-x 4 root root 4 Jul 28 18:06 . 512 drwxr-xr-x 3 root root 3 Jul 28 17:50 .. 512 drwxrwxrwx 2 root root 2 Jul 28 18:04 home_movies 512 drwxr-xr-x 2 root root 2 Jul 28 18:06 photos /mnt/vault/home_movies: total 1.0K 512 drwxrwxrwx 2 root root 2 Jul 28 18:04 . 512 drwxr-xr-x 4 root root 4 Jul 28 18:06 .. /mnt/vault/photos: total 1.0K 512 drwxr-xr-x 2 root root 2 Jul 28 18:06 . 512 drwxr-xr-x 4 root root 4 Jul 28 18:06 .. root@truenas[/mnt/vault]#
Then I started copying data via NFS and I ended up with something quite strange:
Code:
root@truenas[~]# zfs list -r vault NAME USED AVAIL REFER MOUNTPOINT vault 4.24T 11.5T 4.24T /mnt/vault [...] vault/home_movies 140K 11.5T 140K /mnt/vault/home_movies vault/photos 140K 11.5T 140K /mnt/vault/photos
It looks like the data is being poured into the main mountpoint and not into the child datasets.
After some investigation I think it may be a bug in TrueNAS SCALE thou. I was changing dataset options multiple times and I believe TNS didn't do a proper NFS restart after remounting the ZFS dataset. This essentially caused the NFS to create "home_movies" and "photos" *directories* in the main /mnt/vault hiding the real mounts:
Code:
root@truenas[~]# mkdir /tmp/mount root@truenas[~]# mount --bind /mnt/vault /tmp/mount root@truenas[~]# ls -l /tmp/mount/home_movies | wc -l 76 root@truenas[~]# ls -l /mnt/vault/home_movies | wc -l 1 root@truenas[~]# du -hs /tmp/mount/* 1.0T /tmp/mount/home_movies 3.3T /tmp/mount/photos root@truenas[~]# du -h /mnt/vault/ 512 /mnt/vault/home_movies 512 /mnt/vault/photos 1.5K /mnt/vault/
This seems to confirm my thesis but I'm not sure how I really managed to do that and if this is my fault or not.