Saturday, December 20, 2014

Adım adım ZFS operasyonları

zpool komutu ile yeni disk için pool oluşturma

Yeni takılan diski zfs ile kullanmak için pool oluşturulmalıdır.

işlem 1
zpool create tank1 /dev/da3


zfs komutu ile pool içinde mountpoint özelliğini ayarlayarak yeni filesystem oluşturma işlemi aşağıdaki şekilde gerçekleşti.

işlem 2
zfs create -o mountpoint=/opt/output tank1/opt_output
zfs filesystem properties

zfs tercih etmemin en önemli iki nedeni filesystem ekle/çıkar işlemlerini ve ek olarak yarattığınız farklı filesystem'lere ait farklı özellikleri kolayca yönetebilmek.

Örnek olarak mountpoint özelliği ile dosya sistemimizin hangi yola bağlanacağı bilgisini aşağıdaki şekilde değiştirebiliyoruz.

Varsayılan olarak mountpoint /tank1 olarak ayarlandı. Değiştirmek için:

okantest:~# test>  zfs get mountpoint tank1
NAME   PROPERTY    VALUE       SOURCE
tank1  mountpoint  /tank1      default


işlem 3
okantest:~# test>  zfs set mountpoint=/opt/tank1 tank1

filesystem e özel değiştirebileceğiniz özellik listesini
zfs get all tank1

komutu ile alabilirsiniz.

Sık olarak değiştirdiğim zfs dosya sistemi özellikler (zfs filesystem properties ) şunlar:

  •     compression  (on | gzip | gzip-[1-9] | zle | lzjb | off)
  •     mountpoint
  •     quota
  •     recordsize bu değer optimize edilmeli default: 128k


zfs compression test results
Strength&Type    Time    Size    Comments
off/assorted    56.157s    660M   
zle/assorted    58.859s    608M    some gain, small cost
lzjb/assorted    56.919s    490M    fair gain, small cost
on/assorted    58.168s    496M    =lzjb
gzip-1/assorted    69.715s    376M    Significant gains, increased cost
gzip-2/assorted    69.416s    383M   
gzip-3/assorted    71.724s    361M   
gzip-4/assorted    76.042s    367M   
gzip-5/assorted    77.492s    367M   
gzip/assorted    81.487s    359M   
gzip-7/assorted    84.402s    365M   
gzip-8/assorted    88.709s    357M    Not much better than gzip-1, and progressively more expensive, timewise
gzip-9/assorted    93.229s    364M   
              
off/avi    18.700s    344M   
zle/avi    16.497s    324M    Best time, best compression, not sure why
lzjb/avi    18.414s    331M    “free”, with some space savings
on/avi    18.135s    325M    =lzjb
gzip-1/avi    30.593s    336M   
gzip-2/avi    30.714s    335M   
gzip-3/avi    30.043s    335M   
gzip-4/avi    32.278s    344M   
gzip-5/avi    31.652s    338M   
gzip/avi    32.148s    337M   
gzip-7/avi    33.087s    337M   
gzip-8/avi    32.642s    336M   
gzip-9/avi    30.125s    341M   
              
off/mp3    0.280s    7.29M    You can't win if you don't play.
zle/mp3    0.140s    7.20M   
lzjb/mp3    0.139s    7.20M   
on/mp3    0.137s    7.20M   
gzip-1/mp3    0.158s    7.20M   
gzip-2/mp3    0.137s    7.20M   
gzip-3/mp3    0.138s    7.20M   
gzip-4/mp3    0.150s    7.20M   
gzip-5/mp3    0.139s    7.20M   
gzip/mp3    0.141s    7.20M   
gzip-7/mp3    0.150s    7.20M   
gzip-8/mp3    0.139s    7.20M   
gzip-9/mp3    0.164s    7.20M   
              
off/programs    13.422s    240M   
zle/programs    11.731s    245M   
lzjb/programs    08.398s    231M    Second best on time, not bad on compression
on/programs    05.823s    173M    Best time and compression… should equal lzjb
gzip-1/programs    12.386s    207M   
gzip-2/programs    13.223s    214M   
gzip-3/programs    14.091s    222M   
gzip-4/programs    14.833s    219M   
gzip-5/programs    15.788s    222M   
gzip/programs    15.394s    223M   
gzip-7/programs    15.915s    220M   
gzip-8/programs    15.736s    222M   
gzip-9/programs    16.119s    222M   
              
off/text    0.257s    5.31M   
zle/text    0.120s    4.81M   
lzjb/text    0.114s    4.67M   
on/text    0.118s    4.67M   
gzip-1/text    0.137s    4.27M   
gzip-2/text    0.114s    4.25M   
gzip-3/text    0.114s    4.25M   
gzip-4/text    0.125s    4.23M   
gzip-5/text    0.114s    4.23M   
gzip/text    0.125s    4.22M   
gzip-7/text    0.115s    4.22M   
gzip-8/text    0.118s    4.22M   
gzip-9/text    0.124s    4.22M    Best compression, no surprise

No comments:

Post a Comment