SDS Mirror root disk
This is a guide to mirroring the root disk on a system using SDS (Solstice Disk Suite) The reason for choosing this over Veritas is two fold. Firstly its slightly cheaper, as in free and secondly when used on the boot disk there is no advantage to using veritas as all it realistaly provides is mirroring and SDS provides mirroring without encapsulating or otherwise messing with the disk.
Preparing for the install
The installation of SDS requires a partition to work on of at least 10mb.
If you have a spare slice on the disk then use this if not you will have to use some space from the swap partition.
Using space in swap. You will need to steal some space from swap and create a new partition depending upon the system. This is best done from single user or from cdrom* Swap -l (list swap files and partitions) * Swap -dremove the partition from swap * Format - repartition the disk using some space from swap
We will assume from now on that there are two disks in the system c0t0d0 and c0t1d0 with the following partition on c0t0d0.We need to copy this partition table to the c0t1d0 disk. This is easiest done using prtvtoc and fmthard.
- 0 / 2gb
- 1 swap 1gb
- 3 sds 100mb (do not mount this partition. Reseve it for sds)
- 4 /opt 1gb
- 5 /var 2gb
- 6 /usr 4gb
- 7 /export remainder
Install the SDS software. On solaris 8 it is on the 2nd CD in
- Prtvtoc /dev/rdsk/c0t0d0s2 > /tmp/disk0
- Fmthard -s /tmp/disk0 /dev/rdsk/c0t1d0s2
/Solaris_8/EA/products/DiskSuite_4.2.1/sparc/Packages Setting up SDS
* Initialise the database
* Create metadevices for one side of the mirror with the OS.
- Metadb -a -f -c2 c0t0d0s3 c0t1d0s3
- Metadb
* clock the file system and reboot
- Root / slash
- Metainit -f d10 1 1 c0t0d0s0
- Metainit d20 1 1 c0t1d0s0
- Metainit d0 -m d10
- Metaroot d0
- Swap
- Metainit -f d11 1 1 c0t0d0s1
- Metainit d21 1 1 c0t1d0s1
- Metainit d1 -m d11
- /opt
- metainit -f d12 1 1 c0t0d0s4
- metainit d22 1 1 c0t1d0s4
- metainit d2 -m d12
- /var
- metainit -f d13 1 1 c0t0d0s5
- metainit d23 1 1 c0t1d0s5
- metainit d3 -m d13
- /usr
- metainit -f d14 1 1 c0t0d0s6
- metainit d24 1 1 c0t1d0s6
- metainit d4 -m d14
- /export/ftp
- metainit -f d15 1 1 c0t0d0s7
- metainit d25 1 1 c0t1d0s7
- metainit d5 -m d15
* After the reboot attach the second disk and make it bootable
- lockfs -fa
- shutdown -g0 -y -i6
* Make sure trhe disk can be booted from
- metattach d0 d20
- metattach d1 d21
- metattach d2 d22
- metattach d3 d23
- metattach d4 d24
- metattach d5 d25
- installboot /usr/platform/`uname -I`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
Checking it all out
- Eeprom boot-device=disk0:a disk1:a (from the unix prompt)
- Setenv boot-device disk0:1 disk1:a (from the ok prompt)
The /etc/vfstab file should now point to /dev/md/dsk/d? instead of /dev/dsk/c?t?d?s? if not then it can be manually edited to point to these. An example below. You also need to test mirroring works by removing/ powering off a disk.fd - /dev/fd fd - no - /proc - /proc proc - no - /dev/md/dsk/d1 - - swap - no - /dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no - /dev/md/dsk/d2 /dev/md/rdsk/d2 /var ufs 1 no - /dev/md/dsk/d4 /dev/md/rdsk/d4 /usr ufs 1 no - /dev/md/dsk/d3 /dev/md/rdsk/d3 /var ufs 1 no - /dev/md/dsk/d5 /dev/md/rdsk/d5 /export/ftp ufs 2 yes - swap - /tmp tmpfs - yes -SDS Commands
Use the following to administer the configuration
- metastat (see the status of the mirror)
- metattach
- metadetach
- metainit
- metadb
- metaonline
- metaoffline
- metareplace
- metaset
- metaclear