creating a stripe in ZFS vs. SVM/UFS

To create a 4 disk stripe in ZFS:

hodur# zpool create zfs_bonnie c4t2d0 c4t4d0 c4t8d0 c4t12d0
hodur# df -kh zfs_bonnie
Filesystem             size   used  avail capacity  Mounted on
zfs_bonnie             134G    26K   134G     1%    /zfs_bonnie
hodur# 

To create a 4 disk stripe in SVM:

hodur# metadb -a -f -c2 c4t2d0s0 c4t4d0s0

In the above command, the metadb is where SVM stores things like stripe width for stripes or the dirty region for mirrors. You can technically get away with only adding one metadb, but having two adds redundancy... could also go with four (one on each disk) but that just becomes overkill (as periodically the master metadb needs to sync with the slave(s) ). And yes, it would be really nice if this was all just automated (hmm like the above zfs command). Next...

hodur# metainit d1 1 4 c4t2d0s0 c4t4d0s0 c4t8d0s0 c4t12d0s0 -i 256k
d1: Concat/Stripe is setup
hodur#

In the above command, the "1" tells us to create one stripe, the "4" tells us how many slices to make that stripe out of, and the "-i 256k" tells us to make the stripe width 256kB (instead of the default 16kB). Continuing...

hodur# newfs /dev/md/rdsk/d1
newfs: construct a new file system /dev/md/rdsk/d1: (y/n)? y
Warning: 4096 sector(s) in last cylinder unallocated
/dev/md/rdsk/d1:        284327936 sectors in 46278 cylinders of 48 tracks, 128 sectors
        138832.0MB in 2893 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
Initializing cylinder groups:
.........................................................
super-block backups for last 10 cylinder groups at:
 283410848, 283509280, 283607712, 283706144, 283804576, 283903008, 284001440,
 284099872, 284198304, 284296736
hodur# mkdir /ufs_bonnie
hodur# mount -F ufs /dev/md/dsk/d1 /ufs_bonnie
hodur# df -kh ufs_bonnie        
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d1         134G   6.9G   125G     6%    /ufs_bonnie
hodur# 

One method is straight forward, the other method caused me to write a blog entry so i'd remember how to do it.

Comments:

Post a Comment:
Comments are closed for this entry.
About

erickustarz

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today