ZFS parent/child datasets & bind mounts

nosuch

Member
Jul 5, 2019
19
2
8
46
Hello,

This is a bit of a ZFS noob question so I may just need the right docs link. I'm setting up a ZFS pool & datasets to use for Plex which would consist of a parent "media" directory and subdirectories for "movies" and "tv shows". I've set them all up with zfs create pretty easily on the Proxmox host:

Code:
zfs create /zfs-pool/media
zfs create /zfs-pool/media/movies
zfs create "/zfs-pool/media/tv shows"

My next step would be to bind mount /zfs-pool/media to the LXC container running Plex. However, I read a comment that mentioned that parent zfs datasets (/zfs-pool/media) do not show files in child datasets (/zfs-pool/media/movies). I haven't found that documented, is that accurate? If so, should i delete the /media/movies & /media/tv shows zfs datasets and instead create them with mkdir? In general how is this any different than the above:

Code:
zfs create /zfs-pool/media
cd /zfs-pool/media
mkdir movies
mkdir "tv shows"

Bonus question: I've seen mention of setting size=0 on bind mounts to make them a directory. Is this something that applies in this case?
 
Hi,
in the first scenario you are creating three filesystems with the lower two inheriting the mount point below the parent. You can set properties for example quota on them independently of the parent. If the filesystems are mounted accordingly the files will show up. It's just that the files of the children are not directly part of the parent filesystem.
In the second scenario you only have one filesystem, so all files are part of that filesystem.