aggr、vol和disk命令详解

62
AggrVol 和 Disk 和和和和 一、Aggr 和和.......................................................1 Disk 和和.......................................................10 Vol 和和........................................................13 一、Aggr 命命 aggr – 和和和和 aggregates, 和和 aggregate 和和和和和 aggregates 和和 aggr command argument ... 1 aggr 和和和和和和和 和和和 一, aggregates 和和和和 ,一、一 aggregates 和和 plexes 和 和 aggregate, 和和 aggregate 和和和,和和和和和 aggregate, 和 aggregate 和 和 Agg 和和和和和和和和和 volume 和 Data ONTAP 7.0 和和和和和和 aggr. 传统 a single user-visible file system 和和和:multiple, independent user-level file systems Data ONTAP 7.0 和和和和 traditional and flexible volumes. Aggregates 和和和和和和和和和和和和和和和. plex 和 aggregate 和 WAFL 和 和和和和和 和和和 aggr 和和和和 plex,和 和 plex. 和 和和和 mirrored aggregate, 和和和和和和和 RAID-level mirroring.和和 filer 和和和和和, spare disks 和和和和和和和 和和和 aggr 和和和,和和 plex 和 和和和 一, aggr 和和和和 plex 和 和和和 ,。 aggr 和和和和和-f 和 和 ,。

Upload: taichiguan

Post on 27-Apr-2015

105 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: Aggr、Vol和Disk命令详解

Aggr、Vol和Disk命令详解

目 录

一、Aggr 命令.................................................................................................................................1

二、Disk 命令................................................................................................................................10

三、Vol 命令..................................................................................................................................13

一、Aggr命令

aggr – 用于管理 aggregates, 显示 aggregate 状态和拷贝 aggregates

格式:aggr command argument ...

1、关于 aggr 命令的详细描述:这是一组命令,它可以创建新 aggregates,摧毁一个、撤销先前摧毁的一个 aggregates

管理 plexes 里面包含一个镜像的 aggregate, 改变 aggregate 的状态,应用选项到 aggregate, 拷贝一个 aggregate 到另一个并显示它们的状态。Agg 命令会对其中包含的 volume 产生影响。Data ONTAP 7.0 之后开始提供 aggr.

传统卷:a single user-visible file system

灵活卷:multiple, independent user-level file systems

Data ONTAP 7.0 全面支持 traditional and flexible volumes.

Aggregates 即可以是镜像的也可以是不镜像的. 一个 plex 是 aggregate 中 WAFL 文件系统的物理拷贝。镜像的 aggr 包含两个 plex,非镜像的包含一个 plex. 为了创建 mirrored aggregate, 你的存储必须支 RAID-level mirroring.当在 filer 上做镜像时,

spare disks 被分成两个磁盘池。当创建 aggr 的时候,单个 plex 的磁盘必须来自同一磁盘池,当做镜像的 aggr 中的两个 plex 的磁盘最好是来自不同的磁盘池,这也是为容错考虑。可以在创建 aggr 的时候加上-f 选项来屏蔽这个策略,但是不推荐这么做。

Page 2: Aggr、Vol和Disk命令详解

一个存储中最多可以创建 200 个 aggr,这个数量包括传统卷。加一起 200 个。(1)、一个 plex 可以有以下状态:normal ----plex 中所有的 RG 都是正常的。failed---- plex 里面至少一个 RG failed.

Empty---plex 是 aggregate 的一部分。在加入 plex 前磁盘需要被格式化。Active---The plex is available for use.

Inactive--The plex is not available for use.

Resyncing----只针对镜像的 aggr,一个 plex 上的内容过期了,需要从另一个 plex 上同步过来。adding disks---磁盘正在被加入到 plex 的 RAID 组中。out-of-date-----这种状态只在镜像 aggregates 的时候发生,当其中一个 plex 失败。tan> aggr status –r =用此命令就可以看见 plex 的状态Aggregate aggr0 (online, raid0) (zoned checksums)

Plex /aggr0/plex0 (online, normal, active) ==/aggr/plex0 是这个 plex 的名字RAID group /aggr0/plex0/rg0 (normal) =RG 的状态

(2)、aggregate 可以被 online、offline、restricted:online--------正常状态。offline-------不允许读写访问。restricted-----一些特定的操作是允许的,比如:(aggregate copy,重新计算校验位或者 RAID 重构),但是数据访问时不允许的。

Aggregates 可以是以下状态:

aggr---------在用的 aggr,包含 0 个或多个灵活卷。copying----正在进行 aggr copy.

degraded—里面至少包含一个 degraded 状态运行的 RAID 组。foreign----从另一个 filer 移动到当前 filer 的 aggr。growing—正在向 aggr 里面加入磁盘。initializing—aggr 正在初始化。invalid--------aggr 里面没有 volume,而且不允许加入,典型的即使中断 aggr copy 操作的时候。ironing--------在这个 aggr 正在做 WAFL 文件系统一致点检查。mirror degraded—aggr 是镜像的 aggr,但是其中一个 plex 正 offline 或者在同步。mirrored------aggr 是镜像的,而且所有 RAID 组功能都正常。needs check---aggr 上面的 WAFL 文件系统需要做一致点检查。partial-------aggr 里面至少有一块盘,但是两块或更多盘丢失。raid0--------包含 raid0,RAID 组。raid4--------包含 raid4,RAID 组。raid_dp-----包含 RAID-DP (Double Parity)RAID groups.

reconstruct-----至少 aggr 里面一个 RAID 组正在重构。redirect-------p 选项执行后,aggr 中 volume 的读性能被降级resyncing----镜像的 aggr 中的一个 plex 正在同步。snapmirrored---在做 aggr snapmirror 复制的时候,这个状态只是当 aggr 是传统卷的一部分时才会产生。verifying-------RAID mirror verification operation is currentlybeing run on the aggregate. wafl inconsistent,The aggregate has

been marked corrupted. Pleasecontact Customer Support if you see an aggregate in this state.

2、关于 aggr 子命令:add mirror restrict undestroy

Page 3: Aggr、Vol和Disk命令详解

copy offline scrub verify

create online show_space

destroy options split

media_scrub rename status

(1)、aggr add aggrname

[ -f ]

[ -n ]

[ -g {raidgroup | new | all} ]

{ ndisks[@size]

| -d disk1 [ disk2 ... ]

[ -d diskn [ diskn+1 ... ] ] }

向 aggr 中加入盘,类似于创建 aggr,如果 aggr 做个镜像,则需要使用-d 选项,并执行两次。如果没有使用-g 选项,则磁盘首先被加入到最近创建的 RG 里面,直到它慢了,然后会创建新的 RG

-g 可以指定将盘加入到一个存在的 RG 中(后面跟存在的 RG 名),或指定加入到一个新创建的 RG 中(后面跟 new),

而如果后面跟着 all,则先向存在的 RG 里面添加,直到它们满了,然后再新创建 RG,向里面添加。tan> aggr add aggr2 -n 3 =相当于预演一下命令怎么执行,但并没真执行。aggr add aggr2 -d v5.27 v5.42 v5.26 =看系统会把那三块盘加进去如果 aggr 中有一个 plex offline 了,则不允许向 aggr 中加入磁盘。(2)、aggr copy start [ -S | -s snapshot ] [ -C ] source destination

拷贝所有的数据,包括 snapshot 和灵活卷从一个 aggr 到另一个 aggr。如果用 –S 选项则拷贝所有快照到目标 aggr,如果指定特定的快照拷贝到目标 aggr,则使用-s 选项。如果既没有用-S 也没有用-s,则会在执行 aggr copy 命令那一刻,产生一个快照,并拷贝到目标 aggr。aggr copy 只能在它里面是灵活卷的情况下才可以执行,传统卷不行。 aggr copy 可以在同一个存储或不同存储间执行,表示不同存储上的 aggr 格式如下:filer_name:aggregate_name

如果想成功的做 aggr copy,则必须满足下面条件:源 aggr 必须 online,目标 aggr 必须 restricted,如果在两个存储间作这个操作,则两个存储必须由信任关系,对方存储的名字必须在/etc/host.equiv 文件里面。如果在同一个存储做 aggr copy,则 localhost 必须在/etc/host.equiv 文件里面,loopback

地址必须在/etc/hosts 文件里面。tan> aggr copy start aggr1 aggr2 ===同一存储做 copy,并没有配置/etc/host.equiv 文件。Aggr 上面没有灵活卷也可以拷贝过去。This can be a long-running operation. Use Control - C (^C) to interrupt.

Copy Aggregate: aggr1 on machine 127.0.0.1 to Aggregate: aggr2

AGGRCOPY DUMP: creating "/vol/aggr1/../snapshot_for_aggrcopy.3" snapshot.

AGGRCOPY: Starting on aggregate 1.

02:08:24 GMT : aggr copy restore 0 : begun, 80 MB to be copied.

02:08:53 GMT : aggr copy restore 0 : 5 % done. Estimate 10 minutes remaining.

02:09:02 GMT : aggr copy restore 0 : 10 % done. Estimate 6 minutes remaining.

02:09:11 GMT : aggr copy restore 0 : 15 % done. Estimate 5 minutes remaining.

02:09:20 GMT : aggr copy restore 0 : 20 % done. Estimate 4 minutes remaining.

02:09:30 GMT : aggr copy restore 0 : 25 % done. Estimate 4 minutes remaining.

02:09:39 GMT : aggr copy restore 0 : 30 % done. Estimate 3 minutes remaining.

Page 4: Aggr、Vol和Disk命令详解

02:10:00 GMT : aggr copy restore 0 : 35 % done. Estimate 4 minutes remaining.

02:10:19 GMT : aggr copy restore 0 : 40 % done. Estimate 3 minutes remaining.

02:10:28 GMT : aggr copy restore 0 : 45 % done. Estimate 3 minutes remaining.

02:10:37 GMT : aggr copy restore 0 : 50 % done. Estimate 3 minutes remaining.

02:10:47 GMT : aggr copy restore 0 : 55 % done. Estimate 2 minutes remaining.

02:10:57 GMT : aggr copy restore 0 : 60 % done. Estimate 2 minutes remaining.

02:11:06 GMT : aggr copy restore 0 : 65 % done. Estimate 2 minutes remaining.

02:11:28 GMT : aggr copy restore 0 : 70 % done. Estimate 2 minutes remaining.

02:11:43 GMT : aggr copy restore 0 : 75 % done. Estimate 2 minutes remaining.

02:11:52 GMT : aggr copy restore 0 : 80 % done. Estimate 1 minutes remaining.

02:12:01 GMT : aggr copy restore 0 : 85 % done. Estimate 1 minutes remaining.

02:12:11 GMT : aggr copy restore 0 : 90 % done. Estimate 1 minutes remaining.

02:12:20 GMT : aggr copy restore 0 : 95 % done. Estimate 1 minutes remaining.

02:12:30 GMT : aggr copy restore 0 : 100% done, 80 MB copied.

AGGRCOPY DUMP: Deleting "/vol/aggr1/../snapshot_for_aggrcopy.3" snapshot.

tan> aggr online aggr2 =将拷贝过来的 vol online

Sat Apr 3 02:25:01 GMT [wafl.vv.generate.FSID:notice]: Generated fsid 0x2ab22d9 for volume vol1

Sat Apr 3 02:25:01 GMT [wafl.vv.rename.dup:notice]: Duplicate volume name 'vol1' detected and renamed to 'vol1(1)'

DBG:RAID:raid_vol_set_cfod_aggr_split:Set/Reset VOL_IC_FLAG_CFOD_AGGR_SPLIT Flag:0

Aggregate 'aggr2' is now online.

tan> vol status vol1

Volume State Status Options

vol1 online raid_dp, flex create_ucode=on,

convert_ucode=on

Containing aggregate: 'aggr1' 可以看灵活卷在哪个 aggr 里(3)、aggr copy abort [ -h] operation_number | all

终止 aggregate copy 操作.

(4)、aggr copy status [ operation_number ]

显示一个或多个 aggr copy 操作的状态。操作号是 0-3.

(5)、aggr copy throttle [ operation_number ] value

控制 COPY速度。(6)、aggr create aggrname [ -f ]

[ -m ]

[ -n ]

[ -t raidtype ]

[ -r raidsize ]

[ -T disk-type ]

[ -R rpm ]

[ -L [compliance | enterprise] ]

[ -v ]

[ -l language-code ]

{ ndisks[@size]

| -d disk1 [ disk2 ... ]

Page 5: Aggr、Vol和Disk命令详解

[ -d diskn [ diskn+1 ... ] ]

}

tan> aggr create aggr3 -d v5.40 v5.41 v5.42 ==三块没有格式化的磁盘需要先格式化才加入 aggr

Creation of an aggregate with 3 disks has been initiated. The disks need

to be zeroed before addition to the aggregate. The process has been initiated

and you will be notified via the system log as disks are added.

Note however, that if system reboots before the disk zeroing is complete, the

volume won't exist.

tan> aggr status –r ==正在格式化,此时状态是 pending

Aggregate aggr3 (creating, raid_dp, initializing) (zoned checksums)

Plex /aggr3/plex0 (offline, empty, active)

Targeted to traditional volume or aggregate but not yet assigned to a raid group

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

pending v5.40 v5 2 8 FC:B 1 FCAL N/A 520/1065984 527/1080448 (zeroing, 64% done)

pending v5.41 v5 2 9 FC:B 1 FCAL N/A 520/1065984 527/1080448 (zeroing, 69% done)

pending v5.42 v5 2 10 FC:B 1 FCAL N/A 520/1065984 527/1080448 (zeroing, 69% done)

创建一个新的 aggr,-t 选项指定 raidtype(raid4,raiddp),-r 选项指定 aggr 中 RG 组中最大的磁盘组,缺省的磁盘组和硬件平台有关。-T 指定磁盘类型,比如:ATA, FCAL,LUN, SAS, SATA, and SCSI. 在一个 aggr 中不允许不同转速的磁盘放在一起。-T 不能和-d 一起用。SAS-------- Serial Attached SCSI disks in matching shelves.

SATA-------serial ATA disks in SAS shelves.

-m 选项,在创建 aggr 的时候就指定是镜像的,指定的磁盘被分为两个 plex,缺省创建的 aggr 不是镜像的。-n 选项,预演命令,不实际执行。如果存储上有 SnapLock Compliance or SnapLock Enterprise 的 license,则可以用-L 选项来创建一个 snaplock aggr.

(7)、aggr destroy { aggrname | plexname } [ -f ]

摧毁 aggr,一旦执行上面的 plex 全部摧毁,要摧毁的 aggr 上不能有灵活卷(不管灵活卷的状态是什么),否则根本无法offline.

tan> aggr offline aggr2

aggr offline: Cannot offline aggregate 'aggr2' because it contains one or more flexible volumes

aggr 摧毁后,它里面的磁盘就变成 spare 盘了;只有 offline 的 aggr、传统卷和 plex 可以被摧毁。(8)、aggr media_scrub status [ aggrname | plexname | groupname] [ -v ]

tan> aggr media_scrub status aggr1

aggr media_scrub /aggr1/plex0/rg0 is 70% complete

(9)、aggr mirror aggrname [ -f ] [ -n ] [ -v victim_aggrname ] [ -d disk1 [ disk2 ... ] ]

把非镜像的 aggr转为镜像的 aggr

tan> aggr mirror aggr1 -d v5.28,v5.29,v5.43,v5.16,v5.17,v5.18

aggr mirror: Couldn't mirror volume: Operation requires a syncmirror_local license.

You must license it and then reboot.

tan> aggr mirror aggr1 -f -d v5.28 v5.29 v5.43 v5.16 v5.17 v5.18

这是做完镜像后两个 plex 的状态。Aggregate aggr1 (online, raid_dp, resyncing) (zoned checksums)

Plex /aggr1/plex0 (online, normal, active, pool1)

Page 6: Aggr、Vol和Disk命令详解

RAID group /aggr1/plex0/rg0 (normal)

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

dparity v5.19 v5 1 3 FC:B 1 FCAL N/A 520/1065984 527/1080448

parity v5.35 v5 2 3 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.20 v5 1 4 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.36 v5 2 4 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.21 v5 1 5 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.37 v5 2 5 FC:B 1 FCAL N/A 520/1065984 527/1080448

Plex /aggr1/plex2 (online, normal, resyncing 3% completed, pool1)

RAID group /aggr1/plex2/rg0 (level-0 resync in progress)

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

dparity v5.18 v5 1 2 FC:B 1 FCAL N/A 520/1065984 527/1080448

parity v5.17 v5 1 1 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.28 v5 1 12 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.29 v5 1 13 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.43 v5 2 11 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.16 v5 1 0 FC:B 1 FCAL N/A 520/1065984 527/1080448

-v 选项是将一个当前非镜像的 aggr 作为镜像的 aggr。-d 选项显式的指定哪些磁盘作为镜像 aggr 的组成磁盘。加入磁盘的数量必须与要镜像 aggr 的磁盘数量一致,指定的磁盘不允许跨越磁盘池??(disk pool什么意思),可以用-f 选项强制跨越磁盘池。(10)、aggr offline { aggrname | plexname } [ -t cifsdelaytime ]

tan> aggr offline /aggr1/plex2 ==将一个 plex offline

Plex 'aggr1/plex2' is now offline.

除了在维护模式,如果 aggr 里面包含灵活卷,则不允许 offline.如果在维护模式,如果 aggr 里面包含 root vol 也不允许offline.

(11)、aggr online { aggrname | plexname } [ -f ]

一个不稳定的 aggr 如果 online 会增加系统的风险,建议做 WAFl_check

(12)、aggr options aggrname [ optname optval ]

显示 aggr 上设置的 options。----------ignore_inconsistent on | off

这个选项只能用在维护模式,如果设置这个了,则即使包含 root vol 的 aggr 不稳定,也依然可以 online,但最好提前做WAFL_check 运行。---------nosnap on | off

如果是 on 则关闭了自动 snapshot 的功能,缺省是 off。--------raidsize number

指定在 aggr 中可以创建 RAID 组的最大尺寸。这个选项改变后,不影响之前创建的 RAID 组。合法的值和硬件平台和 raid

类型都有关系。 ------------------------------------------

raid4 raidsize min default max

------------------------------------------

R100 2 8 8

Page 7: Aggr、Vol和Disk命令详解

R150 2 6 6

FAS250 2 7 14

other (FCAL disks) 2 8 14

other (ATA disks) 2 7 7

------------------------------------------

------------------------------------------

raid_dp raidsize min default max

------------------------------------------

R100 3 12 12

R150 3 12 16

other (FCAL disks) 3 16 28

other (ATA disks) 3 14 16

------------------------------------------

Data ONTAP版本如果升级了,这些值都可能变化,或者硬件平台不一样都可能不一样。-----------raidtype raid4 | raid_dp | raid0

设置创建 aggr缺省的 raidtype.

----------resyncsnaptime number

tan> aggr help options resyncsnaptime

aggr options <atv-name> resyncsnaptime <minutes>

- set RAID mirror resync snapshot frequency for aggregate or

traditional volume <atv-name>

指定同步 RAID 镜像快照的频繁度,缺省是 60 分钟。----------root

指定一个传统卷和 aggr 为 root属性,如果用了这个,那么以前的 root aggr 或 root 传统卷在重启后会变成非传统卷,所以删除一个 aggr 或传统卷的 root 状态,就是设置 root options给另一个卷。没重启之前,最初的 root vol还显示是 root

卷,这个选项只能在维护模式才可以修改。----------snaplock_compliance

将 aggr 变为只读的。只有创建的时候就创建为只读的 aggr.

----------snaplock_enterprise

同上---------snapshot_autodelete on | off

允许自动删除快照,当用快照做恢复后,就自动删除快照,但是其它策略也会删除快照,比如快照太多,或者快照计划等。(13)、aggr rename aggrname newname

改 aggr 的名字(14)、aggr restrict aggrname [ -t cifsdelaytime ]

转换 aggr 到 restrict 状态,如果包含灵活卷则转化不到这个状态,除非在维护模式。注意维护模式去多操作结果和正常模式不一样。(15)、aggr scrub start [ aggrname | plexname | groupname ]

tan> aggr scrub start aggr2

Sat Apr 3 04:58:15 GMT [raid.rg.scrub.start:notice]: /aggr2/plex0/rg0: starting scrub

aggr scrub: started scrub of /aggr2/plex0/rg0

这个动作对比数据磁盘与校验盘的内容,如果必要纠正不正确的内容。

Page 8: Aggr、Vol和Disk命令详解

(16)、aggr scrub status [ aggrname | plexname | groupname ] [ -v]

tan> aggr scrub status

aggr scrub /aggr2/plex0/rg0 is 3% complete

(17)、aggr scrub stop [ aggrname | plexname | groupname ]

tan> aggr scrub stop aggr2

aggr scrub: stopped scrub of /aggr2/plex0/rg0

tan> Sat Apr 3 05:02:39 GMT [raid.rg.scrub.stopped:notice]: /aggr2/plex0/rg0: scrub stopped at stripe 81216 after 4:24.09

Sat Apr 3 05:02:39 GMT [raid.rg.scrub.summary.pi:notice]: Scrub found 0 parity inconsistencies in /aggr2/plex0/rg0.

Sat Apr 3 05:02:39 GMT [raid.rg.scrub.summary.cksum:notice]: Scrub found 0 checksum errors in /aggr2/plex0/rg0.

Sat Apr 3 05:02:39 GMT [raid.rg.scrub.summary.media:notice]: Scrub found 0 media errors in /aggr2/plex0/rg0.

(18)、aggr scrub suspend [ aggrname | plexname | groupname ]

tan> aggr scrub suspend aggr2

(19)、aggr scrub resume [ aggrname | plexname | groupname ]

tan> aggr scrub resume aggr2

Sat Apr 3 05:05:38 GMT [raid.rg.scrub.resume:notice]: /aggr2/plex0/rg0: resuming scrub at stripe 9216 (3% complete)

aggr scrub: resumed scrub of /aggr2/plex0/rg0

(20)、aggr show_space [ -h | -k | -m | -g | -t | -b ] < aggrname>

显示 aggr 的空间使用情况。这个命令显示 aggr 中每个灵活卷的空间使用情况。tan> df -A -h aggr2 ==可以看 df和这个命令的区别Aggregate total used avail capacity

aggr2 3420MB 101MB 3318MB 3%

aggr2/.snapshot 180MB 124KB 179MB 0%

tan> aggr show_space aggr2 -h

Aggregate 'aggr2'

Total space WAFL reserve Snap reserve Usable space BSR NVLOG A-SIS

4000MB 400MB 180MB 3420MB 0KB 0KB

Space allocated to volumes in the aggregate

Volume Allocated Used Guarantee

vol1 100MB 164KB volume

Aggregate Allocated Used Avail

Total space 100MB 164KB 3318MB

Snap reserve 180MB 124KB 179MB

WAFL reserve 400MB 10MB 389MB

下面是详细显示结果的解释:-----Total space 这是 aggr拥有的全部空间的大小-----WAFL reserve WAFL 预留整个磁盘空间的百分比针对 aggr 级的元数据-----Snap reserve aggregate snapshots 预留的空间.

-----Usable space 可以获得的可用空间大小Usable space = Total space -WAFL reserve -Snap reserve 注意:df displays this as the 'total' space.

-----BSR NVLOG 这个只在 Synchronous SnapMirror 目标端有效。在数据写入磁盘前,这个目标 filer占用多少空间来保存从源端传过来的数据,-----Allocated 空间预留加已经使用空间的大小之和。-----Used 已占用 磁 盘 块 的空间的大小。与 df 中 看 见 的 used 不 一样, 它 包 括维护灵 活 卷 的元数 据 。

Page 9: Aggr、Vol和Disk命令详解

-----Avail aggr 中可以使用的空间大小,这与 df 中的 avail 一样。(21)、aggr split plexname aggrname [-r oldvol newvol] [-r ...] [-s suffix]

将一个 plex 从一个镜像的 aggr 中挪出,创建一个新的 aggr,先前的镜像 aggr 变成非镜像的普通 aggr.

aggr status [ aggrname ] [ -r | -v | -d | -c | -b | -s | -f | -i ]

tan> aggr status –v =显示了每个 options 的值,里面的每个 plex、vol 和 RG

Aggr State Status Options

aggr3 online raid_dp, aggr nosnap=off, raidtype=raid_dp,

raidsize=16, ignore_inconsistent=off,

snapmirrored=off, resyncsnaptime=50,

fs_size_fixed=off, snapshot_autodelete=on,

lost_write_protect=on

Volumes: <none>

aggr2 online raid_dp, aggr nosnap=off, raidtype=raid_dp, ==镜像 aggr

mirrored raidsize=16,

ignore_inconsistent=off,

snapmirrored=off,

resyncsnaptime=50,

fs_size_fixed=off,

snapshot_autodelete=on,

lost_write_protect=on

Volumes: voltest

Plex /aggr2/plex0: online, normal, active

RAID group /aggr2/plex0/rg0: normal

Plex /aggr2/plex1: online, normal, active

RAID group /aggr2/plex1/rg0: normal

-r 选项显示 RG信息、文件系统磁盘、空闲盘和失败的磁盘。tan> aggr status aggr0 –d =显示了 aggr 里面的磁盘信息Device HA SHELF BAY CHAN Disk Vital Product Information

---------- --------------- ----- ------------------------------

v4.16 v4 1 0 FC:B 13740500

v4.17 v4 1 1 FC:B 13740501

v4.18 v4 1 2 FC:B 13740502

tan> aggr status aggr0 –c ==显示 aggr 里面块 checksum 的属性Aggr Checksum style Checksum status

aggr0 zoned Checksums active

tan> aggr status aggr0 –s ==显示 spare 盘Pool1 spare disks

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

Spare disks for zoned checksum traditional volumes or aggregates only

spare v5.32 v5 2 0 FC:B 1 FCAL N/A 520/1065984 527/1080448

spare v5.33 v5 2 1 FC:B 1 FCAL N/A 520/1065984 527/1080448

spare v5.34 v5 2 2 FC:B 1 FCAL N/A 520/1065984 527/1080448

Page 10: Aggr、Vol和Disk命令详解

Pool0 spare disks (empty)

tan> aggr status aggr3 –f ==显示 fail 的磁盘Broken disks

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

admin failed v5.43 v5 2 11 FC:B 1 FCAL N/A 520/1065984 527/1080448

(22)、aggr verify [start|stop|status|suspend|resume] [ aggrname ] [ -f plexnumber ]

Aggregate aggr2 (online, raid_dp, mirrored) (zoned checksums) =镜像的 aggr2

Plex /aggr2/plex0 (online, normal, active, pool1)

RAID group /aggr2/plex0/rg0 (normal)

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

dparity v5.18 v5 1 2 FC:B 1 FCAL N/A 520/1065984 527/1080448

parity v5.17 v5 1 1 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.28 v5 1 12 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.29 v5 1 13 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.32 v5 2 0 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.16 v5 1 0 FC:B 1 FCAL N/A 520/1065984 527/1080448

Plex /aggr2/plex1 (online, normal, active, pool1)

RAID group /aggr2/plex1/rg0 (normal)

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

dparity v5.24 v5 1 8 FC:B 1 FCAL N/A 520/1065984 527/1080448

parity v5.25 v5 1 9 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.19 v5 1 3 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.20 v5 1 4 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.21 v5 1 5 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.22 v5 1 6 FC:B 1 FCAL N/A 520/1065984 527/1080448

开始 raid 镜像的验证。tan> aggr verify start aggr2

tan> Sat Apr 3 06:54:19 GMT [raid.mirror.verify.snapcrtok:info]: Aggregate aggr2: created mirror verification snapshot

mirror_verify.0403065419(tan)

Sat Apr 3 06:54:19 GMT [raid.mirror.verify.start:notice]: /aggr2: start mirror verification

tan> aggr verify status aggr2

aggr verify aggr2 -n is 7% complete

在集群情况下,aggr 可以重名,但取不同的名字,有利于管理。

例子:aggr create aggr1 -r 10 20

用 20 块盘创建一个 aggr,其中的 RG由 10 块盘组成。aggr create aggr1 20@9

创建 aggr由 20 块 9GB 的磁盘组成。

Page 11: Aggr、Vol和Disk命令详解

aggr create aggr1 -d 8a.1 8a.2 8a.3

创建一个 aggr由指定的三块盘组成aggr create aggr1 10

aggr options aggr1 raidsize 5

二、Disk 命令

disk – 用于配置控制 RAID disk 的命令针对此命令的详细解释:disk fail---强制一个文件系统磁盘 fail.

disk reassign---用在维护模式,当 NVRAM卡 swap 后将磁盘重新分配。The

disk remove----将磁盘 unload,以便物理取出它。disk replace---用于将文件系统磁盘用更合适的 spare 盘替换。disk scrub---去扫面磁盘的介质错误,然后修复它通过校验信息去重构它。这些命令执行完,都有信息提示。存储的`hot swap'(热交换)能力允许挪去或增加磁盘最小化中断文件系统的行为,在你要物理的挪走或添加 SCSI 磁盘的时候,用 disk swap 命令是 I/O停止,这个动作完成后,文件系统活动自动继续。如果你想取消 disk swap 行为,可以敲入 disk unwap 来取消掉。这个命令只对老式 SCSI 盘有意义。如果对于挪走或添加 FC 磁盘,则不需要敲入此命令。disk zero spares 命令零化所有还没有格式化得 spare 盘。这个动作在后台做,要花费很长时间,这和有多少盘和磁盘的容量有关系。disk assign 和 disk show 命令只能在基于软件确定的磁盘属主关系的时候有用,用来分配和现实磁盘的属主关系。disk assign {<disk_name> | all | [-T <storage type>] –n <count> | auto } [-p <pool>]

[-o <ownername>]

[-s {<sysid>|unowned}]

[-c {block|zoned}] [-f]

disk upgrade_ownership 命令只在维护模式可以获得,用来改变磁盘的属主关系模式。disk sanitize [start|stop|status]用于维护关于 disk sanitization 进程,这个进程用于清洁磁盘,可能持续很长时间,所以在后台运行。disk sanitize release <disk_list>

修改磁盘从 sanitized 再变回 spare 状态tan> disk sanitize start v5.40

WARNING: The sanitization process may include a disk format. =针对 spare 盘来做,包含格式化进程If the system is power cycled or rebooted during a disk format

the disk may become unreadable. The process will attempt to

restart the format after 10 minutes.

The time required for the sanitization process may be quite long

depending on the size of the disk and the number of patterns and

cycles specified.

Do you want to continue (y/n)? y

The disk sanitization process has been initiated. You will be notified via the system log when it is complete.

disk maint [start|abort|status]管理磁盘维护检测进程,这个命令可以用户触发也可以系统自动启动,比如遇到磁盘 no-

fatal 错误的时候,修正错误。

Page 12: Aggr、Vol和Disk命令详解

tan> disk maint start -d v5.20

*** You are about to mark the following file system disk(s) for copy, ***

*** which will eventually result in them being removed from service ***

Disk /aggr2/plex1/rg0/v5.20

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

data v5.20 v5 1 4 FC:B 1 FCAL N/A 520/1065984 527/1080448

***

Do you want to continue? yes

Started testing v5.20

disk fail [-i] [-f] <disk_name>

强制使磁盘 fail,一般都是磁盘因为出错需要从盘柜挪出,如果没用选项,这块盘先被标记为 `prefailed',这时候系统会选择合适的 spare 盘来顶替它。tan> disk fail v5.29 ===发出命令,这块盘标记为 prefail

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

dparity v5.18 v5 1 2 FC:B 1 FCAL N/A 520/1065984 527/1080448

parity v5.17 v5 1 1 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.28 v5 1 12 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.29 v5 1 13 FC:B 1 FCAL N/A 520/1065984 527/1080448 (prefail)

系统自动开始 RG恢复。 Aggregate aggr2 (online, raid_dp, mirrored) (zoned checksums)

Plex /aggr2/plex0 (online, normal, active, pool1)

RAID group /aggr2/plex0/rg0 (normal)

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

dparity v5.18 v5 1 2 FC:B 1 FCAL N/A 520/1065984 527/1080448

parity v5.17 v5 1 1 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.28 v5 1 12 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.29 v5 1 13 FC:B 1 FCAL N/A 520/1065984 527/1080448 (prefail, copy in progress)

-> copy v5.33 v5 2 1 FC:B 1 FCAL N/A 520/1065984 527/1080448 (copy 24% completed)

data v5.32 v5 2 0 FC:B 1 FCAL N/A 520/1065984 527/1080448

data v5.16 v5 1 0 FC:B 1 FCAL N/A 520/1065984 527/1080448

RG恢复完毕后,这块盘被标记为 Broken disks

Broken disks

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

admin failed v5.29 v5 1 13 FC:B 1 FCAL N/A 520/1065984 527/1080448

disk remove [-w] <disk_name>

tan> disk remove v5.27 ===将一块 spare 盘移除,标记为 Broken disks

Broken disks

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

Page 13: Aggr、Vol和Disk命令详解

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

admin removed v5.27 v5 1 11 FC:B 1 FCAL N/A 520/1065984 527/1080448

admin failed v5.29 v5 1 13 FC:B 1 FCAL N/A 520/1065984 527/1080448

disk replace start [-f] [-m] <disk_name> <spare_disk_name>

tan> disk replace start v5.21 v5.36 =用 v5.36 这块 spare 盘替换 v5.21 这块数据盘,这个过程结束后,两个盘角色互换*** You are about to copy and replace the following file system disk ***

Disk /aggr2/plex1/rg0/v5.21

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

data v5.21 v5 1 5 FC:B 1 FCAL N/A 520/1065984 527/1080448

***

Really replace disk v5.21 with v5.36? yes

spare v5.21 v5 1 5 FC:B 1 FCAL N/A 520/1065984 527/1080448 (not zeroed)

命令结束后 v5.21 这时候变成了 spare 盘。disk scrub [start|stop]

tan> disk scrub start

Sat Apr 3 10:34:53 GMT [raid.rg.scrub.start:notice]: /aggr3/plex0/rg0: starting scrub

Sat Apr 3 10:34:54 GMT [raid.rg.scrub.start:notice]: /aggr2/plex1/rg0: starting scrub

disk show [ -o <ownername> | -s <sysid> | -n | -v | -a]

disk zero spares

零化所有非零化的 spare 盘

三、Vol命令

vol 命令-管理 VOL、显示 VOL 的状态、拷贝 VOL

格式:vol command argument ...

关于 VOL 的详细描述:Volume 是一个存储的逻辑单元,包含了文件系统镜像和相关的管理选项,比如快照计划。在 DataONTAP 7 之前 volume

和 aggr 被合并成一个管理单元,一个 aggr(RAID 级别的一组磁盘)包含一个 volume(逻辑的、用户可见的文件系统),vol

命令既管理底层和磁盘相关的也管理高一层次和文件系统相关的,这种传统卷管理方式还保留着,为与之前的系统兼容。Volume---- logical file systems

Aggregate---- physicalstorage

通过灵活卷技术可以降低管理员的管理难度,提供更大的自由度。一个 aggr 可以包含多个完全独立的灵活卷。每个 aggr 可以包含最多 200 个灵活卷,一个 filer 最多也就是包含 200 个volume.灵活卷可以独立的做快照、快照恢复、拷贝、snapmirroe,而不影响同一个 aggr 里面的其它灵活卷。如果 aggr 里面包含一个或多个灵活卷,则不能 offline 或者 restrict,如果想达到此目的,就需要先摧毁 aggr 里面包含的所有灵活卷。这样确保了访问 vol 上数据的的任何一个协议都能够干净的关掉,node1> aggr status –r ==创建一个传统卷,其实传统卷就类似于现在的 aggr

Aggregate vol1 (online, raid_dp) (zoned checksums)

Plex /vol1/plex0 (online, normal, active)

Page 14: Aggr、Vol和Disk命令详解

RAID group /vol1/plex0/rg0 (normal)

RAID Disk Device HA SHELF BAY CHAN Pool Type RPM Used (MB/blks) Phys (MB/blks)

--------- ------ ------------- ---- ---- ---- ----- -------------- --------------

dparity v4.32 v4 2 0 FC:B - FCAL N/A 520/1065984 527/1080448

parity v4.48 v4 3 0 FC:B - FCAL N/A 520/1065984 527/1080448

data v4.19 v4 1 3 FC:B - FCAL N/A 520/1065984 527/1080448

data v4.33 v4 2 1 FC:B - FCAL N/A 520/1065984 527/1080448

node1> vol create vol2 vol1 5 ====传统卷与 aggr还是有区别的,在传统卷上不可能创建灵活卷vol create: Containing aggregate 'vol1' was not found

由于灵活卷与包含它的 aggr 是一个独立的实体,它们的大小可以增大或者缩小,灵活卷可以小到 20M,灵活卷的最大尺寸依赖于硬件平台和配置,但是不能超过 16TB.

克隆卷可以快速有效的创建一个克隆卷是一个灵活卷的可读快照一个克隆卷与它的源卷应该再一个 aggr 里面,克隆卷的克隆是可以被创建的。FlexCache 卷可以用 vol 命令快速创建 .在本地存储的 flexcache 卷,被作为一个缓存的 filer,它缓存了不同 filer 上volume(这个是作为原始 filer)的副本。 客户访问 flexvache volume 就像访问一个 export 的卷一样。Flexcache 要在caching filer 上打上 license,在原始 filer 上不需要,但是 options flexcache.enable 必须设置为 on,options flexcache.access

也必须是合适的值。当前的 flexcache版本只支持 NFSv2 和 NFSv3。Vol 命令集可以兼容的管理传统卷和灵活卷,新的 aggr 命令管理 RAID 的存储,在 aggr基础上的灵活卷只能通过 vol 命令来管理。Vol 命令可以创建新 vol、摧毁存在的卷、改变卷的状态、增加或减少卷大小、应用 options 到卷、创建和管理灵活卷的克隆、管理卷拷贝。Volume 可以是 online、offline、restrict,当是 restricted 状态时,只能允许特定操作(比如 vol copy 和校验重构),但是数据访问是不允许的,卷可以是以下状态:active_redirect-------在 aggr 中的灵活卷,正好通过-p 选项开始 aggr 再分配或者文件再分配,这个工作已经开始但还没有结束,此时读性能会下降直到再分配成功结束。copying---------当前的卷是当前活动的 vol copy 或 snapmirror 操作的活动卷。

degraded--------包含这个 volume 的 aggr 包含至少一个运行在 degraded 状态的 RG 组。

foreign----------这个卷的磁盘时从其它存储挪过来的。

growing--------正在向包含这个 vol 的 aggr 里面加入磁盘。

initializing-----包含这个 vol 的 aggr 正在初始化。

invalid----------VOL 没有包含一个有效的文件系统,这种情况典型的发生在 vol copy终止这种情况。

ironing---------在 vol 包含的 aggr 中执行 WAFL 一致点检查。

mirror degraded----包含卷的 aggr 是一个镜像 aggr,它中间的一个 plex 是 offline 或正在同步。

mirrored-----------包含 vol 的 aggr 是镜像的,而且它中间所有的 RAID 组都是正常的。

needs check-------包含 VOL 的 aggr 需要一致点检查。

out-of-date--------包含 VOL 的 aggr 是镜像的,需要重新同步。Aggr 中至少有一块盘,但是一个或更多的磁盘丢失。

raid0---------------包含 VOL 的 aggr 是由 RAID0 组成(没有校验信息)。

raid4--------------包含 VOL 的 aggr 是由 RAID4 RG 组组成。

Page 15: Aggr、Vol和Disk命令详解

raid_dp----------包含 VOL 的 aggr 是由 RAID DP RG 组组成。

reconstruct------包含 VOL 的 aggr 至少一个 RG 组正在重构。

redirect---------包含灵活卷的 aggr 正在再分配,是由-p 选项触发的。

resyncing------包含 VOL 的镜像 aggr,其中一个 PLEX 正在同步。

snapmirrored---正在做 snapmirror 复制。

sv-restoring

trad------------传统卷的状态,适用于以前版本的 DataONTAP7. The volume is what is referred to as a traditional

unrecoverable----如果 vol 被标记为这个状态,请联系客户支持。

verifying---------RAID 镜像验证操作正在运行。

wafl inconsistent---vol 或包含它的 aggr 被标记为损坏,这样就得联系技术支持了。

flexcache-----------这个卷是 flexcache 卷。

connecting--------这个卷是 flexcache 卷,但是这个卷和原始卷之间的网络连接还没有建立。

以下是和 vol 相关的命令集:

add create offline scrub autosize destroy online size

clone lang options split container media_scrub rename status

copy mirror restrict verify

(1)、vol add volname [ -f ] [ -n ] [ -g raidgroup ] { ndisks[@size]| -d disk1 [ disk2 ... ] [ -d diskn [ diskn+1 ... ] ]}

向传统卷里面添加磁盘。针对灵活卷,如果想增加磁盘,必须用 aggr add。

(2)、vol autosize volname [ -m size [k|m|g|t] ] [ -i size [k|m|g|t] ] [ on | off | reset ]

这个命令允许灵活卷在 aggr 里面自动增加大小。这个功能非常有用当 vol 的空间已经超过它初始设置的空间大小,但是

包含它的 aggr还有可用空间的时候。这个特性与 snap autodelete 一起工作,当 vol 快满的时候,自动回收空间。缺省情况

下,autosize 是 disabled 的,on 子命令是打开这个选项,Reset 是恢复缺省值,off 是关闭 autosize。

-m 开关指定了灵活卷允许被增长的最大值。-i 选项指定了每次增加步长的大小。当达到指定可以增长的最大值后,就不

能再增长了。

node1> vol autosize voltest -m 200m -i 10m on

vol autosize: Flexible volume 'voltest' autosize settings UPDATED.

(3)、vol clone create clone_vol [ -s none | file | volume ] -b parent_vol [ parent_snap ]

node1> vol clone create volclone -b voltest ==做 clone 之前,克隆卷不存在,做克隆后创建这个卷

Volume clone volclone of volume voltest was created successfully.

Creation of clone volume 'volclone' has completed.

node1> vol status volclone

Page 16: Aggr、Vol和Disk命令详解

Volume State Status Options

volclone online raid_dp, flex create_ucode=on, convert_ucode=on

Clone, backed by volume 'voltest', snapshot 'clone_volclone.1'

Containing aggregate: 'aggr1'

这个命令创建了一个灵活 volume叫”clone_vol”,它是另一个灵活卷 parent_vol 的克隆。克隆卷是另一个卷的可读写快

照,只有在母卷发生变化的时候,才会消耗空间。如果在母卷里面指定了一个快照,则选择为用于 clone 的快照,否则

会为此目的,创建一个名叫 clone_parent_(UUID)的快照为了 clone 的目的。在母卷中 Parent_snap 被锁定,就是为了防止

被删除,除非用 vol split start 命令将 clone 过程 split 或者 destory.母卷是可以自己克隆自己的,一个克隆和其母卷应该在

同一个 aggr 中。卷克隆只能在灵活卷实现,在传统卷不能做卷克隆。

缺省情况下,克隆卷与它的母卷一样被给予相同的存储保证,这个缺省,会在 vol create 时,通过-s 开关覆盖。一个克隆

卷不能作为 vol copy 或者卷 snapmirror 的目标卷,可以用 vol split start volname 命令打破这种克隆关系。这个命令会在后

台化一些时间,这时候可以用 vol clone split status 命令去看命令执行的进程。克隆卷和母卷在 split 过程中是可以获得

的,直到这个过程结束,克隆卷依据的母卷快照才可以解除锁定。

(4)、vol clone split status [volname]

node1> vol clone split status volclone

vol clone split status: The volume is not a clone

这个命令显示隔离克隆卷和母卷这个过程的状态。

(5)、vol clone split estimate [volname]

node1> vol clone split estimate volclone

An estimated 1mb available storage is required in the aggregate to split

clone volume 'volclone' from its parent.

估计分离克隆卷,所需要消耗的磁盘空间。

(6)、node1> vol clone split start volclone ==分离克隆卷与母卷的克隆关系

Tue Apr 6 11:53:23 GMT [wafl.volume.clone.split.started:info]: Clone split was started for volume volclone

Tue Apr 6 11:53:23 GMT [wafl.scan.start:info]: Starting volume clone split on volume volclone.

Clone volume 'volclone' will be split from its parent.

Monitor system log or use 'vol clone split status' for progress.

node1> Tue Apr 6 11:53:25 GMT [wafl.scan.clone.split.complete:info]: Clone split complete for Volume volclone

(7)、vol clone split stop volname

把分离克隆卷和母卷的进程 stop 了,所有已经分离的数据块(由 vol clone split start 命令引起的)还保持分离状态。

(8)、vol container volname

Page 17: Aggr、Vol和Disk命令详解

node1> vol container voltest

Volume 'voltest' is contained in aggregate 'aggr1'

node1> vol container vol1

vol container: Volume 'vol1' must be a flexible volume.

这个命令显示灵活卷被那个 aggr 包含,传统卷这个命令无效。

(9)、vol copy abort operation_number | all

终止 vol copy 操作。

(10)、vol copy start [ -S | -s snapshot ] source destination

node1> vol copy start voltest volclone

VOLCOPY: Aborting: Destination volume volclone is a clone. =clone 卷不允许拷贝

拷贝所有数据包括快照从一个卷到另一个卷。可以在同一存储的不同卷之间拷贝,也可以在不同存储的不同卷之间拷

贝,目标卷大小必须大于源卷。

(11)、vol copy status [ operation_number]

显示卷拷贝的状态,可以调整卷拷贝的速度。

(12)、vol create flex_volname [ -l language_code ] [ -s none | file | volume ] aggrname size

创建灵活卷,这个命令是在 aggr 里面创建灵活卷,size参数指定卷的大小,-s 开关控制是否为卷保证一定数量的磁盘空

间,这意味着卷的整个大小是预分配好的,file值意味着卷里面所有空间保留的文件和 LUN 的空间都是预先分配

的,NONE值意味没有空间被预分配,即使卷包含空间保留的文件和 LUN,如果 aggr 是 snaplock aggr,则在里面创建

的灵活卷也将是 snaplock 卷,并自动继承 snaplock 类型(compliance 或者 enterprise)。

(13) 、 vol create trad_volname [ -l language_code ] [-f] [-n] [-m] [-L [compliance | enterprise]] [-t raidtype ] [-r raidsize ]

{ ndisks[@size]| -d disk1 [ disk2 ... ] [ -d diskn [ diskn+1 ... ] ]}

创建传统卷。这个命令创建传统卷,用指定的一组磁盘。

(14)、vol create flexcache_volname [ -l language_code ] aggrname size [ size [k|m|g|t] ]

[ -S remotehost:remotevolume ]

创建 flexcache_vol,为远端主机的一个卷创建 flexvolume,必须加上 flexvolume 的 license.如果没有指定 flexcache 卷的

大小,则自动增长的特性被激活。最初的尺寸是灵活卷可以达到的最小尺寸,但大小可以自动增长,NETAPP 推荐让其

自动增长大小。-l 开关指定卷的语言代码,缺省时和存储的 root volume 的语言代码一致。

Language codes are:

C (POSIX)

ar (Arabic)

cs (Czech)

Page 18: Aggr、Vol和Disk命令详解

da (Danish)

de (German) en (English)

en_US (English (US))

es (Spanish)

fi (Finnish)

fr (French)

tr (Turkish) zh (Simplified Chinese)

zh.GBK (Simplified Chinese (GBK))

zh_TW (Traditional Chinese euc-tw)

zh_TW.BIG5 (Traditional Chinese Big 5)

UTF-8 一般作为 NFS 的字符集。

vol create will create a default entry in the

/etc/exports file unless the option

nfs.export.auto-update is disabled.

To create a SnapLock volume, specify -L flag with

vol create command. This flag is only supported if

either SnapLock Compliance or SnapLock Enterprise

is licensed. The type of the SnapLock volume cre-

ated, either Compliance or Enterprise, is deter-

mined by the type of installed SnapLock license.

If both SnapLock Compliance and SnapLock Enterprise

are licensed, use -L compliance or -L enterprise to

specify the desired volume type. vol destroy { volname | plexname } [ -f ]

Destroys the (traditional or flexible) volume named

volname, or the plex named plexname within a tra-

ditional mirrored volume.

Before destroying the volume or plex, the user is

prompted to confirm the operation. The -f flag can

be used to destroy a volume or plex without prompt-

Page 19: Aggr、Vol和Disk命令详解

ing.

It is acceptable to destroy flexible volume volname

even if it is the last one in its containing aggre-

gate. In that case, the aggregate simply becomes

devoid of user-visible file systems, but fully

retains all its disks, RAID groups, and plexes.

If a plex within a traditional mirrored volume is

destroyed in this way, the traditional volume is

left with just one plex, and thus becomes unmir-

rored. All of the disks in the plex or traditional volume

destroyed by this operation become spare disks.

Only offline volumes and plexes can be destroyed.

vol destroy will delete all entries belonging to

the volume in the /etc/exports file unless the

option nfs.export.auto-update is disabled.

(15)、vol lang [ volname [ language_code ] ]

node1> vol lang voltest

Volume language is en_US (English (US))

如果没有任何参数,则显示所支持语言的列表,如果指定了卷名,则显示指定卷的语言,如果指定了卷和语言,则设

置这个卷的语言为设定的语言。

node1> vol lang voltest en

(16)、vol media_scrub status [ volname | plexname | groupname | -s disk-name ] [-v]

node1> vol media_scrub status

vol media_scrub /vol1/plex0/rg0 is 31% complete

显示 media scrub 的状态,只针对传统卷、plex、RG 组或 spare 盘。

node1> vol media_scrub status -v

vol media_scrub: status of /vol1/plex0/rg0 :

Page 20: Aggr、Vol和Disk命令详解

Current instance of media_scrub is 38% complete.

Media scrub started at Tue Apr 6 12:12:00 GMT 2010

Last full media_scrub completed: Tue Apr 6 12:10:17 GMT 2010 显示上次 full media scrub 的时间

针对灵活卷使用 aggr media_scrub 命令。

(17)、vol mirror volname [ -n ] [ -v victim_volname ] [ -f ] [ -d disk1 [ disk2 ... ] ]

Mirrors the currently-unmirrored traditional volume

volname, either with the specified set of disks or

with the contents of another unmirrored traditional

volume victim_volname, which will be destroyed in

the process.

The vol mirror command fails if either the chosen volname or victim_volname are flexible

volumes.

Flexible volumes require that any operations having

directly to do with their containing aggregates be

handled via the new aggr command suite.

For more information about the arguments used for

this command, see the information for the aggr mir-

ror command on the na_aggr(1) man page.

vol offline { volname | plexname }

[ -t cifsdelaytime ]

Takes the volume named volname (or the plex named

plexname within a traditional volume) offline. The

command takes effect before returning. If the vol-

ume is already in restricted state, then it is

already unavailable for data access, and much of

the following description does not apply.

Page 21: Aggr、Vol和Disk命令详解

The current root volume may not be taken offline.

Neither may a volume marked to become root (by

using vol options volname root) be taken offline. If a volume contains CIFS shares, users should be

warned before taking the volume offline. Use the

-t option to do this. The cifsdelaytime argument

specifies the number of minutes to delay before

taking the volume offline, during which time CIFS

users are warned of the pending loss of service. A

time of 0 means that the volume should be taken

offline immediately and without warning. CIFS

users can lose data if they are not given a chance

to terminate applications gracefully.

If a plexname is specified, the plex must be part

of a mirrored traditional volume, and both plexes

must be online. Prior to offlining a plex, the

system will flush all internally-buffered data

associated with the plex and create a snapshot that

is written out to both plexes. The snapshot allows

for efficient resynchronization when the plex is

subsequently brought back online.

A number of operations being performed on the vol- ume in question can prevent vol offline from

suc-

ceeding for various lengths of time. If such oper-

ations are found, there will be a one-second wait

for such operations to finish. If they do not, the

command is aborted.

A check is also made for files on the volume opened

Page 22: Aggr、Vol和Disk命令详解

by internal ONTAP processes. The command is

aborted if any are found.

The vol offline command fails if plexname resides

not in a traditional mirrored volume, but in an

independent aggregate. Flexible volumes require

that any operations having directly to do with

their containing aggregates be handled via the new

aggr command suite. In this specific case, the

administrator should consult the na_aggr(1) man

page for a more detailed description of the aggr

offline command.

vol online { volname [ -f ] | plexname } This command brings the volume named volname (or

the plex named plexname within a traditional vol-

ume) online. It takes effect immediately. If

there are CIFS shares associated with the volume,

they are enabled.

If a volname is specified, it must be currently

offline, restricted, or in a foreign aggregate. If

volname belongs to a foreign aggregate, the aggre-

gate will be made native before being brought

online. A foreign aggregate is an aggregate that

consists of disks moved from another filer and that

has never been brought online on the current filer.

Aggregates that are not foreign are considered

native.

If the volume is inconsistent but has not lost

data, the user will be cautioned and prompted

Page 23: Aggr、Vol和Disk命令详解

before bringing it online. The -f flag can be used

to override this behavior. It is advisable to run

WAFL_check (or do a snapmirror initialize in case

of a replica volume) prior to bringing an inconsis- tent volume online. Bringing an inconsistent vol-

ume online increases the risk of further file sys-

tem corruption. If the volume is inconsistent and

has experienced possible loss of data, it cannot be

brought online unless WAFL_check (or snapmirror

initialize) has been run on the volume.

If the volume is a flexible volume and the contain-

ing aggregate can not honor the space guarantees

required by this volume, the volume online opera-

tion will fail. The -f flag can be used to override

this behavior. It is not advisable to use volumes

with their space guarantees disabled. Lack of free

space can lead to failure of writes which in turn

can appear as data loss to some applications.

If a plexname is specified, the plex must be part

of an online, mirrored traditional volume. The

system will initiate resynchronization of the plex

as part of online processing.

The vol online command fails if plexname resides not in a traditional volume, but in an

independent

aggregate. Flexible volumes require that any oper-

ations having directly to do with their containing

aggregates be handled via the new aggr command

suite. In this specific case, the administrator

should consult the na_aggr(1) man page for a more

Page 24: Aggr、Vol和Disk命令详解

detailed description of the aggr online command.

vol options volname [ optname optval ]

This command displays the options that have been

set for volume volname, or sets the option named

optname of the volume named volname to the value

optval.

The command remains effective after the filer is

rebooted, so there is no need to add vol options

commands to the /etc/rc file. Some options have

values that are numbers. Other options have values

that may be on (which can also be expressed as yes,

true, or 1) or off (which can also be expressed as

no, false, or 0). A mixture of uppercase and low- ercase characters can be used when typing the

value

of an option. The vol status command displays the

options that are set per volume. The root option

is special in that it does not have a value. To

set the root option, use this syntax:

vol options volname root

There are three categories of options handled by

this command. The first category is the set of

options that are defined for all volumes, both

flexible and traditional, since they have to do

with the volume's user-visible file system aspects.

The second category is the set of aggregate-level

(i.e., disk and RAID) options that only apply to

Page 25: Aggr、Vol和Disk命令详解

traditional volumes and not to flexible volumes.

The third category is the set of options that are

applicable only to FlexCache volumes.

This section documents all three categories of

options. It begins by describing, in alphabetical

order, options common to all volumes (both flexible and traditional) and their possible values:

convert_ucode on | off

Setting this option to on forces conversion

of all directories to UNICODE format when

accessed from both NFS and CIFS. By

default, it is set to off, in which case

access from CIFS causes conversion of

pre-4.0 and 4.0 format directories. Access

from NFS causes conversion of 4.0 format

directories. The default setting is off.

create_ucode on | off

Setting this option to on forces UNICODE

format directories to be created by default,

both from NFS and CIFS. By default, it is

set to off, in which case all directories

are created in pre-4.0 format, and the first

CIFS access will convert it to UNICODE for-

mat. The default setting is off. extent on | off

Setting this option to on enables extents in

the volume. This causes application writes

Page 26: Aggr、Vol和Disk命令详解

to be written in the volume as a write of a

larger group of related data blocks called

an extent. Using extents may help workloads

that perform many small random writes fol-

lowed by large sequential reads. However,

using extents may increase the amount of

disk operations performed on the filer, so

this option should only be used where appli-

cable. The default value is off, in which

case extents are not used.

fractional_reserve <pct>

This option decreases the amount of space

reserved for overwrites of reserved objects

(LUNs, files) in a volume. The option is set

to 100 by default and indicates that 100% of the required reserved space will actually be

reserved so the objects are fully protected

for overwrites. The value can vary from 0

to 100. Using a value of less than 100 indi-

cates what percentage of the required

reserved space should actually be reserved.

This returns the extra space to the avail-

able space for the volume, decreasing the

total amount of space used. However, this

does leave the protected objects in the vol-

ume vulnerable to out of space errors since

less than 100% of the required reserved

space is actually reserved. If reserved

space becomes exhausted this will cause dis-

ruptions on the hosts using the objects. If

Page 27: Aggr、Vol和Disk命令详解

the percentage is decreased below 100%, it

is highly recommended that the administrator

actively monitor the space usage on the vol-

ume and take corrective action if the

reserved space nears exhaustion.

fs_size_fixed on | off This option causes the file system to remain

the same size and not grow or shrink when a

SnapMirrored volume relationship is broken,

or when a vol add is performed on it. This

option is automatically set to be on when a

volume becomes a SnapMirrored volume. It

will remain on after the snapmirror break

command is issued for the volume. This

allows a volume to be SnapMirrored back to

the source without needing to add disks to

the source volume. If the volume size is

larger than the file system size, turning

off this option will force the file system

to grow to the size of the volume. The

default setting is off.

guarantee file | volume | none

This option controls whether the volume is

guaranteed some amount of disk space. The

default value is volume, which means that the entire size of the volume will be preal-

located. The file value means that space

will be preallocated for all the space-

reserved files and LUNs within the volume.

Storage is not preallocated for files and

Page 28: Aggr、Vol和Disk命令详解

LUNs that are not space-reserved. Writes to

these can fail if the underlying aggregate

has no space available to store the written

data. The none value means that no space

will be preallocated, even if the volume

contains space-reserved files or LUNs; if

the aggregate becomes full, space will not

be available even for space-reserved files

and LUNs within the volume. Note that both

the none and file settings allow for over-

booking the containing aggregate aggrname.

As such, it will be possible to run out of

space in the new flexible volume even though

it has not yet consumed its stated size.

Use these settings carefully, and take care

to regularly monitor space utilization in

overbooking situations. For flexible root volumes, to ensure that system files, log

files, and cores can be saved, the guarantee

must be volume. This is to ensure support

of the appliance by customer support, if a

problem occurs.

Disk space is preallocated when the volume

is brought online and, if not used, returned

to the aggregate when the volume is brought

offline. It is possible to bring a volume

online even when the aggregate has insuffi-

cient free space to preallocate to the vol-

ume. In this case, no space will be preal-

located, just as if the none option had been

selected. The vol options and vol status

Page 29: Aggr、Vol和Disk命令详解

command will display the actual value of the

guarantee option, but will indicate that it

is disabled.

maxdirsize number

Sets the maximum size (in KB) to which a directory can grow. This is set to 1% of

the total system memory by default. Most

users should not need to change this set-

ting. If this setting is changed to be

above the default size, a notice message

will be printed to the console explaining

that this may impact performance. This

option is useful for environments in which

system users may grow a directory to a size

that starts impacting system performance.

When a user tries to create a file in a

directory that is at the limit, the system

returns a ENOSPC error and fails the create.

minra on | off

If this option is on, the filer performs

minimal file read-ahead on the volume. By

default, this option is off, causing the

filer to perform speculative file read-ahead

when needed. Using speculative read-ahead

will improve performance with most work- loads, so enabling this option should be

used with caution.

no_atime_update on | off

Page 30: Aggr、Vol和Disk命令详解

If this option is on, it prevents the update

of the access time on an inode when a file

is read. This option is useful for volumes

with extremely high read traffic, since it

prevents writes to the inode file for the

volume from contending with reads from other

files. It should be used carefully. That

is, use this option when it is known in

advance that the correct access time for

inodes will not be needed for files on that

volume. The default setting is off.

no_i2p on | off

If this option is on, it disables inode to

parent pathname translations on the volume.

The default setting is off. nosnap on | off

If this option is on, it disables automatic

snapshots on the volume. The default set-

ting is off.

nosnapdir on | off

If this option is on, it disables the visi-

ble .snapshot directory that is normally

present at client mount points, and turns

off access to all other .snapshot directo-

ries in the volume. The default setting is

off.

Page 31: Aggr、Vol和Disk命令详解

nvfail on | off

If this option is on, the filer performs

additional status checking at boot time to

verify that the NVRAM is in a valid state.

This option is useful when storing database files. If the filer finds any problems,

database instances hang or shut down, and

the filer sends error messages to the con-

sole to alert administrators to check the

state of the database. The default setting

is off.

root [ -f ]

The volume named volname will become the

root volume for the filer on the next

reboot. This option can be used on one vol-

ume only at any given time. The existing

root volume will become a non-root volume

after the reboot.

Until the system is rebooted, the original

volume will continue to show root as one of

its options, and the new root volume will

show diskroot as an option. In general, the

volume that has the diskroot option is the

one that will be the root volume following the next reboot.

The only way to remove the root status of a

volume is to set the root option on another

Page 32: Aggr、Vol和Disk命令详解

volume.

The act of setting the root status on a

flexible volume will also move the HA mail-

box disk information to disks on that vol-

umes. A flexible volume must meet the mini-

mum size requirement for the appliance

model, and also must have a space guarantee

of volume, before it can be designated to

become the root volume on the next reboot.

This is to ensure support of the appliance

by customer support, because the root volume

contains system files, log files, and in the

event of reboot panics, core files.

Since setting a volume to be a root volume

is an important operation, the user is

prompted if they want to continue or not. If system files are not detected on the tar-

get volume, then the set root operation will

fail. You can override this with the -f

flag, but upon reboot, the appliance will

need to be reconfigured via setup.

Note that it is not possible to set the root

status on a SnapLock volume.

schedsnapname create_time | ordinal

If this option is ordinal, the filer formats

scheduled snapshot names using the type of

the snapshot and its ordinal (such as

Page 33: Aggr、Vol和Disk命令详解

hourly.0) If the option is create_time, the

filer formats scheduled snapshot names base

on the type of the snapshot and the time at

which it was created, such as

hourly.2005-04-21_1100. The default setting

is ordinal.

snaplock_compliance This read only option indicates that the

volume is a SnapLock Compliance volume. Vol-

umes can only be designated SnapLock Compli-

ance volumes at creation time.

snaplock_default_period min | max | infinite |

<count>d|m|y

This option is only visible for SnapLock

volumes and specifies the default retention

period that will be applied to files commit-

ted to WORM state without an associated

retention period.

If this option value is min then

snaplock_minimum_period is used as the

default retention period. If this option

value is max then snaplock_maximum_period is

used as the default retention period. If

this option value is infinite then a reten-

tion period that never expires will be used as the default retention period.

The retention period can also be explicitly

specified as a number followed by a suffix.

Page 34: Aggr、Vol和Disk命令详解

The valid suffixes are d for days, m for

months and y for years. For example, a

value of 6m represents a retention period of

6 months. The maximum valid retention period

is 70 years.

snaplock_enterprise

This read only option indicates that the

volume is a SnapLock Enterprise volume. Vol-

umes can only be designated SnapLock Enter-

prise volumes at creation time.

snaplock_maximum_period infinite | <count>d|m|y

This option is only visible for SnapLock

volumes and specifies the maximum allowed

retention period for files committed to WORM state on the volume. Any files committed

with a retention period longer than this

maximum will be assigned this maximum value.

If this option value is infinite then files

that have retention periods that never

expire may be committed to the volume.

Otherwise, the retention period is specified

as a number followed by a suffix. The valid

suffixes are d for days, m for months and y

for years. For example, a value of 6m repre-

sents a retention period of 6 months. The

maximum allowed retention period is 70

Page 35: Aggr、Vol和Disk命令详解

years.

snaplock_minimum_period infinite | <count>d|m|y

This option is only visible for SnapLock

volumes and specifies the minimum allowed

retention period for files committed to WORM

state on the volume. Any files committed with a retention period shorter than this

minimum will be assigned this minimum value.

If this option value is infinite then every

file committed to the volume will have a

retention period that never expires.

Otherwise, the retention period is specified

as a number followed by a suffix. The valid

suffixes are d for days, m for months and y

for years. For example, a value of 6m repre-

sents a retention period of 6 months. The

maximum allowed retention period is 70

years.

snapmirrored off

If SnapMirror is enabled, the filer automat-

ically sets this option to on. Set this

option to off if SnapMirror is no longer to

be used to update the mirror. After setting

this option to off, the mirror becomes a regular writable volume. This option can

only be set to off; only the filer can

change the value of this option from off to

Page 36: Aggr、Vol和Disk命令详解

on.

snapshot_clone_dependency on | off

Setting this option to on will unlock all

initial and intermediate backing snapshots

for all inactive LUN clones. For active LUN

clones, only the backing snapshot will be

locked. If the option is off the backing

snapshot will remain locked until all inter-

mediate backing snapshots are deleted.

try_first volume_grow | snap_delete

A flexible volume can be configured to

automatically reclaim space in case the vol-

ume is about to run out of space, by either

increasing the size of the volume or delet-

ing snapshots in the volume. If this option is set to volume_grow ONTAP will try to

first increase the size of volume before

deleting snapshots to reclaim space. If the

option is set to fBsnap_delete ONTAP will

first automatically delete snapshots and in

case of failure to reclaim space will try to

grow the volume.

svo_allow_rman on | off

If this option is on, the filer performs

SnapValidator for Oracle data integrity

checks that are compatible with volumes that

Page 37: Aggr、Vol和Disk命令详解

contain Oracle RMAN backup data.If the filer

finds any problems, the write will be

rejected if the svo_reject_errors option is

set to on. The default setting is off.

svo_checksum on | off

If this option is on, the filer performs

additional SnapValidator for Oracle data integrity checksum calculations of all

writes on the volume. If the filer finds any

problems, the write will be rejected if the

svo_reject_errors option is set to on. The

default setting is off.

svo_enable on | off

If this option is on, the filer performs

additional SnapValidator for Oracle data

integrity checking of all operations on the

volume. If the filer finds any problems, the

operation will be rejected if the

svo_reject_errors option is set to on. The

default setting is off.

svo_reject_errors on | off

If this option is on, the filer will return

an error to the host and log the error if

any of the SnapValidator for Oracle checks

fail. If the option is off, the error will be logged only. The default setting is off.

Page 38: Aggr、Vol和Disk命令详解

The second category of options managed by the vol

options command comprises the set of things that

are closely related to aggregate-level (i.e., disk

and RAID) qualities, and are thus only accessible

via the vol options command when dealing with tra-

ditional volumes. Note that these aggregate-level

options are also accessible via the aggr family of

commands. The list of these aggregate-level

options is provided below in alphabetical order:

ignore_inconsistent on | off

If this option is set to on, then aggregate-

level inconsistencies that would normally be

considered serious enough to keep the asso-

ciated volume offline are ignored during

booting. The default setting is off.

raidsize number The -r raidsize argument specifies the maxi-

mum number of disks in each RAID group in

the traditional volume. The maximum and

default values of raidsize are platform-

dependent, based on performance and relia-

bility considerations.

raidtype raid4 | raid_dp | raid0

The -t raidtype argument specifies the type

of RAID group(s) to be used to create the

traditional volume. The possible RAID group

types are raid4 for RAID-4, raid_dp for

Page 39: Aggr、Vol和Disk命令详解

RAID-DP (Double Parity), and raid0 for sim-

ple striping without parity protection.

Setting the raidtype on V-Series systems is

not permitted; the default of raid0 is

always used.

resyncsnaptime number

This option is used to set the mirror resyn- chronization snapshot frequency (in min-

utes). The default value is 60 minutes.

For new volumes, options convert_ucode, create_ucode, and

maxdirsize get their values from the root volume. If the

root volume doesn't exist, they get the default values.

There are a set of options managed by the vol options com-

mand that are tied to FlexCache volumes. The list of these

options are as follows:

acregmax <timeout>m|h|d|w

Attribute Cache regular file timeout. The amount of

time (in seconds) which the cache considers regular

files on the given volume to be valid before con-

sulting the origin. The timeout value is a number,

optionally followed by m, h, d or w, denoting min-

utes, hours, days or weeks respectively. If none of

the above letters is used, the unit defaults to

seconds. acdirmax <timeout> m|h|d|w

Similar to acregmax, but for directories.

Page 40: Aggr、Vol和Disk命令详解

acsymmax <timeout> m|h|d|w

Similar to acregmax, but for symbolic links.

actimeo <timeout> m|h|d|w

Attribute Cache default timeout. This is applied to

all filetypes that have no explicit timeout

assigned by one of the above attribute cache

options.

flexcache_autogrow on | off

Setting this option to on enables autogrow on the

FlexCache volume. This causes the FlexCache volume

to automatically grow, if there is room in the

aggregate, in order to avoid evictions. Setting

this option to off will cause the FlexCache volume to no longer automatically grow. The size will not

be reverted back to its original size. This option

is only valid on FlexCache volumes. Autogrow will

be enabled by default on new FlexCache volumes that

are created without a size parameter.

flexcache_min_reserve size

Alter the space reserved in the aggregate for the

given FlexCache volume, such that the volume is

guaranteed to be able to cache up to size data. The

size paramater is given as in the vol create com-

mand.

Page 41: Aggr、Vol和Disk命令详解

vol rename volname newname

Renames the volume named volname to the name new-

name. vol rename will rewrite all entries belong-

ing to the volume in the /etc/exports file unless

the option nfs.export.auto-update is disabled.

vol restrict volname [ -t cifsdelaytime ]

Put the volume volname in restricted state, start-

ing from either online or offline state. If the

volume is online, then it will be made unavailable

for data access as described above under vol

offline.

If a volume contains CIFS shares, users should be

warned before taking the volume offline. Use the

-t option for this. The cifsdelaytime argument

specifies the number of minutes to delay before

taking the volume offline, during which time CIFS

users are warned of the pending loss of service. A

time of 0 means take the volume offline immediately

with no warnings given. CIFS users can lose data

if they are not given a chance to terminate appli-

cations gracefully.

vol scrub resume [ volname | plexname | groupname ]

Resume parity scrubbing on the named traditional volume, plex, or RAID group. If no name is

given,

Page 42: Aggr、Vol和Disk命令详解

then all suspended parity scrubs are resumed.

The vol scrub resume command fails if the chosen

volname is a flexible volume. Flexible volumes

require that any operations having directly to do

with their containing aggregates be handled via the

new aggr command suite. In this specific case, the

administrator should use the aggr scrub resume com-

mand.

vol scrub start [ volname | plexname | groupname ]

Start parity scrubbing on the named traditional

volume, plex, or RAID group. If volname is a

flexible volume, vol scrub start aborts.

Parity scrubbing compares the data disks to the

parity disk in a RAID group, correcting the parity

disk's contents as necessary.

If no name is given, then start parity scrubs on all online RAID groups on the filer. If a tradi-

tional volume is given, scrubbing is started on all

RAID groups contained in the traditional volume.

Similarly, if a plex name is given, scrubbing is

started on all RAID groups in the plex.

The vol scrub start command fails if the chosen

volname is a flexible volume. Flexible volumes

require that any operations having directly to do

with their containing aggregates be handled via the

new aggr command suite. In this specific case, the

Page 43: Aggr、Vol和Disk命令详解

administrator should use the aggr scrub start com-

mand.

vol scrub status [ volname | plexname | groupname ]

[ -v ]

Print the status of parity scrubbing on the named

traditional volume, plex or RAID group. If no name

is provided, the status is given on all RAID groups

currently undergoing parity scrubbing. The status

includes a percent-complete as well as the scrub's suspended status (if any).

The -v flag displays the date and time at which the

last full scrub completed, along with the current

status on the named traditional volume, plex, or

RAID group. If no name is provided, full status is

provided for all RAID groups on the filer.

The vol scrub status command fails if the chosen

volname is a flexible volume. Flexible volumes

require that any operations having directly to do

with their containing aggregates be handled via the

new aggr command suite. In this specific case, the

administrator should use the aggr scrub status com-

mand.

vol scrub stop [ volname | plexname | groupname ]

Stop parity scrubbing for the named traditional

volume, plex or RAID group. If no name is given,

then parity scrubbing is stopped on any RAID group

Page 44: Aggr、Vol和Disk命令详解

on which one is active. The vol scrub stop command fails if the chosen vol-

name is a flexible volume. Flexible volumes

require that any operations having directly to do

with their containing aggregates be handled via the

new aggr command suite. In this specific case, the

administrator should use the aggr scrub stop com-

mand.

vol scrub suspend [ volname | plexname | groupname ]

Suspend parity scrubbing on the named traditional

volume, plex, or RAID group. If no name is given,

all active parity scrubs are suspended.

The vol scrub suspend command fails if the chosen

volname is a flexible volume. Flexible volumes

require that any operations having directly to do

with their containing aggregates be handled via the

new aggr command suite. In this specific case, the

administrator should use the aggr scrub suspend

command. vol size volname [[+|-]size]

This command sets or displays the given flexible

volume's size as specified, using space from the

volume's containing aggregate. It can make the

flexible volume either larger or smaller. The size

argument has the same form and obeys the same rules

as when it is used in the vol create command to

create a flexible volume. Be careful if the sum of

the sizes of all flexible volumes in an aggregate

exceeds the size of the aggregate.

Page 45: Aggr、Vol和Disk命令详解

If [+|-]size is used, then the flexible volume's

size is changed (grown or shrunk) by that amount.

Otherwise, the volume size is set to size (rounded

up to the nearest 4 KB).

When displaying the flexible volume's size, the

units used have the same form as when creating the

volume or setting the volume size. The specific

unit chosen for a given size is based on matching the volume size to an exact number of a specific

unit. k is used if no larger units match.

The file system size of a readonly replica flexible

volume, such as a snapmirror destination, is deter-

mined from the replica source. In such cases, the

value set in vol size is interpreted as an upper

limit on the size. A flexible volume with the

fs_size_fixed option set may have its size dis-

played, but not changed.

A flexible root volume cannot be shrunk below a

minimum size determined by the appliance model.

This to ensure that there is sufficient space in

the root volume to store system files, log files,

and core files for use by NetApp technical support

if a problem with the system occurs.

The amount of space available for the active

filesystem in a volume is limited by the snapshot

reservation set for that volume. The snapshot

reservation should be taken into account when siz- ing a volume. See na_snap (1) for details on how

Page 46: Aggr、Vol和Disk命令详解

to

set a volume's snapshot reservation.

vol split plexname volname

This command removes plexname from a mirrored tra-

ditional volume and creates a new, unmirrored tra-

ditional volume named volname that contains the

plex. The original mirrored traditional volume

becomes unmirrored. The plex to be split from the

original traditional volume must be functional (not

partial), but it could be inactive, resyncing, or

out-of-date. The vol split can therefore be used

to gain access to a plex that is not up to date

with respect to its partner plex if its partner

plex is currently failed.

If the plex is offline at the time of the split,

the resulting traditional volume will be offline.

Otherwise, the resulting traditional volume will

be in the same online/offline/restricted state as

the original traditional volume. A split mirror can be joined back together via the -v option to

vol mirror.

The aggr split command is the preferred way to

split off plexes. It is the only way to split off

plexes from mirrored aggregates that contain flexi-

ble volumes.

vol status [ volname ]

[ -r | -v | -d | -l | -c | -b | -s | -f | -m]

Page 47: Aggr、Vol和Disk命令详解

Displays the status of one or all volumes on the

filer. If volname is used, the status of the spec-

ified volume is printed. Otherwise, the status of

all volumes in the filer are printed. By default,

it prints a one-line synopsis of the volume, which

includes the volume name, its type (either tradi-

tional or flexible), whether it is online or

offline, other states (for example, partial,

degraded, wafl inconsistent and so on) and per-vol-

ume options. Per-volume options are displayed only

if the options have been turned on using the vol options command. If the wafl inconsistent state is

displayed, please contact Customer Support.

When run in a vfiler context only the -v, -l, -b,

and -? flags can be passed to vol status.

The -v flag shows the on/off state of all per-vol-

ume options and displays information about each

plex and RAID group within the traditional volume

or the aggregate containing the flexible volume.

aggr status -v is the preferred manner of obtaining

the per-aggregate options and the RAID information

associated with flexible volumes.

The -r flag displays a list of the RAID information

for the traditional volume or the aggregate con-

taining the flexible volume. If no volname is

specified, it prints RAID information about all

traditional volumes and aggregates, information

about file system disks, spare disks, and failed

Page 48: Aggr、Vol和Disk命令详解

disks. For more information about failed disks,

see the -f option description below.

The -d flag displays information about the disks in

the traditional volume or the aggregate containing

the flexible volume. The types of disk information

are the same as those from the sysconfig -d com-

mand. aggr status -d is the preferred manner of

obtaining this low-level information for aggregates

that contain flexible volumes.

The -l flag displays, for each volume on a filer,

the name of the volume, the language code, and lan-

guage being used by the volume.

The -c flag displays the upgrade status of the

Block Checksums data integrity protection feature

for the traditional volume or the aggregate con-

taining the flexible volume. aggr status -c is the

preferred manner of obtaining this information for

a flexible volume's containing aggregate.

The -b is used to get the size of source and desti-

nation traditional volumes for use with SnapMirror. The output contains the size of the traditional

volume and the size of the file system in the vol-

ume. SnapMirror and aggr copy use these numbers to

determine if the source and destination volume

sizes are compatible. The file system size of the

source must be equal or smaller than the volume

size of the destination. These numbers can be dif-

ferent if using SnapMirror between volumes of dis-

similar geometry.

Page 49: Aggr、Vol和Disk命令详解

The -s flag displays a list of the spare disks on

the system. aggr status -s is the preferred manner

of obtaining this information.

The -m flag displays a list of the disks in the

system that are sanitizing, in recovery mode, or in

maintenance testing.

The -f flag displays a list of the failed disks on

the system. The command output includes the disk

failure reason which can be any of following: unknown Failure reason unknown.

failed Data ONTAP failed disk, due to a

fatal disk error.

admin failed User issued a 'disk fail' command

for this disk.

labeled broken Disk was failed under Data ONTAP

6.1.X or an earlier version.

init failed Disk initialization sequence failed.

admin removed User issued a 'disk remove' command

for this disk.

not responding Disk not responding to requests.

pulled Disk was physically pulled or no

data path exists on which to access

the disk.

bypassed Disk was bypassed by ESH.

aggr status -f is the preferred manner of obtaining this

information.

vol verify resume [ volname ]

Page 50: Aggr、Vol和Disk命令详解

Resume RAID mirror verification on the given tradi- tional volume. If no volume name is given,

then

resume all suspended RAID mirror verification oper-

ations.

The vol verify resume command fails if the chosen

volname is a flexible volume. Flexible volumes

require that any operations having directly to do

with their containing aggregates be handled by the

new aggr command suite. In fact, the administrator

should always use the aggr verify resume command.

vol verify start [ volname ] [ -f plexnumber ]

Start RAID mirror verification on the named online,

mirrored traditional volume. If no name is given,

then RAID mirror verification is started on all

traditional volumes and aggregates on the filer.

RAID mirror verification compares the data in both

plexes of a mirrored traditional volume or aggre-

gate. In the default case, all blocks that differ

are logged, but no changes are made. If the -f flag is given, the plex specified is fixed to match

the other plex when mismatches are found. A volume

name must be specified with the -f plexnumber

option.

The vol verify start command fails if the chosen

volname is a flexible volume. Flexible volumes

require that any operations having directly to do

Page 51: Aggr、Vol和Disk命令详解

with their containing aggregates be handled by the

new aggr command suite. In fact, the administrator

should always use the aggr verify start command.

vol verify status [ volname ]

Print the status of RAID mirror verification on the

given traditional volume. If no volume name is

given, then provide status for all active RAID mir-

ror verification operations. The status includes a

percent-complete and the verification's suspended

status (if any).

The vol verify status command fails if the chosen volname is a flexible volume. Flexible volumes

require that any operations having directly to do

with their containing aggregates be handled by the

new aggr command suite. In fact, the administrator

should always use the aggr verify status command.

vol verify stop [ volname ]

Stop RAID mirror verification on the named tradi-

tional volume. If no volume name is given, stop

all active RAID mirror verification operations on

traditional volumes and aggregates.

The vol verify stop command fails if the chosen

volname is a flexible volume. Flexible volumes

require that any operations having directly to do

with their containing aggregates be handled by the

new aggr command suite. In fact, the administrator

Page 52: Aggr、Vol和Disk命令详解

should always use the aggr verify stop command.

vol verify suspend [ volname ] Suspend RAID mirror verification on the named tra-

ditional volume. If no volume name is given, then

suspend all active RAID mirror verification opera-

tions on traditional volumes and aggregates.

The vol verify suspend command fails if the chosen

volname is a flexible volume. Flexible volumes

require that any operations having directly to do

with their containing aggregates be handled by the

new aggr command suite. In fact, the administrator

should always use the aggr verify suspend command.

CLUSTER CONSIDERATIONS

Volumes on different filers in a cluster can have the same

name. For example, both filers in a cluster can have a

volume named vol0.

However, having unique volume names in a cluster makes it

easier to migrate volumes between the filers in the clus-

ter.

VFILER CONSIDERATIONS EXAMPLES

vol create vol1 aggr0 50g

Creates a flexible volume named vol1 using storage

from aggregate aggr0. This new flexible volume's

size will be set to 50 gigabytes.

vol create vol1 -r 10 20

Page 53: Aggr、Vol和Disk命令详解

Creates a traditional volume named vol1 with 20

disks. The RAID groups in this traditional volume

can contain up to 10 disks, so this traditional

volume has two RAID groups. The filer adds the

current spare disks to the new traditional volume,

starting with the smallest disk. vol create vol1 20@9

Creates a traditional volume named vol1 with 20

9-GB disks. Because no RAID group size is speci-

fied, the default size (8 disks) is used. The

newly created traditional volume contains two RAID

groups with 8 disks and a third RAID group with

four disks.

vol create vol1 -d 8a.1 8a.2 8a.3

Creates a traditional volume named vol1 with the

specified disks.

vol create vol1 aggr1 20m -S kett:vol2

Creates a flexible volume named vol1 on aggr1 of

size 20 megabytes, which caches source volume vol2

residing on the origin filer kett.

vol create vol1 10 vol options vol1 raidsize 5

The first command creates a traditional volume

named vol1 with 10 disks that belong to one RAID

group. The second command specifies that if any

Page 54: Aggr、Vol和Disk命令详解

disks are subsequently added to this traditional

volume, they will not cause any current RAID group

to have more than five disks. Each existing RAID

group will continue to have 10 disks, and no more

disks will be added to those RAID groups. When new

RAID groups are created, they will have a maximum

size of five disks.

vol size vol1 250g

Changes the size of flexible volume vol1 to 250

gigabytes.

vol size vol1 +20g

Adds 20 gigabytes to the size of flexible volume

vol1. vol clone create vol2 -b vol1 snap2

The filer will create a writable clone volume vol2

that is backed by the storage of flexible volume

vol1, snapshot snap2.

vol clone create will create a default entry in the

/etc/exports file unless the option

nfs.export.auto-update is disabled.

vol clone split start vol2

The filer will start an operation on clone volume

vol2 to separate the it from its parent volume.

The backing snapshot for vol2 will be unlocked once

Page 55: Aggr、Vol和Disk命令详解

the separation is complete.

vol options vol1 root

The volume named vol1 becomes the root volume after

the next filer reboot. vol options vol1 nosnapdir on

In the volume named vol1, the snapshot directory is

made invisible at the client mount point or at the

root of a share. Also, for UNIX clients, the

.snapshot directories that are normally accessible

in all the directories become inaccessible.

vol status vol1 -r

Displays the RAID information about the volume

named vol1:

Volume vol1 (online, raid4) (zoned checksums)

Plex /vol1/plex0 (online, normal, active)

RAID group /vol1/plex0/rg0 (normal)

RAID Disk Device HA SHELF BAY CHAN Used (MB/blks) Phys (MB/blks)

--------- ------ --------------- ---- -------------- --------------

parity 3a.0 3a 0 0 FC:A 34500/70656000 35239/72170880

data 3a.1 3a 0 1 FC:A 34500/70656000 35239/72170880 vol copy start -s nightly.1

vol0 toaster1:vol0

Copies the nightly snapshot named nightly.1 on vol-

ume vol0 on the local filer to the volume vol0 on a

remote filer named toaster1.

Page 56: Aggr、Vol和Disk命令详解

vol copy status

Displays the status of all active volume copy oper-

ations.

vol copy abort 1

Terminates volume copy operation 1.

vol copy throttle 1 5

Changes volume copy operation 1 to half (50%) of

its full speed.

fas3140> vol status ora10g -v

Volume State Status Options

ora10g online raid_dp, flex nosnap=on, nosnapdir=off,

minra=on, no_atime_update=on,

nvfail=off,

ignore_inconsistent=off,

snapmirrored=off,

create_ucode=on,

convert_ucode=off,

maxdirsize=41861,

schedsnapname=ordinal,

fs_size_fixed=off,

compression=off,

guarantee=volume, svo_enable=off,

svo_checksum=off,

svo_allow_rman=off,

svo_reject_errors=off,

no_i2p=off,

fractional_reserve=100,

extent=on, try_first=volume_grow,

read_realloc=off,

snapshot_clone_dependency=off

Containing aggregate: 'aggr0'

Page 57: Aggr、Vol和Disk命令详解

Plex /aggr0/plex0: online, normal, active

RAID group /aggr0/plex0/rg0: normal

Snapshot autodelete settings for ora10g:

state=off

commitment=try

trigger=volume

target_free_space=20%

delete_order=oldest_first

defer_delete=user_created

prefix=(not specified)

destroy_list=none

Volume autosize settings:

state=off