Alexander Skwar
2010-Nov-12 14:21 UTC
[zfs-discuss] ZFS doesn''t notice errors in mirrored log device?
Hello! I''ve got a Solaris 10 10/08 Sparc system and use ZFS pool version 15. I''m playing around a bit to make it break. I''ve created a mirrored "Test" pool using mirrored log devices: # zpool create Test \ mirror /dev/zvol/dsk/data/DiskNr1 /dev/zvol/dsk/data/DiskNr2 \ log mirror /dev/zvol/dsk/data/LogMirrorDev1 /dev/zvol/dsk/data/LogMirrorDev2 Now I write some garbage to one of the log mirror devices. # dd if=/dev/urandom of=/dev/zvol/dsk/data/LogMirrorDev2 bs=1024 count=100000 Now I''m checking the status: # zpool status -v Test pool: Test state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM Test ONLINE 0 0 0 mirror ONLINE 0 0 0 /dev/zvol/dsk/data/DiskNr1 ONLINE 0 0 0 /dev/zvol/dsk/data/DiskNr2 ONLINE 0 0 0 logs mirror ONLINE 0 0 0 /dev/zvol/dsk/data/LogMirrorDev1 ONLINE 0 0 0 /dev/zvol/dsk/data/LogMirrorDev2 ONLINE 0 0 0 errors: No known data errors No error? Because th in-memory data is still correct? Let''s export and import it, which should clear this, right? # zpool export Test # zpool import -d /dev/zvol/dsk/data -a # zpool status -v Test pool: Test state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM Test ONLINE 0 0 0 mirror ONLINE 0 0 0 /dev/zvol/dsk/data/DiskNr1 ONLINE 0 0 0 /dev/zvol/dsk/data/DiskNr2 ONLINE 0 0 0 logs mirror ONLINE 0 0 0 /dev/zvol/dsk/data/LogMirrorDev1 ONLINE 0 0 0 /dev/zvol/dsk/data/LogMirrorDev2 ONLINE 0 0 0 errors: No known data errors Still no error? Do I need to scrub first? # sudo zpool scrub Test ; sleep 5 ; zpool status -v Test pool: Test state: ONLINE scrub: scrub completed after 0h0m with 0 errors on Fri Nov 12 15:20:26 2010 config: NAME STATE READ WRITE CKSUM Test ONLINE 0 0 0 mirror ONLINE 0 0 0 /dev/zvol/dsk/data/DiskNr1 ONLINE 0 0 0 /dev/zvol/dsk/data/DiskNr2 ONLINE 0 0 0 logs mirror ONLINE 0 0 0 /dev/zvol/dsk/data/LogMirrorDev1 ONLINE 0 0 0 /dev/zvol/dsk/data/LogMirrorDev2 ONLINE 0 0 0 errors: No known data errors Hm. Why are there no errors shown for the logs devices? Thanks a lot, Alexander -- ? Lifestream (Twitter, Blog, ?) ? http://alexs77.soup.io/ ? ? Chat (Jabber/Google Talk) ? a.skwar at gmail.com , AIM: alexws77 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20101112/a54c0ea3/attachment.html>
Victor Latushkin
2010-Nov-12 14:32 UTC
[zfs-discuss] ZFS doesn''t notice errors in mirrored log device?
On Nov 12, 2010, at 5:21 PM, Alexander Skwar wrote:> Hm. Why are there no errors shown for the logs devices?You need to crash you machine while log devices are in use, then you''ll see some reads on the next reboot. "In use" here means that system is actively writing to log devices at the time of crash. And as long as log blocks are short-lived, it may be a challenge to overwrite those that are still in use at the time of crash, unless you do it after a crash and before next boot.. Victor
Edward Ned Harvey
2010-Nov-13 04:33 UTC
[zfs-discuss] ZFS doesn''t notice errors in mirrored log device?
> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- > bounces at opensolaris.org] On Behalf Of Alexander Skwar > > I''ve got a Solaris 10 10/08 Sparc system and use ZFS pool version 15. I''m > playing around a bit to make it break. > > Now I write some garbage to one of the log mirror devices. > > # dd if=/dev/urandom of=/dev/zvol/dsk/data/LogMirrorDev2 bs=1024 > count=100000Log devices are generally write-only. They are only read during boot, after an ungraceful crash. It is extremely difficult to get a significant number of GB used on the log device, because they are flushed out to primary storage so frequently. They are not read when you do a scrub. For all these reasons, it will be extremely difficult for you to experimentally produce a checksum error on a log device.
Victor Latushkin
2010-Nov-23 11:21 UTC
[zfs-discuss] ZFS doesn''t notice errors in mirrored log device?
On Nov 13, 2010, at 7:33 AM, Edward Ned Harvey wrote:> Log devices are generally write-only. They are only read during boot, after an ungraceful crash. It is extremely difficult to get a significant number of GB used on the log device, because they are flushed out to primary storage so frequently. They are not read when you do a scrub.This is wrong. We do read ZIL blocks when scrubbing, as you for example can have a filesystem with non-empty ZIL which is not mounted. regards victor
StorageConcepts
2010-Nov-24 14:19 UTC
[zfs-discuss] ZFS doesn''t notice errors in mirrored log device?
See this thread - it dealt with the same question somehow. http://www.mail-archive.com/zfs-discuss at opensolaris.org/msg41715.html Regards, Robert -- This message posted from opensolaris.org