Creating a Striped Disk Using DiskSuite Product

1. Configure the disks for DiskSuite

There are really only two types of places to store the meta device databases need by DiskSuite, either on one or more separate partitions, or within the metadevice. For this example system we will create very small partitions (only 2160 blocks) on each of the second and third disks.

Format the disks. Become root on the system and issue the format command.

  1. From the "AVAILABLE DISK SELECTIONS" select 1 (disk c0t1d0)
    1. From the FORMAT MENU select partition
      1. From the PARTITION MENU select 0
        1. Enter unassigned for the partition id tag
        2. Enter wm for partition permission flags
        3. Enter 0 for the starting cyl
        4. Enter 2160b for the partition size
      2. Back at the PARTITION MENU select 1
        1. Enter unassigned for the partition id tag
        2. Enter wm for partition permission flags
        3. Enter 0 for the starting cyl
        4. Enter 8378640b for the partition size
      3. Back at the PARTITION MENU select label
        1. Type y to write the label to disk
      4. Back at the PARTITION MENU select quit
    2. Back at the FORMAT MENU select disk
    3. From the "AVAILABLE DISK SELECTIONS" select 2 (disk c0t2d0)
    4. Perform step 1A i through iv again
  2. Back at the FORMAT MENU select quit and exit the format command

2. Create the Meta database

Sun's DiskSuite product requires and odd number of meta device databases. This is because DiskSuite uses a majority rules method of determining the correct disk structure. If three meta device databases say it's day outside and four meta device databases say it's night outside then DiskSuite says it's night outside.

You create metadatabases through the use of the metadb command (/usr/opt/SUNWmd/sbin/metadb).

To create the first meta device database issue the following command:

 metadb -a -f c0t1d0s0

3. Create Replicas of the Meta database

Next create the replicas of the databases. I have chosen to create two replica meta device databases, for a total of three meta device databases. And to place the last two meta device databases on the same disk partition. The command is:

 metadb -a -c 2 c0t2d0s0

4. Create the Striped metadevice

There are two methods of creating the striped metadevice. One method is to edit /etc/opt/SUNWmd/md.tab and add the following line:

 d0 1 2 /dev/dsk/c0t1d0s0 /dev/dsk/c0t2d0s0
Now enter the metainit command (/usr/opt/SUNWmd/sbin/metadb).

The other method is to use the options with the metainit command.

 metainit d0 1 2 /dev/dsk/c0t1d0s0 /dev/dsk/c0t2d0s0

5. Create a new filesystem on the metadevice

Now that the meta device exists we can create a file system upon it. The command is newfs.

 newfs -v /dev/md/rdsk/d0
Please take particular notice of the path. The path to the block meta device is /dev/md/dsk/d0.

6. Mounting the new filesystem

The new file system is ready to be mounted. A simple mount command is:

 mount /dev/md/dsk/d0 /export

Also edit /etc/vfstab and add the following entry:

 /dev/md/dsk/d0  /dev/md/rdsk/d0 /export ufs     2       yes     -

The new meta device is now ready to be used.


This web page is Copyright © 1997 - 2017, Stephen Hinchey
If you have comments or additions for these web pages please direct them to webmaster @ barbary.com