Re: [zfs-discuss] zfs exported a live filesystem

2006-12-12 Thread Darren J Moffat

Boyd Adamson wrote:


On 12/12/2006, at 8:48 AM, Richard Elling wrote:


Jim Hranicky wrote:

By mistake, I just exported my test filesystem while it was up
and being served via NFS, causing my tar over NFS to start
throwing stale file handle errors. Should I file this as a bug, or 
should I just not do that :-


Don't do that.  The same should happen if you umount a shared UFS
file system (or any other file system types).
 -- richard


Except that it doesn't:

# mount /dev/dsk/c1t1d0s0 /mnt
# share /mnt
# umount /mnt
umount: /mnt busy
# unshare /mnt
# umount /mnt


If you umount -f it will though!

I don't quite agree that unmounting a UFS filesystem that is exported 
over NFS is the same as running zpool export on the pool.  The 
equivalent to running umount on the UFS file system is running zfs 
umount on the ZFS file system in the pool.


Running zpool export on the pool is closer to removing (cleanly) the 
disks or metadevices that the ufs file system is stored on.


The system is working as designed, the NFS client did what it was 
supposed to do.  If you brought the pool back in again with zpool import 
things should have picked up where they left off.


Whats more you we probably running as root when you did that so you got 
what you asked for - there is only so much protection we can give 
without being annoying!  If you look at the RBAC profiles we currently 
ship for ZFS you will see that there are two distinct profiles, one for 
ZFS File System Management and one for ZFS Storage Management.  The 
reason they are separate is because they work at quite different layers 
in the system with different protections.


Now having said that I personally wouldn't have expected that zpool 
export should have worked as easily as that while there where shared 
filesystems.  I would have expected that exporting the pool should have 
attempted to unmount all the ZFS filesystems first - which would have 
failed without a -f flag because they were shared.


So IMO it is a bug or at least an RFE.

--
Darren J Moffat
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


[zfs-discuss] zfs exported a live filesystem

2006-12-11 Thread Jim Hranicky
By mistake, I just exported my test filesystem while it was up
and being served via NFS, causing my tar over NFS to start
throwing stale file handle errors. 

Should I file this as a bug, or should I just not do that :-

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


Re: [zfs-discuss] zfs exported a live filesystem

2006-12-11 Thread Eric Kustarz

Jim Hranicky wrote:

By mistake, I just exported my test filesystem while it was up
and being served via NFS, causing my tar over NFS to start
throwing stale file handle errors. 


So you had a pool and were sharing filesystems over NFS, NFS clients had 
active mounts, you removed /etc/zfs/zpool.cache, rebooted the machine, 
created a new pool with the same name (and same filesystem names)?


If so, that's not a bug, the NFS clients have no knowledge that you've 
re-created the pool.  Even though your namespace is the same, the 
filehandles will be different since your filesystems are different (and 
have different FSIDs).


eric



Should I file this as a bug, or should I just not do that :-

Ko,
 
 
This message posted from opensolaris.org

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] zfs exported a live filesystem

2006-12-11 Thread Richard Elling

Jim Hranicky wrote:

By mistake, I just exported my test filesystem while it was up
and being served via NFS, causing my tar over NFS to start
throwing stale file handle errors. 


Should I file this as a bug, or should I just not do that :-


Don't do that.  The same should happen if you umount a shared UFS
file system (or any other file system types).
 -- richard
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] zfs exported a live filesystem

2006-12-11 Thread Boyd Adamson


On 12/12/2006, at 8:48 AM, Richard Elling wrote:


Jim Hranicky wrote:

By mistake, I just exported my test filesystem while it was up
and being served via NFS, causing my tar over NFS to start
throwing stale file handle errors. Should I file this as a bug, or  
should I just not do that :-


Don't do that.  The same should happen if you umount a shared UFS
file system (or any other file system types).
 -- richard


Except that it doesn't:

# mount /dev/dsk/c1t1d0s0 /mnt
# share /mnt
# umount /mnt
umount: /mnt busy
# unshare /mnt
# umount /mnt
#
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss