Bring A Disk into SVM Control

Creating Disk Mirrors with SVM

1. prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s – /dev/rdsk/c0t1d0s2

2. metadb –a –c 3 -f c0t0d0s7 c0t1d0s7

3. metainit -f d11 1 1 c0t0d0s0
metainit -f d12 1 1 c0t1d0s0

4. metainit d10 -m d11

5. metaroot d10

6. metainit d21 1 1 c0t0d0s1 <– Notice we changed to
7. metainit d22 1 1 c0t1d0s1 <– slice 1 (s1) for swap

after reboot

8. metattach d10 d12 ——- > For the root mirror

9. metattach d20 d22 ——- > For the swap mirror

=================================

Creating soft partition

# metainit d100 -p -e c1t10d0 2gb

# metainit d200 -p c0t10d0s0 3gb

# metastat -p

d200 -p c0t10d0s0 -o 4194306 -b 6291456

d100 -p c0t10d0s0 -o 1 -b 4194304
#
# metastat

d200: Soft Partition

Device: c0t10d0s0

State: Okay

Size: 6291456 blocks (3.0 GB)

Device Start Block Dbase Reloc

c0t10d0s0 0 No Yes

Extent Start Block Block count

0 4194306 6291456

d100: Soft Partition

Device: c0t10d0s0

State: Okay

Size: 4194304 blocks (2.0 GB)

Device Start Block Dbase Reloc

c0t10d0s0 0 No Yes

Extent Start Block Block count

0 1 4194304

MIRRORING SOFT PARTITION

CREATING MIRROR

# metainit d10 1 1 c0t8d0s1
#
# metainit d11 1 1 c0t9d0s1
#
# metainit d1 -m d10
#
# metattach d1 d11

Create soft partition from mirror :
# metainit d100 -p d1 1gb

d100: Soft Partition is setup
View results with metastat and metastat -p
# metastat -p

d1 -m d10 d11 1

d10 1 1 c0t8d0s1

d11 1 1 c0t9d0s1

d100 -p d1 -o 32 -b 2097152

# metastat

d1: Mirror

Submirror 0: d10

State: Okay

Submirror 1: d11

State: Okay

Pass: 1

Read option: roundrobin (default)

Write option: parallel (default)

Size: 17465344 blocks (8.3 GB)

d10: Submirror of d1

State: Okay

Size: 17465344 blocks (8.3 GB)

Stripe 0:

Device Start Block Dbase State Reloc Hot Spare

c0t8d0s1 0 No Okay Yes

d11: Submirror of d1

State: Okay

Size: 17465344 blocks (8.3 GB)

Stripe 0:

Device Start Block Dbase State Reloc Hot Spare

c0t9d0s1 0 No Okay Yes

d100: Soft Partition

Device: d1

State: Okay

Size: 2097152 blocks (1.0 GB)

Extent Start Block Block count

0 32 2097152
Create your RAID-5 metadevice :
# metainit d5 -r c0t8d0s1 c0t9d0s1 c0t10d0s1
Create soft partitions from the RAID-5 metadevice :
# metainit d200 -p d5 1gb

d200: Soft Partition is setup
#
# metainit d201 -p d5 3gb

d201: Soft Partition is setup
View results with metastat and metastat -p :
# metastat -p

d5 -r c0t8d0s1 c0t9d0s1 c0t10d0s1 -k -i 32b

d200 -p d5 -o 32 -b 2097152

d201 -p d5 -o 2097216 -b 6291456

#
# metastat

d5: RAID

State: Okay

Interlace: 32 blocks

Size: 34930688 blocks (16 GB)

Original device:

Size: 34935360 blocks (16 GB)

Device Start Block Dbase State Reloc Hot Spare

c0t8d0s1 330 No Okay Yes

c0t9d0s1 330 No Okay Yes

c0t10d0s1 330 No Okay Yes

d200: Soft Partition

Device: d5

State: Okay

Size: 2097152 blocks (1.0 GB)

Extent Start Block Block count

0 32 2097152
d201: Soft Partition

Device: d5

State: Okay

Size: 6291456 blocks (3.0 GB)

Extent Start Block Block count

0 2097216 6291456