Plan to format and mirror wsdb01

 

wsdb01 is a UE450 with ten 18GB disks across five controllers.

 

The intention is to mirror each partition for reliability. Since the maximum unit is 18GB some striping will be required as well. The design will require the ability to grow filesystems with additional disks being added.

 

The operating system will require two 18GB disks (one a mirror) thus eight disks will be available for data storage. This leaves a potential of 144GB un-mirrored space remaining for data.

 

The required filesystems (cooked) and sizes per Doug Lane are as follows:

 

u00 18G

u01 18G

u02 36G

u03 18G

 

We need to be able to expand these to more sets e.g. u04, u05 later and we need to be able to add space to the existing sets in the future, e.g.

u00 from 18G to 36G

u02 from 36G to 54G

 

This totals up to a potential growth of 126GB. This requirement will preclude the use of RAID 1 on sets greater then two and RAID 5 would be required for u00 and u02. There are not enough disks on the system to allocate both a RAID 5 and a RAID 1 scenario.

 

I spoke to Doug about this and he decided to relax the immediate requirements somewhat and instead we will provide four 18GB RAID 1 plex’s.

 

We will be using the Solstice DiskSuite (SDS 4.2.1) software that is bundled with the Solaris 8 installation cd’s.

 

The arrangement will be as follows:

 

Meta

Disk

Physical

Disks & Partitions

Filesystem

Size

GB

RAID

Level

d30

c0t0d0s0 & c0t1d0s0

root

14.16

1

d31

c0t0d0s3 & c0t1d0s3

swap

2.58

1

d61

c2t0d0s0 & c2t1d0s0

u01

18

1

d62

c3t0d0s0 & c3t1d0s0

u02

18

1

d63

c4t0d0s0 & c4t1d0s0

u03

18

1

d64

c5t0d0s0 & c5t1d0s0

u04

18

1

 

 

 

 

The following commands will be issued to create the disk environment:

 

Create the metadb state database:

 

# format -d c0t0d0

format> p

partition> 7

Enter partition id tag[unassigned]: <enter>

Enter partition permission flags[wm]: <enter>

Enter new starting cyl[0]: 7451

Enter partition size[0b, 0c, 0.00mb, 0.00gb]: 8mb

partition> label

Ready to label disk, continue? y

 

partition> p

  7 unassigned    wm    7451 - 7454        9.20MB    (4/0/0)       18848

partition> quit

format> quit

 

Copy the boot disk partitions to the mirror disk:

 

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

 

Initialize the metadb:

 

# metadb -a -f -c2  /dev/rdsk/c0t0d0s7 /dev/rdsk/c0t1d0s7

 

Create the boot mirror:

 

# metainit -f d10 1 1 c0t0d0s0

# metainit d20 1 1 c0t1d0s0
# metainit d30 -m d10

 

Create the swap mirror:

 

# metainit -f d11 1 1 c0t0d0s3

# metainit d21 1 1 c0t1d0s3
# metainit d31 -m d11

 

Edit the vfstab:

 

# cp /etc/vfstab /etc/vfstab.orig.kinscoe

# metaroot d30

 

Modify the swap line to look like this:

 

/dev/md/dsk/d31        -       -       swap    -       no      -

 

Partition the remaining disks:

# format -d c2t0d0

format> p

partition> 4

Enter partition id tag[swap]: unassigned

Enter partition permission flags[wu]:

Enter new starting cyl[1]: 0

Enter partition size[35363560b, 7505c, 17267.36mb, 16.86gb]: 0

partition> 0

Enter partition id tag[unassigned]: usr

Enter partition permission flags[wm]:

Enter partition size[0b, 0c, 0.00mb, 0.00gb]: 7505c

partition> label

Ready to label disk, continue? y

partition> p

0        usr    wm       0 - 7504       16.86GB    (7505/0/0) 35363560

partition> quit

format> quit

 

# format -d c3t0d0

format> p

partition> 3

Enter partition id tag[swap]: unassigned

Enter partition permission flags[wu]:

Enter new starting cyl[1]: 0

Enter partition size[35363560b, 7505c, 17267.36mb, 16.86gb]: 0

partition> 0

Enter partition id tag[unassigned]: usr

Enter partition permission flags[wm]:

Enter partition size[0b, 0c, 0.00mb, 0.00gb]: 7505c

partition> label

Ready to label disk, continue? y

partition> p

0        usr    wm       0 - 7504       16.86GB    (7505/0/0) 35363560

partition> quit

format> quit

 

# format -d c4t0d0

format> p

partition> 3

Enter partition id tag[swap]: unassigned

Enter partition permission flags[wu]:

Enter new starting cyl[1]: 0

Enter partition size[35363560b, 7505c, 17267.36mb, 16.86gb]: 0

partition> 4

Enter partition id tag[swap]: unassigned

Enter partition permission flags[wu]:

Enter new starting cyl[1]: 0

Enter partition size[35363560b, 7505c, 17267.36mb, 16.86gb]: 0

partition> 0

Enter partition id tag[unassigned]: usr

Enter partition permission flags[wm]:

Enter partition size[0b, 0c, 0.00mb, 0.00gb]: 7505c

partition> label

Ready to label disk, continue? y

partition> p

0        usr    wm       0 - 7504       16.86GB    (7505/0/0) 35363560

partition> quit

format> quit

 

# format -d c5t0d0

format> p

partition> 3

Enter partition id tag[swap]: unassigned

Enter partition permission flags[wu]:

Enter new starting cyl[1]: 0

Enter partition size[35363560b, 7505c, 17267.36mb, 16.86gb]: 0

partition> 4

Enter partition id tag[swap]: unassigned

Enter partition permission flags[wu]:

Enter new starting cyl[1]: 0

Enter partition size[35363560b, 7505c, 17267.36mb, 16.86gb]: 0

partition> 0

Enter partition id tag[unassigned]: usr

Enter partition permission flags[wm]:

Enter partition size[0b, 0c, 0.00mb, 0.00gb]: 7505c

partition> label

Ready to label disk, continue? y

partition> p

0        usr    wm       0 - 7504       16.86GB    (7505/0/0) 35363560

partition> quit

format> quit

 

Copy the partitions:

 

# prtvtoc /dev/rdsk/c2t0d0s2 | fmthard -s - /dev/rdsk/c2t1d0s2

# prtvtoc /dev/rdsk/c3t0d0s2 | fmthard -s - /dev/rdsk/c3t1d0s2

# prtvtoc /dev/rdsk/c4t0d0s2 | fmthard -s - /dev/rdsk/c4t1d0s2

# prtvtoc /dev/rdsk/c5t0d0s2 | fmthard -s - /dev/rdsk/c5t1d0s2

 

Create the  u01 mirror:

 

# metainit -f d41 1 1 c2t0d0s0

# metainit d51 1 1 c2t1d0s0
# metainit d61 -m d41

 

Create the u02 mirror:

 

# metainit -f d42 1 1 c3t0d0s0

# metainit d52 1 1 c3t1d0s0
# metainit d62 -m d42

 

Create the u03 mirror:

 

# metainit -f d43 1 1 c4t0d0s0

# metainit d53 1 1 c4t1d0s0
# metainit d63 -m d43

 

Create the u04 mirror:

 

# metainit -f d44 1 1 c5t0d0s0

# metainit d54 1 1 c5t1d0s0
# metainit d64 -m d44

 

Create the directories for the new filesystems:

 

# mkdir /u01
# mkdir /u02
# mkdir /u03
# mkdir /u04
 

Create the new filesystems:

 

# newfs /dev/md/dsk/d61

# newfs /dev/md/dsk/d62

# newfs /dev/md/dsk/d63

# newfs /dev/md/dsk/d64

 

Append the following lines to /etc/vfstab:

 
# echo “/dev/md/dsk/d61 /dev/md/rdsk/d61        /u01    ufs     2       yes  -” >> /etc/vfstab
# echo “/dev/md/dsk/d62 /dev/md/rdsk/d62        /u02    ufs     2       yes  -” >> /etc/vfstab
# echo “/dev/md/dsk/d63 /dev/md/rdsk/d63        /u03    ufs     2       yes  -” >> /etc/vfstab
# echo “/dev/md/dsk/d64 /dev/md/rdsk/d64        /u04    ufs     2       yes  -” >> /etc/vfstab
 

Reboot and allow the system to mount the mirrors.

# lockfs -fa
# shutdown –y –g0 –i6

AFTER REBOOT:

Attach the second submirrors to the mirrors:

# metattach d30 d20
# metattach d31 d21
# metattach d61 d51
# metattach d62 d52
# metattach d63 d53
# metattach d64 d54

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 Jun 24 16:25 /dev/rdsk/c0t1d0s0 -> ../../devices/pci@1f,4000/scsi@3/sd@1,0:a,raw

 
 Verify the mirrors have been synchronized:

# metastat | grep “progress”

Resync in progress: 21 % done

Shutdown and apply nvram changes to support a secondary boot disk:

# shutdown –y –g0 –i0

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

(this is the value from the ls –l command above)

Test booting from the mirror

ok  boot mirror