Philip Brown
2012-Mar-16 21:35 UTC
[zfs-discuss] checking/fixing busy locks for zfs send/receive
It was suggested to me by Ian Collins, that doing zfs sends and receives, can render a filesystem "busy". if there isnt a process visible doing this via ps, I''m wondering how one might check if a zfs filesystem or snapshot is rendered "busy" in this way, interfering with an unmount or destroy? I''m also wondering if this sort of thing can mean interference between some combination of multiple send/receives at the same time, on the same filesystem?
Brandon High
2012-Mar-16 22:06 UTC
[zfs-discuss] checking/fixing busy locks for zfs send/receive
On Fri, Mar 16, 2012 at 2:35 PM, Philip Brown <phil at bolthole.com> wrote:> if there isnt a process visible doing this via ps, I''m wondering how > one might check if a zfs filesystem or snapshot is rendered "busy" in > this way, interfering with an unmount or destroy? > > I''m also wondering if this sort of thing can mean interference between > some combination of multiple send/receives at the same time, on the > same filesystem?Look at ''zfs hold'', ''zfs holds'', and ''zfs release''. Sends and receives will place holds on snapshots to prevent them from being changed. -B -- Brandon High : bhigh at freaks.com
Richard Elling
2012-Mar-16 22:49 UTC
[zfs-discuss] checking/fixing busy locks for zfs send/receive
On Mar 16, 2012, at 3:06 PM, Brandon High wrote:> On Fri, Mar 16, 2012 at 2:35 PM, Philip Brown <phil at bolthole.com> wrote: >> if there isnt a process visible doing this via ps, I''m wondering how >> one might check if a zfs filesystem or snapshot is rendered "busy" in >> this way, interfering with an unmount or destroy? >> >> I''m also wondering if this sort of thing can mean interference between >> some combination of multiple send/receives at the same time, on the >> same filesystem? > > Look at ''zfs hold'', ''zfs holds'', and ''zfs release''. Sends and receives > will place holds on snapshots to prevent them from being changed.For most cases, without other breakage, there is a process on each end: one running zfs send, the other running zfs receive. -- richard -- DTrace Conference, April 3, 2012, http://wiki.smartos.org/display/DOC/dtrace.conf ZFS Performance and Training Richard.Elling at RichardElling.com +1-760-896-4422 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20120316/e0a95b5a/attachment.html>
Philip Brown
2012-Mar-16 23:09 UTC
[zfs-discuss] checking/fixing busy locks for zfs send/receive
On Fri, Mar 16, 2012 at 3:06 PM, Brandon High <bhigh at freaks.com> wrote:> On Fri, Mar 16, 2012 at 2:35 PM, Philip Brown <phil at bolthole.com> wrote: >> if there isnt a process visible doing this via ps, I''m wondering how >> one might check if a zfs filesystem or snapshot is rendered "busy" in >> this way, interfering with an unmount or destroy? >> >> I''m also wondering if this sort of thing can mean interference between >> some combination of multiple send/receives at the same time, on the >> same filesystem? > > Look at ''zfs hold'', ''zfs holds'', and ''zfs release''. Sends and receives > will place holds on snapshots to prevent them from being changed. >yup, know about holds. wasnt those. The reason for my question is, I recently ran into a situation where there was a single orphaned zfs filesystem, no snapshots (therefore no holds), no subfilesystems, no clones... and as far as I''m aware, no send or receive active for it. There were a bunch before that time, but they had all completed, I believe. so I''m trying to figure out if there was any kind of left-over lock, and how I might see that. Is there some "zdb" magic?