Back to the main page

SVM - RAID 1 (Mirror) only for x86

So I need to write this doc now, since boot process for x86 platform is different then for SPARC. 

A x86 disk is different than SPARC one, because more than one OS can run on the x86.

The GRUB was created to manage which OS to boot to. 
Solaris 10 is using GRUB for booting, read more about this  here 

Before partitioning disk, a Solaris fdisk partition must be created. 

The fdisk partition is portion of disk dedicated for Solaris. Of course, the easiest way is if whole disk is dedicated for Solaris. 

Tips about fdisk: 

1. Max numbers of fdisk partitions are 4.  
2. Solaris fdisk partition must begin at cylinder 1 on the first disk. Master boot record goes to cylinder 0. 

The command format on x86 includes fdisk program. You cannot find this under "sparc format" command. 

This is example for SunFire X4200, how to create SVM Mirror (RAID 1) for root FS

Creating 2 submirrors

# metainit -f d10 1 1 c1t0d0s0
(-f = force it, since FS is mounted on this slice)
# metainit d20 1 1 c1t1d0s0
Creating one-way mirror
# metainit d0 -m d10
Edit /etc/vfstab file
# metaroot d0
(This edits the /etc/vfstab and /etc/system files) This line shows in /etc/vfstab /dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no - These lines shows in /etc/system file * Begin MDD root info (do not edit) rootdev:/pseudo/md@0:0,0,blk * End MDD root info (do not edit) Reboot # init 6 Attach second submirror
# metattach d0 d20
(resync starts) Install GRUB on second slice
# installgrub -fm /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t1d0s0 

stage1 written to partition 0 sector 0 (abs 16065)
stage2 written to partition 0, 233 sectors starting at 50 (abs 16115)
stage1 written to master boot sector
Find physical path of alternate root device - slice we attached to one-way mirror
# ls -l /dev/rdsk/c1t1d0s0
/dev/rdsk/c0t1d0s0 -> ../../devices/pci@0,0/pci1022,7450@2/pci1000,3060@3/sd@1,0:a,raw
Setup boot "environment variables" for second/alternate path. This is done with command eeprom and information is stored in file /boot/solaris/bootenv.rc
# eeprom altbootpath=/pci@0,0/pci1022,7450@2/pci1000,3060@3/sd@1,0:a
The file /boot/solaris/bootenv.rc now has these lines:
setprop bootpath '/pci@0,0/pci1022,7450@2/pci1000,3060@3/sd@0,0:a'
setprop altbootpath '/pci@0,0/pci1022,7450@2/pci1000,3060@3/sd@1,0:a'
Back to the main page