Tim Foster
2007-Jun-14 14:10 UTC
[zfs-discuss] Importing pool from readonly device? (as in ZFS fun!)
Hi Mario, On Thu, 2007-06-14 at 15:23 -0100, Mario Goebbels wrote:> root at bigmclargehuge:~/LargeFiles > zpool import -o readonly testpool > internal error: Read-only file system > Abort (core dumped) > root at bigmclargehuge:~/LargeFiles >Interesting, I''ve just filed 6569720 for this behaviour - thanks for spotting this! Regardless of whether ZFS supports this, we definitely shouldn''t core dump.> Does ZFS still write to the zpool when mounted with readonly?Yep it does - it needs to mark the pool as being in use and no longer exported. I think this is done by changing the pool state nvpair in the vdev_label (if I''m not mistaken - section 1.3.3 in the on-disk format document covers this.) cheers, tim [1] http://www.opensolaris.org/os/community/zfs/docs/ondiskformat0822.pdf -- Tim Foster, Sun Microsystems Inc, Solaris Engineering Ops http://blogs.sun.com/timf
Mario Goebbels
2007-Jun-14 16:23 UTC
[zfs-discuss] Importing pool from readonly device? (as in ZFS fun!)
Trying some funky experiments, based on hearing about this readonly ZFS in MacOSX, I''m kidding around with creating file based pools and then burning them to a CDROM. When running zpool import, it does find the pool on the CD, but then warns about a read-only device, followed by a core dump. root at bigmclargehuge:~/LargeFiles > zpool import -o readonly testpool internal error: Read-only file system Abort (core dumped) root at bigmclargehuge:~/LargeFiles > Does ZFS still write to the zpool when mounted with readonly? If not, why would a readonly device pose a problem? Apart from being gimmicky (Hey, escalator sorting on a CDROM). Now, if I had three DVD burners and some DVD-RWs, I would try a DVD-RAID. :V Thanks. -mg -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 648 bytes Desc: This is a digitally signed message part URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20070614/8a250d1f/attachment.bin>
Mario Goebbels
2007-Jun-14 17:24 UTC
[zfs-discuss] Importing pool from readonly device? (as in ZFS fun!)
> > root at bigmclargehuge:~/LargeFiles > zpool import -o readonly testpool > > internal error: Read-only file system > > Abort (core dumped) > > root at bigmclargehuge:~/LargeFiles > > > Interesting, I''ve just filed 6569720 for this behaviour - thanks for > spotting this! Regardless of whether ZFS supports this, we definitely > shouldn''t core dump.I just remember those weirdo RAID5 controllers we had way back in a different company. It was a pretty expensive thing, with hardware XOR, battery, cache and all that. Going by that, it wasn''t a toy. Yet, when a disk failed, it dropped into readonly mode. I guess if someone were to have a concoction like this, ZFS would break in various ways. That is if someone insists on using hardware RAID. Can''t remember the brand, though.> > Does ZFS still write to the zpool when mounted with readonly? > > Yep it does - it needs to mark the pool as being in use and no longer > exported. I think this is done by changing the pool state nvpair in > the vdev_label (if I''m not mistaken - section 1.3.3 in the on-disk > format document covers this.)Awwww :( Solaris doesn''t by chance ship with a tool to mount devices as readonly, but writes modifications into a (temporary) file? Kind of like various emulators do? Regards, -mg -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 648 bytes Desc: This is a digitally signed message part URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20070614/cbb64aaa/attachment.bin>