[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    writing to RW-mounted UFS2 snapshots - confirmed.
From:       John Kozubik <john () kozubik ! com>
Date:       2004-06-30 19:05:04
Message-ID: 20040630115340.L806-100000 () kozubik ! com
[Download RAW message or body]


It was mentioned earlier this week that UFS2 snapshots could somehow be
mounted read/write and then written to.  I noticed this a few weeks ago
but didn't think much of it.

I have reproduced this:

mksnap_ffs / /snap1
mkdir /snapmount
mdconfig -a -t vnode -f /snap1 -u 4
mount -r /dev/md4 /snapmount

So far so good ... now enter the mounted snapshot and attempt to write a
file:

# cd /snapmount/
# touch test
touch: test: Read-only file system
#

This is the expected behavior.  However:

#
# pwd
/snapmount
# mount -uw /snapmount
# touch test
# echo sldkfslk >> /snapmount/test
#
# cat /snapmount/test
sldkfslk
#

This is unexpected.  You can successfully mount the snapshot read/write
and create and write to files in that snapshot.  You can also write to
files that existed in the snapshot prior to mounting it read/write.

I have confirmed that if you unmount the snapshot and remount it again
normally, the created file(s) still exist in it, and any changes made to
existing files in the snapshot are persistent as well.

I don't know what context this was being discussed in, but this behavior
does indeed exist, and I believe it to be a somewhat serious problem.


-----
John Kozubik - john@kozubik.com - http://www.kozubik.com

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic