This is driving me crazy - I'm nullfs(5) mounting a folder from /data to $HOME/data. The source /data folder has three subfolders:
Now after I mount it with:
Looking into the mounted point, I get:
Notice that the user, group, and timestamp on the media/ folder are all inconsistent from the source, while the other two folders are as expected!!
Is this a bug? Or am I doing something extremely stupid? It's driving me crazy. I'm using 11.0-RELEASE-p1 and ZFS.
[Update] solved this problem. It ended up that I wasn't aware that /data/media is a separate ZFS dataset. So mounting /data doesn't bring /data/media into the jail. I had to explicitly mount /data/media using nullfs(5). I was inspired by this post.
Code:
[john@host ~]$ ls -la /data
total 27
d-wxrwx--x 5 root wheel 5 Feb 4 10:32 .
drwxr-xr-x 19 root wheel 26 Feb 4 10:15 ..
drwxr-x--- 2 john media 3 Feb 4 10:32 foo
drwxr-x--- 6 john media 6 Feb 3 23:45 media
drwxrwxr-x 2 john media 107 Feb 4 01:01 repos
Now after I mount it with:
Code:
rmdir ~/data # making sure it's a "fresh" folder
mkdir ~/data
sudo mount -t nullfs -o ro /data ~/data
Looking into the mounted point, I get:
Code:
[john@host ~/data]$ ll
total 19
d-wxrwx--x 5 root wheel 5 Feb 4 10:32 .
drwxr-xr-x 19 john john 55 Feb 4 11:05 ..
drwxr-x--- 2 john media 3 Feb 4 10:32 foo
drwxr-xr-x 2 root wheel 2 Jul 17 2017 media
drwxrwxr-x 2 john media 107 Feb 4 01:01 repos
Notice that the user, group, and timestamp on the media/ folder are all inconsistent from the source, while the other two folders are as expected!!
Code:
/data/media/ : drwxr-x--- 6 john media 6 Feb 3 23:45 media
~/data/media/ : drwxr-xr-x 2 root wheel 2 Jul 17 2017 media
Is this a bug? Or am I doing something extremely stupid? It's driving me crazy. I'm using 11.0-RELEASE-p1 and ZFS.
[Update] solved this problem. It ended up that I wasn't aware that /data/media is a separate ZFS dataset. So mounting /data doesn't bring /data/media into the jail. I had to explicitly mount /data/media using nullfs(5). I was inspired by this post.