[zfs-discuss] zfs unmount versus umount?

2010-09-30 Thread Linder, Doug
Hi Folks,

Is there any technical difference between using zfs unmount to unmount a ZFS 
filesystem versus the standard unix umount command?  I always use zfs 
unmount but some of my colleagues still just use umount.  Is there any reason 
to use one over the other?

Thanks.

Doug Linder
--
Learn more about Merchant Link at www.merchantlink.com.

THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are 
proprietary and confidential information intended only for the use of the 
recipient(s) named above.  If you are not the intended recipient, you may not 
print, distribute, or copy this message or any attachments.  If you have 
received this communication in error, please notify the sender by return e-mail 
and delete this message and any attachments from your computer.
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] zfs unmount versus umount?

2010-09-30 Thread Mark J Musante

On Thu, 30 Sep 2010, Linder, Doug wrote:

Is there any technical difference between using zfs unmount to unmount 
a ZFS filesystem versus the standard unix umount command?  I always 
use zfs unmount but some of my colleagues still just use umount.  Is 
there any reason to use one over the other?


No, they're identical.  If you use 'zfs umount' the code automatically 
maps it to 'unmount'.  It also maps 'recv' to 'receive' and '-?' to call 
into the usage function.  Here's the relevant code from main():


/*
 * The 'umount' command is an alias for 'unmount'
 */
if (strcmp(cmdname, umount) == 0)
cmdname = unmount;

/*
 * The 'recv' command is an alias for 'receive'
 */
if (strcmp(cmdname, recv) == 0)
cmdname = receive;

/*
 * Special case '-?'
 */
if (strcmp(cmdname, -?) == 0)
usage(B_TRUE);


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


Re: [zfs-discuss] zfs unmount versus umount?

2010-09-30 Thread Michael Schuster

On 30.09.10 15:42, Mark J Musante wrote:

On Thu, 30 Sep 2010, Linder, Doug wrote:


Is there any technical difference between using zfs unmount to unmount
a ZFS filesystem versus the standard unix umount command? I always use
zfs unmount but some of my colleagues still just use umount. Is there
any reason to use one over the other?


No, they're identical. If you use 'zfs umount' the code automatically maps
it to 'unmount'. It also maps 'recv' to 'receive' and '-?' to call into the
usage function. Here's the relevant code from main():


Mark, I think that wasn't the question, rather, what's the difference 
between 'zfs u[n]mount' and '/usr/bin/umount'?


HTH
Michael
--
michael.schus...@oracle.com http://blogs.sun.com/recursion
Recursion, n.: see 'Recursion'
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] zfs unmount versus umount?

2010-09-30 Thread Linder, Doug
Michael Schuster [mailto:michael.schus...@oracle.com] wrote:

 Mark, I think that wasn't the question, rather, what's the difference
 between 'zfs u[n]mount' and '/usr/bin/umount'?

Yes, that was the question.  Sorry I wasn't more clear.

Doug Linder
--
Learn more about Merchant Link at www.merchantlink.com.

THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are 
proprietary and confidential information intended only for the use of the 
recipient(s) named above.  If you are not the intended recipient, you may not 
print, distribute, or copy this message or any attachments.  If you have 
received this communication in error, please notify the sender by return e-mail 
and delete this message and any attachments from your computer.

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


Re: [zfs-discuss] zfs unmount versus umount?

2010-09-30 Thread Mark J Musante

On Thu, 30 Sep 2010, Darren J Moffat wrote:


* It can be applied recursively down a ZFS hierarchy


True.


* It will unshare the filesystems first


Actually, because we use the zfs command to do the unmount, we end up 
doing the unshare on the filesystem first.


See the opensolaris code for details:

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libzfs/common/libzfs_mount.c#zfs_unmount
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] zfs unmount versus umount?

2010-09-30 Thread Darren J Moffat

On 30/09/2010 14:49, Linder, Doug wrote:

Michael Schuster [mailto:michael.schus...@oracle.com] wrote:


Mark, I think that wasn't the question, rather, what's the difference
between 'zfs u[n]mount' and '/usr/bin/umount'?


Yes, that was the question.  Sorry I wasn't more clear.


The main differences are:

zfs umount will do all these things that /usr/bin/umount won't do:

* It can be applied recursively down a ZFS hierarchy
* It will unshare the filesystems first

Both ultimately just call umount2(2)

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