> If you umount a ZFS FS that has some other FS's underneath it, then the 
> mount points for the "child" FS needs to be created to have those 
> mounted; that way if you don't export the pool the dirs won't be deleted 
> and next time you import the pool the FS will fail to mount because your 
> mount point is not empty. IMHO this is not a bug.

As far as I see it, the dirs will be created when the filesystem is mounted in 
the wrong order. That has nothing to do with removing dirs on export.

e.g. 

sunsystem9:[private] > zfs list -r -o name,mountpoint,mounted,canmount 
private/vmware
NAME                                MOUNTPOINT                            
MOUNTED  CANMOUNT
private/vmware                      //private/vmware                           
no        on
private/vmware/datastores           //private/vmware/datastores                
no        on
private/vmware/datastores/cdimages  //private/vmware/datastores/cdimages       
yes       on
sunsystem9:[private] > sudo zfs umount private/vmware/datastores/cdimages
sunsystem9:[private] > cd vmware
sunsystem9:[vmware] > find .
.
./datastores
./datastores/cdimages
sunsystem9:[vmware] > cd ..
sunsystem9:[private] > sudo zfs mount private/vmware
cannot mount '//private/vmware': directory is not empty

---> /private/vmware contains subdirs which prevent mounting of private/vmware

sunsystem9:[vmware] > sudo rm -rf datastores
sunsystem9:[private] > sudo zfs mount private/vmware

----> now I removed the dirs, therefore it is working

sunsystem9:[private] > sudo zfs umount private/vmware
sunsystem9:[private] > sudo zfs mount private/vmware/datastores/cdimages

----> that recreates the dir hierarchy /private/vmware/datastores/cdimages

sunsystem9:[private] > sudo zfs umount private/vmware/datastores/cdimages

----> that does not remove these aforementioned dirs

sunsystem9:[private] > sudo zfs mount private/vmware
cannot mount '//private/vmware': directory is not empty

----> obviously that will fail.

So AFAIK those directories will be created on mount but not removed on unmount

The problem is not that exporting will not remove dirs (which I doubt it 
should) but mounting datasets in the wrong order does create to many dirs. 
Which then inhibits mounting of some datasets. 

The dirs blocking the mount are created at import/mount time.

> That's what should be investigated in your case; i know there are some 
> fixes in progress specially for the sharing part but more data is needed 
> to see what's going on here.

what data do you need?

Greetings, Martin
-- 
This message posted from opensolaris.org
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to