|
|
  The Solaris Management Console (smc) comes with the Solaris 9 distribution, and allows you to configure your software RAID, among other things. We are running the console remotely, so to run smc on our workstation we have to run:
# /usr/X11R6/bin/xhost +10.50.100.50
|
On the Sun box:
# export DISPLAY=srv-1:0.0
# smc
|
Of course, your IP and hostname will be different. :)
If you would rather use SSH, check out this article.
Here is a screenshot of the Solaris Management Console with our RAID 5 array
We left 1 percent of the drives left for the meta dbs, the other partition was 99%. Just set up the partitions on one drive, and you can copy the partition info to the other drives. It is quite easy to create your RAID devices from the GUI. Just highlight volumes and select action->create volume. One cool thing about the GUI tool is that it will list the commands you execute. Just select view->show commands. We set up our RAID 5 array, first, with the GUI, then deleted it and started over using the results of show commands, and entered at the command line:
# metadb -a -f c0t10d0s1 c0t11d0s1 c0t12d0s1 c0t9d0s1
# metainit d0 -r c0t10d0s0 c0t11d0s0 c0t12d0s0 c0t9d0s0
d0: RAID is setup
|
The metadb commands create the state database replicas. The metainit creates the RAID array. To check on the status of the RAID array:
# metastat -i
d0: RAID
State: Initializing
Initialization in progress: 0% done
Interlace: 32 blocks
Size: 105025768 blocks
Original device:
Size: 105029472 blocks
Device Start Block Dbase State Reloc Hot Spare
c0t10d0s0 5042 No Initializing Yes
c0t11d0s0 5042 No Initializing Yes
c0t12d0s0 5042 No Initializing Yes
c0t9d0s0 5042 No Initializing Yes
Device Relocation Information:
Device Reloc Device ID
c0t10d0 Yes id1,sd@SFUJITSU_MAA3182S_SUN18G_00B09360____
c0t11d0 Yes id1,sd@SFUJITSU_MAA3182S_SUN18G_00B09193____
c0t12d0 Yes id1,sd@SFUJITSU_MAA3182S_SUN18G_00B09621____
c0t9d0 Yes id1,sd@SFUJITSU_MAA3182S_SUN18G_00B09630____
|
When the array is done:
# metastat -i
d0: RAID
State: Okay
Interlace: 32 blocks
Size: 105025768 blocks
Original device:
Size: 105029472 blocks
Device Start Block Dbase State Reloc Hot Spare
c0t10d0s0 5042 No Okay Yes
c0t11d0s0 5042 No Okay Yes
c0t12d0s0 5042 No Okay Yes
c0t9d0s0 5042 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c0t10d0 Yes id1,sd@SFUJITSU_MAA3182S_SUN18G_00B09360____
c0t11d0 Yes id1,sd@SFUJITSU_MAA3182S_SUN18G_00B09193____
c0t12d0 Yes id1,sd@SFUJITSU_MAA3182S_SUN18G_00B09621____
c0t9d0 Yes id1,sd@SFUJITSU_MAA3182S_SUN18G_00B09630____
|
Now let's make a filesystem:
# newfs /dev/md/rdsk/d0
newfs: construct a new file system /dev/md/rdsk/d0: (y/n)? y
Warning: cylinder groups must have a multiple of 2 cylinders with the given
parameters
Rounded cgsize up to 230
/dev/md/rdsk/d0: 105025768 sectors in 22289 cylinders of 19 tracks,
248 sectors
51282.1MB in 1014 cyl groups (22 c/g, 50.62MB/g, 6208 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 103952, 207872,
.
.
.
105017040,
#
|
Let's create a mount point, mount the filesystem, and take it for a spin:
# mkdir /share
# mount /dev/md/dsk/d0 /share
# mkdir /share/tmp
# cp -r /usr/* /share/tmp/
# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t0d0s0 2.0G 1.1G 868M 57% /
/proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
fd 0K 0K 0K 0% /dev/fd
swap 856M 40K 856M 1% /var/run
swap 856M 16K 856M 1% /tmp
/dev/dsk/c0t1d0s7 3.9G 17K 3.9G 1% /export/home0
/dev/dsk/c0t0d0s7 1.4G 20M 1.3G 2% /export/home
/dev/md/dsk/d0 49G 8.9M 49G 1% /share
#
|
We aborted the cp command after awhile with ctrl-c. All is good. Notice that we used dsk, rather than rdsk when mounting. rdsk is the raw device. Also note that the above config is what the GUI spit out, and certainly isn't optimized.
|
|