Sunday, March 08, 2026

Solstice DiskSuite Command Summary



Having a sort out and found this course handout originally written by John Furlong - Sun Trainer in 23/10/2002  (Free to distribute).

Reminder of days gone by, DiskSuite 1.1 on SunOS 4.1 to Solaris Volume Manager Solaris 10, these were day-to-day commands for me.


State Database Operations.

Operation

Command Example.


Create first database replica

metadb –a –f c0t0d0s7

Create additional replicas (2 copies in single partition)

metadb –a –c2 c1t1d0s7

Create the database as defined in the mddb99 entry in md.tab.

metadb –a mddb99

Delete replicas.

metadb –d c1t0d0s7

Check status of databases.

metadb


Simple Metadevice Operations.

Operation

Command Example.


Create metadevice with a single partition.

metainit d22 1 1 c1t5d0s3

Create metadevice, concat over 2 partitions.

metainit d22 2 1 c1t5d0s5 1 c1t6d0s4

Create metadevice, striped across 2 partitions.

metainit d22 1 2 c1t5d0s4 c2t5d0s4

Create metadevice striped across 2 partitions with a chunk size of 64K

metainit d22 1 2 c1t5d0s4 c2t5d0s4 -i 64K

Create all metadevices in md.tab

metainit –a

Create a raid5 metadevice over 3 partitions.

metainit d50 –r c1t0d0s3 c2t0d0s3 3t0d0s3

Delete metadevices.

metaclear d50 (Single), metaclear –a (ALL)

Check status of metadevices.

metastat

Create a metatrans device.

metainit d50 –t c1t5d0s5(Master) c1t2d0s1(Log)


Growing Metadevices.

Operation

Command Example.


Attach single partition to metadevice.

metattach d45 c1t5d0s4

Attach a 2 partition stripe to metadevice.

metattach d45 c1t4d0s5 c2d4d0s5

Grow file system on resized metadevice.

growfs –M /mnt /dev/md/rdsk/d45


Hotspare Operations.

Note:- xxx is either the hot spare pool (hsp001) or all for all hot spare pools.

Operation

Command Example.


Create a hot spare pool.

metahs –a hsp001 c1t5d0s4

Add partition to hot spare pool.

metahs –a xxx c2t5d0s4

Delete partition from hot spare pool.

metahs –d xxx c2t5d0s4

Replace failed partition in hot spare pool.

metahs –r xxx c1t5d0s3 (Old) c1t6d0s3(new)

Enable partition.

metahs –e c1t5d0s4

Attach hot spare pool to sub-mirror.

metaparam –h hsp000 d55

Remove hot spare pool from sub-mirror.

metaparam –h none d55

Check status of hot spare pool.

metahs –i


Soft Partition Operations.

Operation

Command Example.


Partition disk & create 1Gb soft partition.

metainit d50 –p –e c1t5d0 1g

Create 2Gbyte soft-partition from disk partition.

metainit d50 –p c1t0d0s0 2g

Create 2Gbyte soft partition from metadevice.

metainit d50 –p d10 2g

Grow soft partition by 5GByte.

metattach d50 5g

List soft partitions & free space disk partition.

metarecover –v –n c1t0d0s0 -p

Recover soft partitions from database info.

metarecover c1t0d0s0 –p -m

Recover soft partitions from disk info.

metarecover c1t0d0s0 –p -d

Delete all soft-partitions on slice.

metaclear –p c1t0d0s4



Mirror Operations.

Operation

Command Example.


Create a mirror with 1 sub-mirror.

(d20 is the mirror, d21 is the sub-mirror.)

metainit d21 1 1 c1t0d0s3

metainit d20 –m d21

Create and attach 2nd. sub-mirror.

(d20 is the mirror, d22 the attached sub-mirror.)

metainit d22 1 1 c1t1d0s3

metattach d20 d22

Create mirror with 2 sub-mirrors.

(d20 is the mirror.)

(d21 and d22 are the sub-mirrors.)

metainit d21 1 1 c1t5d0s5

metainit d22 1 1 c1t6d0s0

metainit d20 –m d21 d22

Detach sub-mirror from mirror.

(d20 is the mirror, d21 the sub-mirror)

metadetach d20 d21

Attach sub-mirror to mirror.(Causes full sync)

metattach d20 d21

Offline a sub-mirror.(remains part of mirror)

metaoffline d20 d21

On-line a sub-mirror. (Causes partial sync)

metaonline d20 d21

Delete a mirror and all its’ sub-mirrors.

metaclear –r d20


Change read policy of mirror.


metaparam –r roundrobin d20

metaparam –r geometric d20

metaparam –r first d20

Change write policy of mirror.

metaparam –w parallel d20

metaparam –w serial d20

Change pass number of resync at boot time.

0=skip, 1=first, 9=last.

metaparam –p 2 d20


Disk and Partition Replacement Operations.

Operation

Command Example.


Copy partition table from existing disk to new disk.

prtvtoc /dev/rdsk/c1t0d0s2 (existing) | fmthard –s - /dev/rdsk/c1t2d0s2 (new)

Enable a partition that has been replaced.

metareplace –e d50 (Mirror) c4t5d0s4

Replace failed partition with another.

metareplace d50 c1t5d0s4(old) c1t6d0s4(New)


Metaset Operations.

Operation

Command Example.


Create metaset with 1 host.

metaset –s MySet –a –h grommit

Add host to set.

metaset –s MySet –a –h wallace

Delete host from set.

metaset –s MySet –d –h wallace

Add disks to set.

metaset –s MySet –a c1t5d0 c1t6d0

Delete disks from set.

metaset –s MySet –d c1t6d0

Release ownership of set.

metaset –s Myset –r

Take ownership of set.

metaset –s MySet –t

Force takeover of ownership of set.

metaset –s MySet –t –f

After metaset creation normal commands can be used by selecting the set to work with.

e.g., metainit –s MySet d44 1 1 c5t4d0s6


Graphical Interface Operation.

metatool [-s SetA ]


/etc/opt/SUNWmd/md.tab (Up to version 4.2), /etc/lvm/md.tab (From version 4.2.1)

Soft partitions are available in Solaris 9 or 4.2.1 with patch 108693-xx

 

No comments:

Solstice DiskSuite Command Summary

Having a sort out and found this course handout originally written by John Furlong - Sun Trainer in 23/10/2002  (Free to distribute). Remind...