Sei sulla pagina 1di 2

Primary mirror disk in root is unavailable or fails

===================================================================================
====
# boot the secondary mirror
ok> boot disk1

## offline and unconfigure failed disk, there may be different options on


unconfiguring a disk depends on the hardware
zpool offline rpool c0t0d0s0
cfgadm -c unconfigure c1::dsk/c0t0d0

# Now you can physically replace the disk, reconfigure it and bring it online
cfgadm -c configure c1::dsk/c0t0d0
zpool online rpool c0t0d0

# Let the pool know you have replaced the disk


zpool replace rpool c0t0d0s0

# if the replace above fails the detach and reattach the primary mirror
zpool deatch rpool c0t0d0s0
zpool attach rpool c0t1d0s0 c0t0d0s0

# make checks
zpool status rpool

# dont forget to add the boot block (see above)

Resize swap area (and dump areas)


==========================================================
# You can resize the swap if it is not being used, first record the size and if it
is being used
swap -l

# resize the swap area, first by removing it


swap -d /dev/zvol/dsk/rpool/swap
zpool set volsize=2G rpool/swap

# Now activate the swap and check the size, if the -a option does not work then use
"swapadd" command
swap -a /dev/zvol/dsk/rpool/swap
swap -l

Note: if you cannot delete the original swap area due to being too busy then simple
add another swap area, the same procedure is used for dump areas but using the
"dumpadm" command

Lost root password in solaris under ZFS


====================================================
# You have two options to recover the root password

## option one
ok> boot -F failsafe
whne requested follow the instructions to mount the rpool on /a
cd /a/etc
vi passwd|shadow
init 6

## Option two
ok boot cdrom|net -s (you can boot from the network or cdroml)
zpool import -R /a rpool
zfs mount rpool/ROOT/zfsBE
cd /a/etc
vi passwd|shadow
init 6

Expand a pools capacity


=================================
# you cannot remove a disk from a pool but you can replace it with a larger disk
zpool replace data01 c1t0d0 c2t0d0
zpool set autoexpand=on data01

Replace failed disk


================================================
# List the zpools and identify the failed disk
zpool list

# replace the disk (can use same disk or new disk)


zpool replace data01 c1t0d0
zpool replace data01 c1t0d0 c1t1d0

# clear any existing errors


zpool clear data01

# scrub the pool to check for anymore errors (this depends on the size of the
zpool as it can take a long time to complete
zpool scrub data01

# you can now remove the failed disk in the normal way depending on your hardware

Potrebbero piacerti anche