Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to boot from the detached mirror disk of zfs boot environment

5,176 views
Skip to first unread message
Message has been deleted

aixguard

unread,
Mar 23, 2009, 8:17:51 AM3/23/09
to
Hi,Experts
I installed the solaris 10 u6 using zfs boot environment,the
following was the detail info;

root@test # uname -a
SunOS test 5.10 Generic_138888-03 sun4u sparc SUNW
root@test # cat /etc/release
Solaris 10 10/08 s10s_u6wos_07b SPARC
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 27 October 2008
root@test # zpool status
pool: rpool
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror ONLINE 0 0 0
c0t0d0s0 ONLINE 0 0 0
c1t0d0s0 ONLINE 0 0 0

errors: No known data errors

My question is if I detached the c1t0d0s0 from the zpool,may i have
ways to boot from the c1t0d0s0 ???

cindy.sw...@sun.com

unread,
Mar 23, 2009, 11:08:48 AM3/23/09
to


No, you can't do this yet. An existing bug prevents this scenario
from
working as described here:

http://docs.sun.com/app/docs/doc/819-5461/ggpco?a=view

Cindy

darkoth

unread,
Mar 23, 2009, 11:10:06 AM3/23/09
to

Did you run the installboot command after you mirrored?

installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/
rdsk/c1t0d0s0

Also, to allow OpenBoot PROM to boot from the first and the second
disk, you need to update the bootdevice variable. In the following
example, we consider disk1 and disk2 to be device aliases of c0t0d0s2
and c1t0d0s2, respectively.

To update the OpenBoot PROM boot-device variable from the Solaris
environment, type:

eeprom "boot-device=disk1 disk2"

To update the OpenBoot PROM boot-device variable from OpenBoot PROM ok
prompt, type:

ok> setenv boot-device disk1 disk2


If so you can now yank out the primary drive, go to the ok prompt and
boot disk2 and it should boot up just fine.

cindy.sw...@sun.com

unread,
Mar 23, 2009, 12:59:33 PM3/23/09
to

If you did actually detach the root pool disk c1t0d0s0, you would
need to recover by using the following steps.

1. Boot from the network or install media.

2. Exit out of the install or if using boot -s, wait for the shell
prompt.

3. Import your pool, like this:

# zpool import rpool

(Ignore the mount error messages)

4. Attach the c1t0d0s0 disk, like this:

# zpool attach rpool c0t0d0s0 c1t0d0s0

5. Wait for the disk to resilver to complete by using zpool status
command.

6. Add the boot blocks:

# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/
rdsk/c1t0d0s0

7. Shutdown the system.

8. Confirm that you can boot from both root pool disks.

Richard Hamilton

unread,
Mar 26, 2009, 7:11:50 PM3/26/09
to
On 2009-03-23 08:16:11 -0400, aixguard <aixg...@yahoo.com.cn> said:

> Hi,Experts
> I installed the solaris 10 u6 using zfs boot environment,the
> following was the detail info;
>
>
> root@test # uname -a

> SunOS test 5.10 Generic_138888-03 sun4u sparc SUNW,Sun-Fire-15000


> root@test # cat /etc/release
> Solaris 10 10/08 s10s_u6wos_07b SPARC
> Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.

[...]


> NAME STATE READ WRITE CKSUM
> rpool ONLINE 0 0 0
> mirror ONLINE 0 0 0
> c0t0d0s0 ONLINE 0 0 0
> c1t0d0s0 ONLINE 0 0 0
>
> errors: No known data errors
>
>
>
> My question is if I detached the c1t0d0s0 from the zpool,may i have
> ways to boot from the c1t0d0s0 ???

I don't know if you could (or would need to) be able to boot from a detached
mirror since the info on the disk that describes the zfs configuration would
reflect the way things were before you detached it (or worse, the way things
were _after_ you detached it, if it updates zpool.cache before doing the actual
detach).

The reason I say that I don't know why you'd _need_ to do that is that you
should be able to take snapshots and clones (or let LiveUpgrade do that for
you when the time comes for upgrading). Only if you wanted to
physically remove
that disk and put it in a fireproof vault or something can I see a really good
reason for wanting to boot off of a _detached_ disk.

However, I can see a reason for wanting to boot off of either side of a mirror:
so you can boot if a disk fails. That means making both disks bootable. I
think the instructions for how to do that are at
http://docs.sun.com/app/docs/doc/819-5461/ggtia?a=view

abhi.uni...@gmail.com

unread,
Mar 5, 2013, 2:28:08 PM3/5/13
to
i think this will not support for solaris10 but possible for solaris11

Ian Collins

unread,
Mar 5, 2013, 3:16:07 PM3/5/13
to
abhi.uni...@gmail.com wrote:
> i think this will not support for solaris10 but possible for solaris11

What will?

You are replying to a 4 year old post long gone form most servers.

--
Ian Collins

cindy swearingen

unread,
Mar 5, 2013, 3:28:19 PM3/5/13
to
On Mar 5, 1:16 pm, Ian Collins <ian-n...@hotmail.com> wrote:
Yes, but we're still listening...

You still can't boot from a detached root pool disk in either release.

Thanks, Cindy

puishi...@gmail.com

unread,
Mar 22, 2013, 4:43:36 AM3/22/13
to
On a mirrored zpool, install the boot block, shutdown and unplug the disk, or ldm remove-vdisk from LDOM control domain would do.

I just tried in my ldom, it works.

I am tasked to create a test environment in Solaris 10, and make something similar to meta attach/detach with zpool. And i googled into this page. Thanks for the tips and steps =)

cindy swearingen

unread,
Mar 22, 2013, 11:10:22 AM3/22/13
to
Just unplugging the disk and moving it should work, but I'm unfamiliar
with LDOM behavior. Detaching a disk from a pool makes the disk's pool
info inaccessible so you won't be able to boot from a rpool disk that
is detached ( with zpool detach). In theory, you should be able to
unplug a root pool disk, reconnect it to another system and do a force
import (zpool import -f) but this is untested and if something
unforeseen goes wrong (like the device is not recognized or is going
bad), is not something that you should depend on. Plus, the original
rpool won't be too happy about the removed disk.

We're working on better/simpler root pool recovery. Another option is
to use zpool split to split a mirrored root pool. You'll have to do a
few more
steps to make the split off root pool bootable, like boot from media
to rename it.

Thanks, Cindy

sat...@gmail.com

unread,
Sep 23, 2013, 3:15:38 AM9/23/13
to
Hi Cindy,

I checked the Oracle site and they don't support splitting root pool.
http://docs.oracle.com/cd/E19253-01/819-5461/gjooc/index.html

To achieve the same as SVM attach/detach, What i did is just offline the secondary mirror disk. This will have the same effect has breaking the mirror.

You can then boot from either of the disk. When booted from the primary disk, it shows other disk as OFFLINE, If booted from second disk, the first disk show as inaccessible. I tried and it works. Depending on the copy that you need, you can then either ONLINE secondary disk or attach the primary disk to secondary disk.

If one wants to be safe, then they can just plug out the 1st disk and boot from second, then hot plug the 1st and attach it to secondary.

Hope it helps. :)

Thanks!
Satish

cindy.sw...@gmail.com

unread,
Sep 23, 2013, 1:44:08 PM9/23/13
to
Hi Satish,

That doc pointer is old so you can use zpool split with a root pool. You just have to perform a couple more steps to make it bootable.

You must be off lining a root pool disk on an x86 system is my guess. The x86 systems that I have tested automatically roll over to the other root pool disk and boot successfully when one disk in the root pool is off lined. This doesn't work on a SPARC system.

Offlining a disk is a bit different from a detach in ZFS land. Detaching a mirrored disk will remove the pool info.

Thanks, Cindy
0 new messages