kern/122833: [snapshots] [patch] mountd fails on nmount() after UFS snapshot creation with mount

Jaakko Heinonen jh at saunalahti.fi
Mon May 12 10:40:06 UTC 2008


The following reply was made to PR kern/122833; it has been noted by GNATS.

From: Jaakko Heinonen <jh at saunalahti.fi>
To: =?utf-8?B?R2HDq2w=?= Roualland <gael.roualland at dial.oleane.com>
Cc: bug-followup at FreeBSD.org, leon.kos at lecad.fs.uni-lj.si,
	rodrigc at FreeBSD.org, Yar Tikhiy <yar at comp.chem.msu.su>
Subject: Re: kern/122833: [snapshots] [patch] mountd fails on nmount()
	after UFS snapshot creation with mount
Date: Mon, 12 May 2008 13:37:00 +0300

 Hi,
 
 On 2008-05-11, Gaël Roualland wrote:
 >  After looking a bit in mount and mksnap_ffs, this seems due to a 
 >  difference in the way the snapshot is created : mount calls nmount(2), 
 >  while mksnap_ffs only calls mount(2).
 
 This bug occurs because when doing a snapshot with nmount(2) call (with
 "snapshot" option) the "snapshot" option string persists for the mount
 point even after the nmount call. Later nmount(2) calls made by
 mountd(8) fail because the ffs code tries to create a snapshot due to
 "snapshot" option string presence.
 
 You can work around the problem without reboot by removing the option
 string with
 
 	mount -o nosnapshot <mountpoint>
 
 The bug could be worked around in mountd code but IMO a proper fix is
 needed in kernel nmount code.
 
 There are also other ways to reproduce the bug:
 
 # mount -o snapshot /.snap/foo /
 # mount -u -o atime /
 mount: /dev/ad2s1a : Cross-device link
 # mount -o nosnapshot /
 # mount -u -o atime /
 #
 
 -- 
 Jaakko


More information about the freebsd-bugs mailing list