Friday 12 June 2015

Test Solaris Root Mirror

Here's the situation. Being the good UNIX SysAdmin that you are, one of the first things you do is mirror the rootpool. You do something like:

zpool attach -f rpool c0t5000CCA03C5A7C00d0 c0t5000CCA03C5C19CCd0


...wait for the mirror to finish resilvering...

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

(or better use - see comments below for why - :bootadm install-bootloader)

(Notice that my disk devices don't use slices - there'd be an "s0" at the end of the disk names - older ZFS systems needed to the root disk to be on a slice - this has fallen away)

So to test that you boot off the root disk - you go to ok prompt and try to boot off the second disk

shutdown -y -i0 -g0
...
ok> boot disk1
Boot device: /pci@3c0/pci@1/pci@0/pci@2/scsi@0/disk@p0  File and args:
ERROR: /packages/deblocker: Last Trap: Fast Data Access MMU Miss

So that's a bit of a bitch. Luckily, this is only a test. Start up your machine normally and then shut down with an init 0. Somehow rebooting with an init, sorts this out.

(If it wasn't a test, you can try to specify the path old school. Your path you can figure out - though I've had hit and miss success - by running devalias and scsi-probe-all and doing a path similar to /pci@400/pci@1/pci@0/pci@0/LSI,sas@0/disk@w5000cca02584ad19,0:a. - Sidenote: If that doesn't work I've had limited success by adding a to the last number before the comma).

Either way, once you've got a booted system. You can check which disk you're booted from by running prtconf -vp |grep bootpath.

This post is a little neither here nor there - but that's because my testing has brought various results and was done whil I was changing from a sas root disk to an ssd root disk. I'll update it as I retest.

5 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. I end up with the same situation, the ldom is not booting with the secondary disk, do you have any fix for this ??

    ReplyDelete
  3. Unfortunately not. You could try booting off a USB and shutting down with an init 0. Like I said, I had limited luck playing around with changing boot device string but it was a bit of a hit and miss affair. Sorry I can't be of more help. Hope it goes well your side.

    ReplyDelete
    Replies

    1. Thanks Jabs, the issue is installing the boot block by the command ---- installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/cwtxdys0

      Again today I detach the secondary disk and addded it again, but installed the boot blcok by the below command.

      bootadm install-bootloader

      now the ldom is booting in both disks, am successfully able to detach the old disk from the rpool

      Please have a look at my blog and leave your comments :)

      https://solaris-scripting-judi.blogspot.com/2018/11/replace-zfs-root-pool-to-another-disk.html

      Delete
  4. Thanks for that Judi! I'll edit my post and I've added your blog to my blog roll too.

    ReplyDelete

Note: only a member of this blog may post a comment.