RW and RO semantic and unable to umount a partition?

Pawel Jakub Dawidek pjd at FreeBSD.org
Sun Nov 9 03:50:18 PST 2008


On Fri, Nov 07, 2008 at 11:21:50AM -0800, Steve Kargl wrote:
> So, I may have done something in the category of "Don't do that!".
> 
> On node n19, I export /dev/ad4s1e and combine it into a mirror
> on node n18 with n18's /dev/ad4s1e.  On n18 I have /dev/mirror/data,
> and I've successfully mounted /dev/mirror/data:
> 
> n18:root[32] mount /dev/mirror/data /data
> 
> Now, I tried the the following:
> 
> On n18, I created /etc/gg.exports
> 
> n18:root[33] cat /etc/gg.exports
> 192.168.0.17 RW /dev/mirror/data
> n18:root[34] ggated -v
> 
> On node n17 (yes, a third system).  I do
> 
> n17:root[08] ggatec create -o rw 192.168.0.18 /dev/mirror/data
> 
> The above command does not create /dev/ggate0.  So, I tried 

Because /dev/mirror/data is already open for writting by UFS. If you
unmount /data on n18, you will be able to attach /dev/mirror/data on n17
for writting.

> ggatec create -o ro 192.168.0.18 /dev/mirror/data
> 
> This created the /dev/ggate0 device.  Now, the interesting
> part
> 
> n17:root[10] mount /dev/ggate0 /mnt
> n17:root[11] ls /mnt
> .snap/  fcurra/ kargl/
> n17:root[12] umount /mnt
> umount: unmount of /mnt failed: Operation not permitted
> n17:root[13] umount -f /mnt
> umount: unmount of /mnt failed: Operation not permitted
> 
> Three questions.  Why is RW not permitted?  Why does umount
> fail?  How the heck to I force umount or the unmounting of /mnt?

Not sure why. It might be that file system changed under you (node n18
modified it), so now n17 sees some strange inconsistencies.

All in all, you can eigher mount the same file system multiple times
read-only OR one time read-write and zero times read-only.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20081109/0fb32c53/attachment.pgp


More information about the freebsd-geom mailing list