Thursday, February 18, 2016

Solaris 10 zone, root fs mirroring and detaching


root_disk_mirroring_and_detaching

on control domain,
# echo | format | grep -i 02a5
# ldm add-vdsdev /dev/dsk/c0t6000D310006D640000000000000002A5d0s2 DL23@primary-vds0
# ldm add-vdisk VDL23 DL23@primary-vds0  <LDOM>


On LDOM

# zpool attach rpool2 c0d0s0 c0d1s0
# zpool status
# zpool detach rpool2 c0d0s0
# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c0d1s0
# zpool scrub rpool2
# zpool set autoexpand=on rpool2


1. Verify use-nvramrc = true value is set.
# eeprom use-nvramrc?
# eeprom use-nvramrc?=true
# echo | format
       2. c0d2 <COMPELNT-CompellentVol-0605 cyl 49898 alt 2 hd 8 sec 394>
          /virtual-devices@100/channel-devices@200/disk@2

# grep '/virtual-devices@100/channel-devices@200/disk@2' /etc/path_to_inst
2. Creating device alias
# ls -l /dev/dsk/c0d2s0
lrwxrwxrwx   1 root     root          62 Dec  6  2013 /dev/dsk/c0d2s0 -> ../../devices/virtual-
devices@100/channel-devices@200/disk@2:a

Note: The “a” at the end of the physical device output stands for slice 0.
Slice 1 would have a “b”,
slice 2 would have a “c”, and so on.
To verify other slice, just use the ls -l command with the particular slice
# ls -l /dev/dsk/c0d2s[0-7]
# eeprom nvramrc="devalias priboot /virtual-devices@100/channel-devices@200/disk@2"

# eeprom boot-device
boot-device=disk net
# eeprom boot-device="priboot disk net"
# eeprom boot-device
boot-device=priboot disk net

at the ok prompt, you can verify the information
# init 0
{0}ok printenv nvramrc
{0}ok devalias
if you want to set, use show-disk command
{0}ok show-disk


3. Detach the old LUN (disk)
# zpool status rpool2
# zpool detach rpool2 c0d0s0
# df -h /
Filesystem             size   used  avail capacity  Mounted on
rpool2/ROOT/alt09252015  59G    11G   6.8G    63%    /

# zpool scrub rpool2
# df -h /
Filesystem             size   used  avail capacity  Mounted on
rpool2/ROOT/alt09252015  59G    11G   6.8G    63%    /
# zpool set autoexpand=on rpool2
# df -h /
Filesystem             size   used  avail capacity  Mounted on
rpool2/ROOT/alt09252015  73G    11G   6.8G    63%    /

4. Install bootboot
# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c0d2s0

now, reboot


 

No comments:

Post a Comment