Re: [zfs-discuss] resilver of older root pool disk

2010-09-23 Thread Frank Middleton

Bumping this because no one responded. Could this be because
it's such a stupid question no one wants to stoop to answering it,
or because no one knows the answer? Trying to picture, say, what
could happen in /var (say /var/adm/messages), let alone a swap
zvol, is giving me a headache...

On 07/09/10 17:00, Frank Middleton wrote:

This is a hypothetical question that could actually happen:

Suppose a root pool is a mirror of c0t0d0s0 and c0t1d0s0
and for some reason c0t0d0s0 goes off line, but comes back
on line after a shutdown. The primary boot disk would then
be c0t0d0s0 which would have much older data than c0t1d0s0.

Under normal circumstances ZFS would know that c0t0d0s0
needs to be resilvered. But in this case c0t0d0s0 is the boot
disk. Would ZFS still be able to correctly resilver the correct
disk under these circumstances? I suppose it might depend
on which files, if any, had actually changed...

Thanks -- Frank

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] resilver of older root pool disk

2010-09-23 Thread Lori Alt

 On 09/23/10 04:40 PM, Frank Middleton wrote:

Bumping this because no one responded. Could this be because
it's such a stupid question no one wants to stoop to answering it,
or because no one knows the answer? Trying to picture, say, what
could happen in /var (say /var/adm/messages), let alone a swap
zvol, is giving me a headache...

On 07/09/10 17:00, Frank Middleton wrote:

This is a hypothetical question that could actually happen:

Suppose a root pool is a mirror of c0t0d0s0 and c0t1d0s0
and for some reason c0t0d0s0 goes off line, but comes back
on line after a shutdown. The primary boot disk would then
be c0t0d0s0 which would have much older data than c0t1d0s0.

Under normal circumstances ZFS would know that c0t0d0s0
needs to be resilvered. But in this case c0t0d0s0 is the boot
disk. Would ZFS still be able to correctly resilver the correct
disk under these circumstances? I suppose it might depend
on which files, if any, had actually changed...


Booting from the out-of-date disk will fail with the message:

The boot device is out of date. Please try booting from '%s'

where a different device is suggested.

The reason for this is that once the kernel has gotten far enough to 
import the root pool and read all the labels (and thereby determine that 
the device being booted does not have the latest contents), it's too 
late to switch over to a different disk for booting.  So the next best 
action is to fail and let the user explicitly boot from another disk in 
the pool (using whatever means the BIOS provides for this, or by 
selecting a different disk using the OBP interface on sparc platforms).  
Once the system is up, the out-of-date disk will be resilvered.


Ideally, the boot loader should examine all the disks in the root pool 
and boot off one with the most recent contents.  I believe that there is 
a bug filed requesting that this be implemented for sparc platforms.  
It's more difficult with x86 platforms (there are issues with accessing 
more than one disk from within the current boot loader), and I don't 
know what the prospects are for implementing that logic. But in any 
case, the boot logic prevents you from unwittingly booting off an 
out-of-date disk when a more up-to-date disk is online.


Lori





Thanks -- Frank

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] resilver of older root pool disk

2010-09-23 Thread Richard Elling
On Sep 23, 2010, at 3:40 PM, Frank Middleton wrote:

 Bumping this because no one responded. Could this be because
 it's such a stupid question no one wants to stoop to answering it,
 or because no one knows the answer? Trying to picture, say, what
 could happen in /var (say /var/adm/messages), let alone a swap
 zvol, is giving me a headache...

The metadata contains the latest transaction group number, so it is
easy to detect which side of the mirror wins.

That said, I have not tested this for boot, which is a little bit more 
complicated because of the mini-ZFS version in grub -- and grub's
menu.lst is in the root pool.  For non-root pools, ZFS does the right 
thing.
 -- richard

 On 07/09/10 17:00, Frank Middleton wrote:
 This is a hypothetical question that could actually happen:
 
 Suppose a root pool is a mirror of c0t0d0s0 and c0t1d0s0
 and for some reason c0t0d0s0 goes off line, but comes back
 on line after a shutdown. The primary boot disk would then
 be c0t0d0s0 which would have much older data than c0t1d0s0.
 
 Under normal circumstances ZFS would know that c0t0d0s0
 needs to be resilvered. But in this case c0t0d0s0 is the boot
 disk. Would ZFS still be able to correctly resilver the correct
 disk under these circumstances? I suppose it might depend
 on which files, if any, had actually changed...
 
 Thanks -- Frank
 ___
 zfs-discuss mailing list
 zfs-discuss@opensolaris.org
 http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

-- 
OpenStorage Summit, October 25-27, Palo Alto, CA
http://nexenta-summit2010.eventbrite.com

Richard Elling
rich...@nexenta.com   +1-760-896-4422
Enterprise class storage for everyone
www.nexenta.com





___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] resilver of older root pool disk

2010-09-23 Thread Richard Elling
Timing is everything.  Lori is the authoritative answer and makes sense, due
to the limitations at boot.  Thanks Lori! :-)
 -- richard

-- 
OpenStorage Summit, October 25-27, Palo Alto, CA
http://nexenta-summit2010.eventbrite.com

Richard Elling
rich...@nexenta.com   +1-760-896-4422
Enterprise class storage for everyone
www.nexenta.com





___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


[zfs-discuss] resilver of older root pool disk

2010-07-09 Thread Frank Middleton

This is a hypothetical question that could actually happen:

Suppose a root pool is a mirror of c0t0d0s0 and c0t1d0s0
and for some reason c0t0d0s0 goes off line, but comes back
on line after a shutdown. The primary boot disk would then
be c0t0d0s0 which would have much older data than c0t1d0s0.

Under normal circumstances ZFS would know that c0t0d0s0
needs to be resilvered. But in this case c0t0d0s0 is the boot
disk. Would ZFS still be able to correctly resilver the correct
disk under these circumstances? I suppose it might depend
on which files, if any,  had actually changed...

Thanks -- Frank


___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss