on
Less Known Solaris features: Jumpstart Enterprise Toolkit - Part 11: Mirrored boot disks
Okay, in enterprise computing you wouldn´t use a system without redundant boot disks (at least, when you haven´t an application that can survive a loss of computing nodes without a problem). So it would be nice to automatically configure a mirror of the boot disks with the Solaris Volume Manager. I assume in the following part, that you have a working knowledge with the SVM. When this not the case, it isn´t really a big problem, as this part it somewhat selfexplaining when you are aware of the concept of RAID.
# make_template -f -M -T togusa togusa sds<br />
Adding product configuration information for<br />
+ sds</blockquote>
</code>
<h3>Configuration in the template</h3>
As in the last example i will just include the interesting parts of the configuration. You have to modify some lines:<br />
<blockquote><code>base_config_products=" custom sbd sds"<br />
sds_product_version="default"<br />
sds_root_mirror="c1d1"<br />
sds_use_fmthard="yes"<br />
sds_database_locations="rootdisk.s7:3"<br />
sds_database_partition="s7:32"<br />
sds_metadb_size=""<br />
sds_root_alias="rootdisk"<br />
sds_root_mirror_devalias_name="rootmirror"<br />
sds_mirrored_root_flag="yes"
At first you have to include the sds
module to the base_config_product
line. Then choose the disk you want to use for mirroring, in my case it´s /dev/dsk/c1d1
. Line 4 orders the sds
module to copy the vtoc of the first mirror to the second one. When there are only two disks in your system you have to specify the sds_mirror_root_flag
with yes in line 10. Solaris Volume Manager want to see the metadb replica copies on at least three disks.When you want to find out the correct state of an situation you need at least three copies to be sure. With only two copies, one or the other version may be correct, with three you have two correct copies, so there is a good chance that the two copies represent the correct state. Solaris Volume Manager likes to distribute those over at least three disk to ensure that the failure of a disk won´t take out exactly the half of the copies. You have to tell the system that it shouldn´t obey this rule.sds_mirror_root_flag
specifies that.
Effects of the configuration
Okay, after the installation we can log into the system. You may notice after the installation a vast amount of accesses to the harddisk. The devices for /
and the swap
are not longer referenced by an device name. Instead of this you will find the names of the logical devices of the Solaris Volume Manager.
-bash-3.2$ cat vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d20 - - swap - no -
/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no logging
/devices - /devices devfs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
Let´s look after the exact configuration of the volume manager.
-bash-3.2$ metastat
d20: Mirror
Submirror 0: d21
State: Okay
Submirror 1: d22
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 530145 blocks (258 MB)
d21: Submirror of d20
State: Okay
Size: 530145 blocks (258 MB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0d0s1 0 No Okay Yes
d22: Submirror of d20
State: Okay
Size: 530145 blocks (258 MB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1d1s1 0 No Okay Yes
d10: Mirror
Submirror 0: d11
State: Okay
Submirror 1: d12
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 32836860 blocks (15 GB)
d11: Submirror of d10
State: Okay
Size: 32836860 blocks (15 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0d0s0 0 No Okay Yes
d12: Submirror of d10
State: Okay
Size: 32836860 blocks (15 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1d1s0 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c1d1 Yes id1,cmdk@AVBOX_HARDDISK=VB37711a7b-00576cc9
c0d0 Yes id1,cmdk@AVBOX_HARDDISK=VB97a90791-9d191449
The default numbering scheme for the solaris volume manager is quite simple: The mirror is designated with the first number in a decade (e.g. 10,20,30), the parts of a mirror are numbered with the next free numbers in the decade. For example: The first mirror half of the first mirror get the number 11, the second number gets the number 12. It takes a while until the mirrors are in sync, but after this you have a automatically installed, patched, customized and mirrored system.