EMC VNX快照 - 图文

发布时间 : 星期日 文章EMC VNX快照 - 图文更新完毕开始阅读

创建快照装载点

SMP 是一个“类似 LUN”的对象,类似于一个简单的池 LUN。

-allowInbandSnapAttach 属性是一种安全功能,可让来自主机 的 SnapCLI 将快照连接到此装载点或从中断开连接。

[nasadmin@~]$ naviseccli -h SPA lun -create -type Snap -primaryLunName Primary_LUN1 \\

-name PrimaryLUN1_SMP1 -allowInbandSnapAttach yes -sp B

# list the SMP

[nasadmin@~]$ naviseccli -h SPA lun -list -name PrimaryLUN1_SMP1 LOGICAL UNIT NUMBER 8155 <=== Note the LUN number Name: PrimaryLUN1_SMP1

UID: 60:06:01:60:13:40:2A:00:70:5C:2C:51:1E:78:E1:11 Current Owner: SP B Default Owner: SP B Allocation Owner: SP B

User Capacity (Blocks): 20971520 User Capacity (GBs): 10.000

Consumed Capacity (Blocks): 8404992 Consumed Capacity (GBs): 4.008 Pool Name: Pool 0 Raid Type: r_5 Offset: 0

Auto-Assign Enabled: DISABLED Auto-Trespass Enabled: DISABLED Current State: Ready Status: OK(0x0) Is Faulted: false

Is Transitioning: false Current Operation: None

Current Operation State: N/A Current Operation Status: N/A

Current Operation Percent Completed: 0 Is Pool LUN: Yes Is Thin LUN: Yes Is Private: No Is Compressed: No

Tiering Policy: Auto Tier

Initial Tier: Highest Available Tier Distribution: Performance: 100.00%

在创建 SMP 之后,可以像典型的 LUN 那样将其添加到存储组:

[nasadmin@~]$ naviseccli -h SPA storagegroup -addhlu -gname \ -hlu 50 -alu 8155

EMC VNX 快照白皮书 41

连接快照

可以使用以下两种方法连接快照:

1. 通过向 SMP 发送命令将快照连接到 SMP 2. 通过向快照发送命令将快照连接到 SMP

# attach via the lun command [nasadmin@~]$ naviseccli -h SPA lun -attach -l 8155 -snapName Primary_LUN1_Snapshot # attach via the snap command

[nasadmin@~]$ naviseccli -h SPA snap -attach -id Primary_LUN1_Snapshot -res 8155 # Note: in both cases 8155 is the LUN ID of the Snapshot Mount Point

如果快照不允许读/写访问,则会收到以下错误:

[nasadmin@~]$ naviseccli -h SPA snap -attach -id Primary_LUN1_Snapshot -res 8155 The properties of this snapshot do not allow it to be attached. Modify the snapshot properties to allow it to be attached and retry the attach operation. (0x716d802e) # To modify the Read/Write flag use this command:

[nasadmin@~]$ naviseccli -h SPA snap -modify -id Primary_LUN1_Snapshot \\ -allowReadWrite yes

# And repeat attach

[nasadmin@~]$ naviseccli -h SPA snap -attach -id Primary_LUN1_Snapshot -res 8155

创建级联快照

级联快照是连接的 SMP 的快照。

[nasadmin@~]$ naviseccli -h SPA snap -create -res 8155 \\ -name PrimaryLUN1_Cascading_Snapshot1

# list the result

[nasadmin@~]$ naviseccli -h SPA snap -list -id PrimaryLUN1_Cascading_Snapshot1 - detail

Name: PrimaryLUN1_Cascading_Snapshot1 Description:

Creation time: 03/27/12 12:54:21 Last modify time: Never Last modified by: N/A Source LUN(s): 8155 <===== LUN ID of the SMP (aka PrimaryLUN1_SMP1) Source CG: N/A

Primary LUN(s): 10 <===== LUN ID of the Primary LUN (aka Primary_LUN1) State: Ready Status: OK(0x0)

Allow Read/Write: No <===== We didn't specify -allowReadWrite flag at creation

Modified: No Attached LUN(s):

Allow auto delete: Yes Expiration date: Never

EMC VNX 快照白皮书 42

断开快照的连接

可以使用以下两种方法断开快照的连接:

1. 通过向快照发送命令断开快照的连接 2. 通过向 SMP 发送命令断开快照的连接

要使用 lun 命令断开连接,请使用 SMP 的名称。不显示警告。

[nasadmin@~]$ naviseccli -h SPA navi lun -detach -name PrimaryLUN1_SMP1

不过,在向快照本身发送断开连接命令时,将显示警告: [nasadmin@~]$ naviseccli -h SPA snap -detach -id Primary_LUN1_Snapshot WARNING : Attempting to detach a snapshot mount point that has snapshots. The

snapshots of the mount point will be inherited by the source of the snapshot being detached. Snapshot mount point: 8154

Are you sure you want to perform this operation?(y/n): yes

[nasadmin@~]$ naviseccli -h SPA snap -list -id Primary_LUN1_Snapshot -detail Name: Primary_LUN1_Snapshot

Description: The CLI made snapshot Creation time: 03/27/12 10:54:54 Last modify time: 03/27/12 13:01:09 <===== Time when detached Last modified by: PrimaryLUN1_SMP1_COPY Source LUN(s): 0 Source CG: N/A Primary LUN(s): 0 State: Ready Status: OK(0x0)

Allow Read/Write: Yes Modified: Yes <===== Shows as modified, since it used to be attached

Attached LUN(s): <===== Nothing listed Allow auto delete: Yes Expiration date: Never

销毁快照

[nasadmin@~]$ naviseccli -h SPA snap -destroy -id Primary_LUN1_Snapshot Are you sure you want to perform this operation?(y/n): yes

列出 LUN 的所有 VNX 快照

检查 LUN 是否属于 CG。

[~]$ naviseccli -h SPA lun -list -l 4 -belongsToCG LOGICAL UNIT NUMBER 4 Name: LB_LUN

Consistency Group: USG-CG

[~]$ naviseccli -h SPA lun -list -l 12 -belongsToCG LOGICAL UNIT NUMBER 12 Name: LB_LUN

Consistency Group: N/A

注意:“getlun”命令不显示 VNX 快照信息。

[~]$ naviseccli -h SPA getlun 4 | egrep -i \RAIDGroup ID: N/A

EMC VNX 快照白皮书 43

如果 LUN 是 CG 的一部分,则使用该 CG 名称查找所有 LUN 的列 表:

[~]$ naviseccli -h SPA snap -list -res CG_name Name: 2012-02-10 14:45:18 Description:

Creation time: 02/10/12 14:45:24 Source LUN(s): 4,5 Source CG: CG_name State: Ready

Allow Read/Write: Yes Modified: No

Allow auto delete: Yes Expiration date: Never

Name: Backup Snapshot:2012-02-14 04:28:21 Description:

Creation time: 02/14/12 16:28:23 Source LUN(s): 4,5 Source CG: CG_name State: Ready

Allow Read/Write: No Modified: No

Allow auto delete: Yes Expiration date: Never

要列出单个 LUN(不是 CG 的成员)的快照,请使用 -res 选项指 定 LUN ID 或名称。

创建一致性组

要创建具有两个成员 LUN 的 CG,请使用以下命令:

[~]$ naviseccli -h SPA snap -group -create -name \ group1\

列出一致性组

要列出阵列中的所有 CG,请使用以下命令:

[~]$ naviseccli -h SPA snap -group -list Name: CG_name Description:

Allow auto delete: Yes Member LUN ID(s): 4, 5 State: Ready

Name: USG-CG_mountpoints Description:

Allow auto delete: Yes

Member LUN ID(s): 8081,8080 State: Ready

EMC VNX 快照白皮书 44

联系合同范文客服:xxxxx#qq.com(#替换为@)