.
Manucomp Systems
Hours of Operation

Monday to Friday:
9am - 6pm EST

Saturday & Sunday:
Closed

If you would like additional information please contact us toll-free at :

1-866-440-1115
info@manucomp.com

Can't find the product you are looking for?
Request a quote.
Solstice DiskSuite
Back to Sun Tips


Solstice DiskSuite is a free RAID volume manager from Sun Microsystems.

This article describes the method of mirroring a boot drive using Solstice DiskSuite via the command line.

Solstice DiskSuite comes bundled with the Solaris 8 operating system.
Install Solstice DiskSuite 4.2.1 on Solaris 8
Insert 2 of 2 software for Solaris 8

#
CD /cdrom/sol_8_1000_sparc_2/Solaris_8/EA/products/DiskSuite_
4.2.1/sparc/Packages

I usually install all the packages even though I do not use the GUI.

# pkgadd -d .

The following packages are available:

1 SUNWlvma Solaris Volume Management API's
(sparc) 1.0,REV=2001.07.25.13.05
2 SUNWlvmg Solaris Volume Management Application
(sparc) 1.0,REV=2001.07.25.13.05
3 SUNWlvmr Solaris Volume Management (root)
(sparc) 1.0,REV=2001.07.25.13.05
4 SUNWmdg Solstice DiskSuite Tool
(sparc) 4.2.1,REV=1999.11.04.18.29
5 SUNWmdja Solstice DiskSuite Japanese localization
(sparc) 4.2.1,REV=1999.12.09.15.37
6 SUNWmdnr Solstice DiskSuite Log Daemon Configuration Files (sparc) 4.2.1,REV=1999.11.04.18.29
7 SUNWmdnu Solstice DiskSuite Log Daemon
(sparc) 4.2.1,REV=1999.11.04.18.29
8 SUNWmdr Solstice DiskSuite Drivers
(sparc) 4.2.1,REV=1999.12.03.10.00
9 SUNWmdu Solstice DiskSuite Commands
(sparc) 4.2.1,REV=1999.11.04.18.29
10 SUNWmdx Solstice DiskSuite Drivers(64-bit)
(sparc) 4.2.1,REV=1999.11.04.18.29

Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]: all

Reboot the server after the successful installation.

# init 6

Prepare the drives for SDS

SDS uses metadevice state databases to store information on disk about the state of your DiskSuite configuration. The metadevice state database records and tracks changes made to your configuration. These databases must reside on a dedicated slice(in the case of a boot drive). I typically leave about 10MB of unused space on the boot drive when installing Solaris for these databases.

Disksuite has the following rules with respect to the use of database replicas:

The system will not boot unless more than half of the replicas are available The system will panic if more than half of the replicas are corrupt.

If one of your drives fail, and the system is rebooted for any reason it will not automatically boot in a two disk mirror configuration. You can disable the feature by setting the following system parameter:

# echo "set md:mirrored_root_flag=1" >> /etc/system

The output from format of my boot disk looks like the following.

Total disk cylinders available: 24620 + 2 (reserved cylinders)

Part

Tag

Flag

Cylinders

 

Size

 

Blocks

0 root wm 0 - 283 400.62MB (284/0/0) 820476
1 var wm 284 - 1701 1.95GB (1418/0/0) 4096602
2 backup wm 0 - 24619 33.92GB (24620/0/0) 71127180
3 swap wm 1702 - 3136 1.98GB (1435/0/0) 4145715
4 unassigned wm 3137 - 3144 11.29MB (8/0/0) 23112
5 unassigned wm 3145 - 5271 2.93GB (2127/0/0) 6144903
6 usr wm 5272 - 11652 8.79GB (6381/0/0) 18434709
7 home wm 11653 - 24619 17.86GB (12967/0/0) 37461663

The partition table of the mirrored drive should be identical to the boot drive. Copy the partition table of the boot drive to its mirror.

# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2

fmthard: New volume table of contents now in place

In this case c0t0d0s2 is the boot drive and c0t1d0s2 is the mirror.

# metadb -a -f -c2 /dev/dsk/c0t0d0s4 /dev/dsk/c0t1d0s4

Create the mirror for / filesystem

# metainit -f d10 1 1 c0t0d0s0
d10: Concat/Stripe is setup
# metainit d20 1 1 c0t1d0s0
d20: Concat/Stripe is setup
# metainit d30 -m d10
d30: Mirror is setup
# metaroot d30

Create the mirror for all other filesystems

/var filesystem:
# metainit -f d11 1 1 c0t0d0s1
# metainit d21 1 1 c0t1d0s1
# metainit d31 -m d11

Swap filesystem:
# metainit -f d13 1 1 c0t0d0s3
# metainit d23 1 1 c0t1d0s3
# metainit d33 -m d13

/opt filesystem:
# metainit -f d15 1 1 c0t0d0s5
# metainit d25 1 1 c0t1d0s5
# metainit d35 -m d15

/usr filesystem:
# metainit -f d16 1 1 c0t0d0s6
# metainit d26 1 1 c0t1d0s6
# metainit d36 -m d16

/export/home filesystem:
# metainit -f d17 1 1 c0t0d0s7
# metainit d27 1 1 c0t1d0s7
# metainit d37 -m d17

Edit the /etc/vfstab to mount the new mirrors on boot.

Before :

#device         device          mount           FS      fsck    mount   mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s3 - - swap - no -
/dev/md/dsk/d30 /dev/md/rdsk/d30 / ufs 1 no -
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr ufs 1 no -
/dev/dsk/c0t0d0s1 /dev/rdsk/c0t0d0s1 /var ufs 1 no -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2 yes -
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /opt ufs 2 yes -
swap - /tmp tmpfs - yes -

After :

#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr          ufs     1       yes     -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d33 - - swap - no -
/dev/md/dsk/d30 /dev/md/rdsk/d30 / ufs 1 no -
/dev/md/dsk/d36 /dev/md/rdsk/d36 /usr ufs 1 no -
/dev/md/dsk/d31 /dev/md/rdsk/d31 /var ufs 1 no -
/dev/md/dsk/d37 /dev/md/rdsk/d37 /export/home ufs 2 yes -
/dev/md/dsk/d35 /dev/md/rdsk/d35 /opt ufs 2 yes -
swap - /tmp tmpfs - yes -

Suppress warning messages

# metainit hsp001

Attach the second submirror to the mirror. This will cause the data from the boot disk to be synchronized with the mirrored drive.

# metattach d30 d20
# metattach d31 d21
# metattach d33 d23
# metattach d35 d25
# metattach d36 d26
# metattach d37 d27

you will hear alot of disk thrashing at this point and your i/o will go through the roof.

Use metastat to track progress

# metastat

I like to use this one when i'm watching though. it looks more impressive

# metastat | grep %

Enable the mirror disk to be bootable:

# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
# ls -l /dev/rdsk/c0t1d0s0
lrwxrwxrwx 1 root root 45 Sep 8 11:25 /dev/rdsk/c0t1d0s0 -> ../../devices/pci@1f,4000/scsi@3/sd@1,0:a,raw

This is the device path that you will use to define the alternate boot device at
the hardware level.

ok nvalias mirror /pci@1f,4000/scsi@3/sd@1,0:a,raw

Issue a "show-disks" at the ok prompt to verify the correct path to the disk. Use
"devalias" at the ok prompt to also give clues as to which device path to use.

In case of primary boot disk failure, boot from the alternate disk

ok boot mirror