NETWORK ENGINEER BLOG

Tips and Reviews for Engineers

NetApp Aggregate の節約に対応した volume の作成

flexvolume を作成します。

> vol create nfsvol -s none aggr0 2t

> vol options nfsvol
nosnap=off, nosnapdir=off, minra=off, no_atime_update=off, nvfail=off,
ignore_inconsistent=off, snapmirrored=off, create_ucode=on,
convert_ucode=on, maxdirsize=9175, schedsnapname=ordinal,
fs_size_fixed=off, compression=off, guarantee=none, svo_enable=off,
svo_checksum=off, svo_allow_rman=off, svo_reject_errors=off,
no_i2p=off, fractional_reserve=100, extent=off, try_first=volume_grow,
read_realloc=off, snapshot_clone_dependency=off

> vol status nfsvol
         Volume State           Status            Options
         nfsvol online          raid_dp, flex     create_ucode=on,
                                                  convert_ucode=on, guarantee=none,
                Containing aggregate: 'aggr0'

flexvolume の snapshot を全て削除します。

> snap delete -a -f nfsvol

> snap list nfsvol
Volume nfsvol
working...

No snapshots exist.

flexvolume schedule snapshot を停止します。

> snap sched nfsvol 0 0 0

> snap sched nfsvol
Volume nfsvol: 0 0 0

flexvolume snapshot 領域割合を 0% に変更します

> snap reserve nfsvol 0

> snap reserve nfsvol
Volume nfsvol: current snapshot reserve is 0% or 0 k-bytes.

> df -h nfsvol
Filesystem               total       used      avail capacity  Mounted on
/vol/nfsvol/            2048GB       72MB     2047GB       0%  /vol/nfsvol/
/vol/nfsvol/.snapshot      0GB        0GB        0GB     ---%  /vol/nfsvol/.snapshot

flexvolume の autosize を無効化します。

> vol autosize nfsvol
Volume autosize is currently OFF for volume 'nfsvol'.

flexvolume で重複排除を有効化します。

> sis on /vol/nfsvol
Volume or maxfiles exceeded max allowed for SIS: /vol/nfsvol

※error "Volume or maxfiles exceeded max allowed for SIS: /vol/nfsvol" となりました。
バージョンによっては、1TB までの制限があるようです。

flexvolume サイズを 2TB から 1TB へ変更します。

> vol size nfsvol -1t
vol size: Flexible volume 'nfsvol' size set to 1t.

> vol size nfsvol
vol size: Flexible volume 'nfsvol' has size 1t.

> df -h nfsvol
Filesystem               total       used      avail capacity  Mounted on
/vol/nfsvol/            1024GB       72MB     1023GB       0%  /vol/nfsvol/
/vol/nfsvol/.snapshot      0GB        0GB        0GB     ---%  /vol/nfsvol/.snapshot

あらためて flexvolume で重複排除を有効化します。

> sis on /vol/nfsvol
SIS for "/vol/nfsvol" is enabled.
Already existing data could be processed by running "sis start -s /vol/nfsvol".

> sis start -s /vol/nfsvol
The file system will be scanned to process existing data in /vol/nfsvol.
This operation may initialize related existing metafiles.
Are you sure you want to proceed (y/n)? y
The SIS operation for "/vol/nfsvol" is started.

> sis status -l /vol/nfsvol

Path:                    /vol/nfsvol
State:                   Enabled
Status:                  Idle
Progress:                Idle for 00:00:13
Type:                    Regular
Schedule:                sun-sat@0
Minimum Blocks Shared:   1
Blocks Skipped Sharing:  0
Last Operation Begin:    Thu Nov  1 16:15:08 JST 2012
Last Operation End:      Thu Nov  1 16:15:13 JST 2012
Last Operation Size:     0 KB
Last Operation Error:    -
Changelog Usage:         0%
Checkpoint Time:         No Checkpoint
Checkpoint Op Type:      -
Checkpoint stage:        -
Checkpoint Sub-stage:    -
Checkpoint Progress:     -

> df -s nfsvol
Filesystem                used      saved       %saved
/vol/nfsvol/             74604          0           0%

flexvolume の exports の状態を確認します。

> rdfile /vol/vol0/etc/exports
/vol/nfsvol     -sec=sys,rw,nosuid 

※wrfile を実行するとファイルの内容が全て削除されるため、必ず rdfile を事前に実行します。

wrfile で exports の設定を変更します。

> wrfile /vol/vol0/etc/exports
/vol/nfsvol     -sec=sys,rw,anon=0,nosuid
read: error reading standard input: Interrupted system call

exports の設定を反映します。

> exportfs -a

(参考)
http://www.netapp.com/jp/communities/tech-ontap/tot-back-to-basics-deduplication-1104-ja.html