Re: [zfs-discuss] mount race condition?
On 1/28/2009 12:16 PM, Nicolas Williams wrote: On Wed, Jan 28, 2009 at 09:07:06AM -0800, Frank Cusack wrote: On January 28, 2009 9:41:20 AM -0600 Bob Friesenhahn wrote: On Tue, 27 Jan 2009, Frank Cusack wrote: i was wondering if you have a zfs filesystem that mounts in a subdir in another zfs filesystem, is there any problem with zfs finding them in the wrong order and then failing to mount correctly? I have not encountered that problem here and I do have a multilevel mount heirarchy so I assume that ZFS orders the mounting intelligently. well, the thing is, if the two filesystems are in different pools (let me repeat the example): Then weird things happen I think. You run into the same problems if you want to mix ZFS and non-ZFS filesystems in a mount hierarchy. You end up having to set the mountpoint property so the mounts don't happen at boot and then write a service to mount all the relevant things in order. Or set them all to legacy, and put them in /etc/vfstab. That's what I do. I have a directory on ZFS that holds ISO images, and a peer directory that contains mountpoints for loopback mounts of all those ISO's. I set the ZFS to legacy, and then in /etc/vfstab I put the FS containing the ISO files before I list all the ISO's to be mounted. -Kyle Nico ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] mount race condition?
> "fc" == Frank Cusack writes: fc> say you have pool1/data which mounts on /data and pool2/foo fc> which mounts on /data/subdir/foo, From the rest of the thread I guess the mounts aren't reordered across pool boundarires, but I have this problem even for mount-ordering within the same pool if the iSCSI devices that make up a pool in zpool.cache are UNAVAIL at boot (iscsiadm remove discovery-address), then they come online after boot (iscsiadm add discovery-address). Once the devices appear, the pool auto-imports, but it doesn't always mount filesystems in the right order and never NFS-exports them properly. pgp2KeuCbhB8T.pgp Description: PGP signature ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] mount race condition?
On Wed, Jan 28, 2009 at 09:07:06AM -0800, Frank Cusack wrote: > On January 28, 2009 9:41:20 AM -0600 Bob Friesenhahn > wrote: > > On Tue, 27 Jan 2009, Frank Cusack wrote: > >> i was wondering if you have a zfs filesystem that mounts in a subdir > >> in another zfs filesystem, is there any problem with zfs finding > >> them in the wrong order and then failing to mount correctly? > > > > I have not encountered that problem here and I do have a multilevel mount > > heirarchy so I assume that ZFS orders the mounting intelligently. > > well, the thing is, if the two filesystems are in different pools (let > me repeat the example): Then weird things happen I think. You run into the same problems if you want to mix ZFS and non-ZFS filesystems in a mount hierarchy. You end up having to set the mountpoint property so the mounts don't happen at boot and then write a service to mount all the relevant things in order. Nico -- ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] mount race condition?
On Wed, Jan 28, 2009 at 09:32:23AM -0800, Frank Cusack wrote: > On January 28, 2009 9:24:21 AM -0800 Richard Elling > wrote: > > Frank Cusack wrote: > >> i was wondering if you have a zfs filesystem that mounts in a subdir > >> in another zfs filesystem, is there any problem with zfs finding > >> them in the wrong order and then failing to mount correctly? > >> > >> say you have pool1/data which mounts on /data and pool2/foo which > >> mounts on /data/subdir/foo, what if at boot time, pool2 is imported > >> first, what happens? /data would exist but /data/subdir wouldn't > >> exist since pool1/data hasn't been mounted yet. > >> > > > > It is a race condition and the mount may fail. Don't do this, > > unless you also use legacy mounts. Mounts of file systems > > inside a pool works fine because the order is discernable. > > i guess it's ok for the root pool since it's always available and > always first. For the datasets making up a BE, yes. For datasets in the rootpool that don't make up a BE (e.g., /export/home) maybe not, I'm not sure. But yes, that makes sense. ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] mount race condition?
On January 28, 2009 9:24:21 AM -0800 Richard Elling wrote: > Frank Cusack wrote: >> i was wondering if you have a zfs filesystem that mounts in a subdir >> in another zfs filesystem, is there any problem with zfs finding >> them in the wrong order and then failing to mount correctly? >> >> say you have pool1/data which mounts on /data and pool2/foo which >> mounts on /data/subdir/foo, what if at boot time, pool2 is imported >> first, what happens? /data would exist but /data/subdir wouldn't >> exist since pool1/data hasn't been mounted yet. >> > > It is a race condition and the mount may fail. Don't do this, > unless you also use legacy mounts. Mounts of file systems > inside a pool works fine because the order is discernable. i guess it's ok for the root pool since it's always available and always first. -frank ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] mount race condition?
Frank Cusack wrote: > i was wondering if you have a zfs filesystem that mounts in a subdir > in another zfs filesystem, is there any problem with zfs finding > them in the wrong order and then failing to mount correctly? > > say you have pool1/data which mounts on /data and pool2/foo which > mounts on /data/subdir/foo, what if at boot time, pool2 is imported > first, what happens? /data would exist but /data/subdir wouldn't > exist since pool1/data hasn't been mounted yet. > It is a race condition and the mount may fail. Don't do this, unless you also use legacy mounts. Mounts of file systems inside a pool works fine because the order is discernable. -- richard ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] mount race condition?
On January 28, 2009 9:41:20 AM -0600 Bob Friesenhahn wrote: > On Tue, 27 Jan 2009, Frank Cusack wrote: > >> i was wondering if you have a zfs filesystem that mounts in a subdir >> in another zfs filesystem, is there any problem with zfs finding >> them in the wrong order and then failing to mount correctly? > > I have not encountered that problem here and I do have a multilevel mount > heirarchy so I assume that ZFS orders the mounting intelligently. well, the thing is, if the two filesystems are in different pools (let me repeat the example): On January 27, 2009 10:53:18 PM -0800 Frank Cusack wrote: > say you have pool1/data which mounts on /data and pool2/foo which > mounts on /data/subdir/foo, what if at boot time, pool2 is imported > first, what happens? /data would exist but /data/subdir wouldn't > exist since pool1/data hasn't been mounted yet. i would not expect zfs to wait for pool1 to show up; that might never happen. so /data/subdir/foo would be created for pool2/foo to be mounted on, at which point there would seem to be a race condition where /data/subdir is on the root filesystem, not the pool1/data filesystem. any data written into /data/subdir at this time will be masked when pool1 is imported. using root zfs pools made me think of this case. also, my mail gets delivered into ~/Maildir, where each homedir is a zfs filesystem, but now i've decided to also create separate zfs filesytems for each mail spool. i still want them visible in each home directory though. previously, i've only mounted filesystems from different pools in different hierarchies. -frank ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] mount race condition?
On Tue, 27 Jan 2009, Frank Cusack wrote: > i was wondering if you have a zfs filesystem that mounts in a subdir > in another zfs filesystem, is there any problem with zfs finding > them in the wrong order and then failing to mount correctly? I have not encountered that problem here and I do have a multilevel mount heirarchy so I assume that ZFS orders the mounting intelligently. Bob == Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
[zfs-discuss] mount race condition?
i was wondering if you have a zfs filesystem that mounts in a subdir in another zfs filesystem, is there any problem with zfs finding them in the wrong order and then failing to mount correctly? say you have pool1/data which mounts on /data and pool2/foo which mounts on /data/subdir/foo, what if at boot time, pool2 is imported first, what happens? /data would exist but /data/subdir wouldn't exist since pool1/data hasn't been mounted yet. -frank ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss