Back to the main page 
 SVM - RAID 0 - Concatenation and Stripe Volumes  
This doesn't provide any redundancy but allows you to expand storage capacity. 
There are three of them: 
1. RAID-0 Stripe spreads data equally across all components (disk, slice or soft partition). 
2. RAID-0 Concatenation writes data to first available component and then moves to next one. 
3. RAID-0 Concatenated Stripe is stripe expanded by additional component. 
You will probably use these guys to create submirrors (in order to create mirrors later).  
 
RAID-0 cannot be used for FS that are used during OS upgrade/installation: /, /usr, /var, /opt, swap.
Logical data segments (define size in [K|M]bytes or blocks) of volume (RAID-0) is called interlace. 
Different values can be used to adjust application I/O performance. Default is 16Kb (32 blocks). 
Creating RAID-0
First you need state database replicas (let's create on 2 slices, total 6 replicas). 
| # metadb -afc 3  c1t0d0s7 c1t1d0s7
# metadb
        flags           first blk       block count
     a        u    r    16              8192            /dev/dsk/c1t0d0s7
     a        u    r    8208            8192            /dev/dsk/c1t0d0s7
     a        u    r    16400           8192            /dev/dsk/c1t0d0s7
     a        u    r    16              8192            /dev/dsk/c1t1d0s7
     a        u    r    8208            8192            /dev/dsk/c1t1d0s7
     a        u    r    16400           8192            /dev/dsk/c1t1d0s7
 | 
And get familiar (read man page) with command "metainit". 
Creating Stripe volume - example
| 
# metainit d40 1 2 c1t1d0s4 c1t0d0s4
d40: Concat/Stripe is setup
 | 
d40 = volume/metadevice name
1 = number of stripe
2 = two components in stripe
| 
# metastat
d40: Concat/Stripe
    Size: 8388252 blocks (4.0 GB)
    Stripe 0: (interlace: 32 blocks)
        Device     Start Block  Dbase   Reloc
        c1t1d0s4          0     No      No
        c1t0d0s4          0     No      No
Device Relocation Information:
Device   Reloc  Device ID
c1t1d0   No     -
c1t0d0   No     -
 | 
Creating Concatenation Volume - example 
| 
# metainit d40 2 1 c1t1d0s4 1 c1t0d0s4
d40: Concat/Stripe is setup
 | 
2 = number of stripe
1 = one component per stripe  
| 
# metastat
d40: Concat/Stripe
    Size: 8391888 blocks (4.0 GB)
    Stripe 0:
        Device     Start Block  Dbase   Reloc
        c1t1d0s4          0     No      No
    Stripe 1:
        Device     Start Block  Dbase   Reloc
        c1t0d0s4          0     No      No
Device Relocation Information:
Device   Reloc  Device ID
c1t1d0   No     -
c1t0d0   No     -
 | 
Creating new FS
Once you have metadevice, create FS. 
Add line in /etc/vfstab file (table of file system defaults) and mount /.0
| 
/dev/md/dsk/d40 /dev/md/rdsk/d40	/.0     ufs     2       yes     -
 | 
Expanding storage capacity for existing data
If you have RAID-0 volume (Concatenation or Stripe), you can expand it (convert it to concatenation stripe) - no need to reboot or unmount FS! 
Check what do you have. 
| 
# metastat
d40: Concat/Stripe
    Size: 8388252 blocks (4.0 GB)
    Stripe 0: (interlace: 32 blocks)
        Device     Start Block  Dbase   Reloc
        c1t1d0s4          0     No      No
        c1t0d0s4          0     No      No
Device Relocation Information:
Device   Reloc  Device ID
c1t1d0   No     -
c1t0d0   No     - 
 | 
Say, stripe is mounted to /.0 file system. 
| 
/dev/md/dsk/d40		3.9G   4.0M   3.9G     1%    /.0
 | 
Attach new slices to existing metadevice/volume 
| 
# metattach d40 c1t1d0s5
d40: component is attached
 | 
Check what do you have now - see the size is bigger. 
| 
# metastat
d40: Concat/Stripe
    Size: 18201816 blocks (8.7 GB)
    Stripe 0: (interlace: 32 blocks)
        Device     Start Block  Dbase   Reloc
        c1t0d0s4          0     No      No
        c1t1d0s4          0     No      No
    Stripe 1:
        Device     Start Block  Dbase   Reloc
        c1t1d0s5          0     No      No
Device Relocation Information:
Device   Reloc  Device ID
c1t0d0   No     -
c1t1d0   No     -
 | 
But your FS still shows same size. 
| 
# df -h /.0
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d40        3.9G   4.0M   3.9G     1%    /.0
 | 
Grow the FS
| 
# growfs -M /.0 /dev/md/rdsk/d40
 | 
-M = it does "write-lock" of mounted  FS when expanding
Now you have bigger FS. 
| 
# df -h /.0
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d40        8.5G   8.7M   8.5G     1%    /.0
 | 
Deleting/Clearing volume (and its data)
| 
# umount /.0
# metaclear d40
d40: Concat/Stripe is cleared
 | 
 Back to the main page