I've been very busy trying to get Mirror Mounts out the door. Our last task was to fix a find bug:
[tdh@mrx ~]> sudo mount kanigix:/ /mnt [tdh@mrx ~]> cd /mnt [tdh@mrx /mnt]> cd zoo [tdh@mrx zoo]> cd mms [tdh@mrx mms]> ls -la total 20 drwxr-xr-x 5 root sys 5 Jul 19 21:41 . drwxr-xr-x 11 root sys 11 Oct 8 13:08 .. drwxr-xr-x 5 root sys 5 Jul 19 21:41 node1 drwxr-xr-x 5 root sys 5 Jul 19 21:41 node2 drwxr-xr-x 5 root sys 5 Jul 19 21:42 node3 [tdh@mrx mms]> df -F nfs -h Filesystem size used avail capacity Mounted on kanigix:/ 20G 8.9G 11G 46% /mnt kanigix:/zoo 637G 42K 637G 1% /mnt/zoo kanigix:/zoo/mms 637G 31K 637G 1% /mnt/zoo/mms
Now if we try to find, it should mount a subdirectory for us and traverse down it.
[tdh@mrx mms]> find . . ./node3 find: cannot open .: Resource temporarily unavailable
It fails because of a security check to make sure the stat(2) information from before an opendir(2) matches a fstat(2) from after the opendir(2). The pre-stat gets the vnode which will be mounted on and the post-fstat gets the root of the new filesystem.
But now we can see that since the mount took place, that we pass the test which just failed.
[tdh@mrx mms]> df -F nfs -h
Filesystem size used avail capacity Mounted on
kanigix:/ 20G 8.9G 11G 46% /mnt
kanigix:/zoo 637G 42K 637G 1% /mnt/zoo
kanigix:/zoo/mms 637G 31K 637G 1% /mnt/zoo/mms
kanigix:/zoo/mms/node3
637G 31K 637G 1% /mnt/zoo/mms/node3
[tdh@mrx mms]> find .
.
./node3
./node3/sub2
find: cannot open .: Resource temporarily unavailable
[tdh@mrx mms]> df -F nfs -h
Filesystem size used avail capacity Mounted on
kanigix:/ 20G 8.9G 11G 46% /mnt
kanigix:/zoo 637G 42K 637G 1% /mnt/zoo
kanigix:/zoo/mms 637G 31K 637G 1% /mnt/zoo/mms
kanigix:/zoo/mms/node3
637G 31K 637G 1% /mnt/zoo/mms/node3
kanigix:/zoo/mms/node3/sub2
637G 31K 637G 1% /mnt/zoo/mms/node3/sub2
But we puke on the next mirror mount.
The problem is actually deep down in nftw(2C) and you can look at the PSARC case at Add S_IFTRIGGER to st_mode [PSARC/2007/563 FastTrack timeout 10/04/2007]. This is pretty interesting reading. Most people told me that my proposal would generate considerable controversy.
The PSARC community decided that there was still a hole in the security check inside nftw(2C). While I can argue against this, it is pretty hard to rename/move an export on a live filesystem, in the end I decided that a counter-proposal made more sense that mine.
You've got to realize, I've been working on this project for the past 6 months. We were going to putback on Friday - time to turn over onto the pNFS project.
We decided as a group that the new proposal was the right thing to do for both the Mirror Mount project and Solaris (and indirectly OpenSolaris).
It's not at all hard to move an export, not on a server using ZFS with ZFS delegation.
Posted by Nico on October 10, 2007 at 04:30 PM CDT #
BTW, mirror mounts is oh so awesome, and oh so needed (particularly because of servers running ZFS with hundres, thousands of filesystems.
Posted by Nico on October 10, 2007 at 04:31 PM CDT #