Adding Disks


Let's assume our new disks are c0t2d0 and c0t3d0. If the new disks have been inserted with hot-plug, run 'drvconfig / disks' to make them available in Solaris. Then we check that we can see them with 'format'.
bash-2.01# format

AVAILABLE DISK SELECTIONS:
       0. c0t0d0 
          /pci@1c,600000/scsi@2/sd@0,0
       1. c0t1d0 
          /pci@1c,600000/scsi@2/sd@1,0
 *new* 2. c0t2d0 
          /pci@1c,600000/scsi@2/sd@2,0
 *new* 3. c0t3d0 
          /pci@1c,600000/scsi@2/sd@3,0

Partition Disks


Next, we partition the new disks for 2 slices. The first slice (s7) gets a minimal space of 15MB for Disksuite, and the second slice (s0) will be one big slice for the data.
format> ver

Primary label contents:

Volume name = <        >
ascii name  = 
pcyl        = 14089
ncyl        = 14087
acyl        =    2
nhead       =   24
nsect       =  424
Part      Tag    Flag     Cylinders        Size       Blocks
  0       root    wm       0 - 14083       68.34GB    (14084/0/0)
  1 unassigned    wm       0                0         (0/0/0)
  2     backup    wm       0 - 14086       68.35GB    (14087/0/0)
  3 unassigned    wm       0                0         (0/0/0)
  4 unassigned    wm       0                0         (0/0/0)
  6 unassigned    wm       0                0         (0/0/0)
  7 unassigned    wm   14084 - 14086       14.91MB    (3/0/0)
After partitioning, we verify our disk c0t2d0s0
bash-2.01# prtvtoc /dev/dsk/c0t2d0s0
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      0    00          0 143318784 143318783
       2      5    01          0 143349312 143349311
       7      0    00  143318784     30528 143349311
 

Initialize the Disk Slices


Next, we generate the Disksuite databases on both disks on the 15MB slice (s7). It is advisable to add at least 2 databases per disk (-c parameter). Then we can generate the submirror stripes called d12 for c0t2d0 and d22 for c0t3d0 on the data slice (s0).
# metadb -a -c 2 /dev/dsk/c0t2d0s7 /dev/dsk/c0t3d0s7

bash-2.01# metainit d12 1 1 c0t2d0s0
d12: Concat/Stripe is setup

bash-2.01# metainit d22 1 1 c0t3d0s0
d22: Concat/Stripe is setup
 

Create the Mirror


Now we can attach the first stripe to the new mirror device we call d2. After adding the second stripe to the mirror, the mirror begins to sync data from stripe d12 to stripe d22. The order is important if a mirror member is replaced, to make sure the disk holding the data is not overwritten.
bash-2.01# metainit d2 -m d12
d2: Mirror is setup

bash-2.01# metattach d2 d22
d2: submirror d22 is attached

Create the Filesystem


Finally, we can create a new UFS filesystem on the mirror device d2, and then we mount the new filesystem.
bash-2.01# newfs /dev/md/rdsk/d2
newfs: construct a new file system /dev/md/rdsk/d2: (y/n)? y
/dev/md/rdsk/d2:        143318784 sectors in 14084 cylinders of 24 tracks, 424 sectors
        69979.9MB in 1409 cyl groups (10 c/g, 49.69MB/g, 6016 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 102224, 204416, 306608, 408800, 510992, 613184, 715376, 817568,
...

bash-2.01# mount /dev/md/dsk/d2 /mnt

bash-2.01# df -k /mnt
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d2       70577241       9 69871460     1%    /mnt

Topics: