C H A P T E R 2 |
Performing Tasks With the CLI |
This chapter provides examples of how to perform tasks using a series of CLI commands.
TABLE 2-1 identifies the sequence of CLI commands used when registering arrays with Sun Storage Common Array Manager.
1. Identify the names of the arrays currently registered with Sun Storage Common Array Manager.
sscs list storage-system Array: Snoopy1 Array: Snoopy2 Array: Linus1
Note - The command list devices can also be used to identify the names of arrays currently registered with Sun Storage Common Array Manager. |
sscs register -d storage-system Name Type Network Address Serial Number ------------------ ---- --------------- ----------------------- Snoopy1 6140 xx.xx.xx.103 SUN.xxxxx-00.xxxxxxxxxx unlabeled 6140 xx.xx.xx.112 SUN.xxxxx-00.xxxxxxxxxx Onyx 2540 xx.xx.xx.9 SUN.xxxxx-00.xxxxxxxxxx Hal 6140 xx.xx.xx.72 SUN.xxxxx-00.xxxxxxxxxx Linus1 6140 xx.xx.xx.16 SUN.xxxxx-00.xxxxxxxxxx Snoopy2 6140 xx.xx.xx.106 SUN.xxxxx-00.xxxxxxxxxx Johnny5 6140 xx.xx.xx.67 SUN.xxxxx. Pedro1 2540 xx.xx.xx.6 SUN.xxxxx-00.xxxxxxxxxx
sscs unregister storage-system Onyx
4. Verify the list of registered arrays to ensure that Onyx is no longer registered.
sscs list storage-system Array: Snoopy1 Array: unlabeled Array: Hal Array: Linus1 Array: Snoopy2 Array: Johnny5 Array: Pedro1
TABLE 2-2 identifies the sequence of CLI commands used when creating a volume.
Verify the characteristics of the virtual disk used by the newly created volume. |
|
In this example, the following sample data are used in the execution of the commands:
1. Identify the names of the volumes that already exist on the array den-toi-6130.
sscs list -a den-toi-6130 volume Volume: ACC Type: Standard Pool: Default Profile: Default Volume: RCV Standard Pool: Default Profile: Default.
2. Identify the names of the storage pools that already exist on the array
den-toi-6130.
sscs list -a den-toi-6130 pool Pool: newNFSmirroringPool Profile: NFS_Mirroring Configured Capacity: 0.000 MB Pool: RAID1-32KB-NoReadAhead Profile: RAID1-32KB-NoReadAhead Configured Capacity: 0.000 MB Pool: RAID5-512KB-NoReadAhead Profile: RAID5-512KB-NoReadAhead Configured Capacity: 0.000 MB Pool: poolFortest6731502Raid5threeDisk Profile: test6731502Raid5threeDisk Configured Capacity: 0.000 MB Pool: den-pool-64k-r Profile: RAID0-564KB-ReadAhead Configured Capacity: 0.000 MB
3. Verify the characteristics of the storage pool den-pool-64k-r5.
sscs list -a den-toi-6130 pool den-pool-64k-r Description: null Profile: RAID5-64KB-ReadAhead Total Capacity: 0.000 MB Configured Capacity: 0.000 MB Available Capacity: 1.197 TB
4. Create a new volume on array den-toi-6130.
The new volume is named vol0-64k-r5, uses the storage pool named
den-pool-64k-r5, and has 5GB of storage capacity:
sscs create -a den-toi-6130 -p den-pool-64k-r5 -s 5GB volume vol0-64k-r5
5. Verify that the volume creation job is in progress.
sscs list -a den-toi-6130 jobs Job ID: VOL:0B70418253F6 Status: In progress
6. Verify the characteristics of the volume named vol0-64k-r5.
sscs list -a den-toi-6130 volume vol0-64k-r5 Volume: vol0-64k-r5 Type: Standard WWN: 60:0A:0B:80:00:13:B9:8B:00:00:0B :70:41:82:53:F6 Pool: den-pool-64k-r5 Profile: den-profile-64k-r5 Virtual Disk: 1 Size: 5.000 GB Status: Online Action: Ready Condition: Optimal Read Only: No Controller: A Preferred Controller: A Modification Priority: High Write Cache: Enabled Write Cache with Mirroring: Enabled Write Cache without Batteries: Disabled Flush Cache After: 10 Sec Disk Scrubbing: Enabled Disk Scrubbing with Redundancy: Disabled
7. List the virtual disks available on den-toi-6130.
sscs list -a den-toi-6130 vdisk Virtual Disk: 1
8. Verify the characteristics of the virtual disk named 1.
sscs list -a den-toi-6130 vdisk 1 Virtual Disk: 1 Status: Online Number of Disks: 4 Maximum Volume Size: 198.599 GB RAID Level: 5 Total Capacity: 203.599 GB Configured Capacity: 5.000 GB Available Capacity: 198.599 GB Disk Type: FC Disk: t1d04 Disk: t1d03 Disk: t1d02 Disk: t1d01 Volume: vol0-64k-r5
9. Identify the hosts available of the array den-toi-6130.
sscs list -a den-toi-6130 host Host: 450e
10. Map the volume vol0-64k-r5 to the host 450e.
sscs map -a den-toi-6130 -h 450e -l 1 volume vol0-64k-r5
11. Ensure that the mapping was successful by verifying the characteristics of the volume named vol0-64k-r5.
sscs list -a den-toi-6130 volume vol0-64k-r5 Volume: vol0-64k-r5 Type: Standard WWN: 60:0A:0B:80:00:13:B9:8B:00:00:0B :70:41:82:53:F6 Pool: den-pool-64k-r5 Profile: den-profile-64k-r5 Virtual Disk: 1 Size: 5.000 GB Status: Online Action: Ready Condition: Optimal Read Only: No Controller: A Preferred Controller: A Modification Priority: High Write Cache: Enabled Write Cache with Mirroring: Enabled Write Cache without Batteries: Disabled Flush Cache After: 10 Sec Disk Scrubbing: Enabled Disk Scrubbing with Redundancy: Disabled Associations: Host: 450e LUN: 1 Initiator: 450e-qlc5 WWN: 21:00:00:E0:8B:06:02:E9 Host: 450e LUN: 1 Initiator: 450e-qlc6 WWN: 21:00:00:E0:8B:06:FC:E8
The following section demonstrates the commands used when creating a snapshot of a volume.
TABLE 2-4 identifies the sequence of CLI commands used when creating a volume snapshot.
In this example, the sample data listed in TABLE 2-5 are used in the execution of the commands:
1. Verify the existence and characteristics of the volume vol0-64k-r5.
sscs list -a den-toi-6130 volume vol0-64k-r5 Volume: vol0-64k-r5 Type: Standard WWN: 60:0A:0B:80:00:13:B9:8B:00:00:0B :70:41:82:53:F6 Pool: den-pool-64k-r5 Profile: den-profile-64k-r5 Virtual Disk: 1 Size: 15.000 GB Status: Online Action: Ready Condition: Optimal Read Only: No Controller: A Preferred Controller: A Modification Priority: Highest Write Cache: Enabled Write Cache with Mirroring: Enabled Write Cache without Batteries: Disabled Flush Cache After: 10 Sec Disk Scrubbing: Enabled Disk Scrubbing with Redundancy: Disabled Associations: Host: 450e LUN: 1 Initiator: 450e-qlc5 WWN: 21:00:00:E0:8B:06:02:E9 Host: 450e LUN: 1 Initiator: 450e-qlc6 WWN: 21:00:00:E0:8B:06:FC:E8
2. Create the snapshot volume named snapshot-vol0.
sscs create -a den-toi-6130 -V vol0-64k-r5 -L full -f failsnapshot -m reserve-vol0 -w 100 snapshot snapshot-vol0
3. Verify that the specified volume, vol0-64k-r5, now has a snapshot named snapshot-vol0 associated with it.
sscs list -a den-toi-6130 volume vol0-64k-r5 Volume: vol0-64k-r5 Type: Standard WWN: 60:0A:0B:80:00:13:B9:8B:00:00:0B :70:41:82:53:F6 Pool: den-pool-64k-r5 Profile: den-profile-64k-r5 Virtual Disk: 1 Size: 15.000 GB Status: Online Action: Ready Condition: Optimal Read Only: No Controller: A Preferred Controller: A Modification Priority: Highest Write Cache: Enabled Write Cache with Mirroring: Enabled Write Cache without Batteries: Disabled Flush Cache After: 10 Sec Disk Scrubbing: Enabled Disk Scrubbing with Redundancy: Disabled Snapshots: Snapshot Volume: vol0-snap1 Creation Date: Sat Oct 25 07:40:00 36797 Reserve Volume: res-vol0 Snapshot Volume: snapshot-vol0 Creation Date: Mon Apr 25 11:40:00 36805 Reserve Volume: reserve-vol0 Associations: Host: 450e LUN: 1 Initiator: 450e-qlc5 WWN: 21:00:00:E0:8B:06:02:E9 Host: 450e LUN: 1 Initiator: 450e-qlc6 WWN: 21:00:00:E0:8B:06:FC:E8
4. Verify the characteristics assigned to the snapshot volume, snapshot-vol0.
sscs list -a den-toi-6130 snapshot snapshot-vol0 Volume: snapshot-vol0 Type: Snapshot WWN: 60:0A:0B:80:00:13:B9:8B:00:00:0B:7A:41:86:0B:02 Virtual Disk: 1 Size: 14.999 GB Status: Active Action: Ready Condition: Optimal Controller: A Preferred Controller: A Modification Priority: High Write Cache: Enabled Write Cache with Mirroring: Enabled Write Cache without Batteries: Disabled Flush Cache After: 10 Sec Disk Scrubbing: Enabled Disk Scrubbing with Redundancy: Disabled Percent Full: 0 Failure Policy: failsnapshot Warning Threshold: 100 Creation Date: Mon Apr 25 11:40:00 36805 Base Volume: vol0-64k-r5 Reserve Volume: reserve-vol0 Reserve Status: Online Reserve Size: 14.999 GB
5. Identify the hosts available on the array den-toi-6130.
sscs list -a den-toi-6130 host Host: 450e
6. Map a snapshot to the host 450e.
sscs map -a den-toi-6130 -h 450e snapshot snapshot-vol0
7. Verify the characteristics assigned to the snapshot volume, snapshot-vol0.
sscs list -a den-toi-6130 snapshot snapshot-vol0 Volume: snapshot-vol0 Type: Snapshot WWN: 60:0A:0B:80:00:13:B9:8B:00:00:0B: 7A:41:86:0B:02 Virtual Disk: 1 Size: 14.999 GB Status: Active Action: Ready Condition: Optimal Controller: A Preferred Controller: A Modification Priority: High Write Cache: Enabled Write Cache with Mirroring: Enabled Write Cache without Batteries: Disabled Flush Cache After: 10 Sec Disk Scrubbing: Enabled Disk Scrubbing with Redundancy: Disabled Percent Full: 0 Failure Policy: failsnapshot Warning Threshold: 100 Creation Date: Mon Apr 25 11:40:00 36805 Base Volume: vol0-64k-r5 Reserve Volume: reserve-vol0 Reserve Status: Online Reserve Size: 14.999 GB Associations: Host: 450e LUN: 2 Initiator: 450e-qlc5 WWN: 21:00:00:E0:8B:06:02:E9 Host: 450e LUN: 2 Initiator: 450e-qlc6 WWN: 21:00:00:E0:8B:06:FC:E8
8. Unmap the snapshot names snapshot-vol0.
sscs unmap -a den-toi-6130 -h 450e snapshot snapshot-vol0
9. Verify that snapshot-vol0 was successfully unmapped.
sscs list -a den-toi-6130 snapshot snapshot-vol0 Volume: snapshot-vol0 Type: Snapshot WWN: 60:0A:0B:80:00:13:B9:8B:00:00:0B :7A:41:86:0B:02 Virtual Disk: 1 Size: 14.999 GB Status: Active Action: Ready Condition: Optimal Controller: A Preferred Controller: A Modification Priority: High Write Cache: Enabled Write Cache with Mirroring: Enabled Write Cache without Batteries: Disabled Flush Cache After: 10 Sec Disk Scrubbing: Enabled Disk Scrubbing with Redundancy: Disabled Percent Full: 0 Failure Policy: failsnapshot Warning Threshold: 100 Creation Date: Mon Apr 25 11:40:00 36805 Base Volume: vol0-64k-r5 Reserve Volume: reserve-vol0 Reserve Status: Online Reserve Size: 14.999 GB
10. Delete the snapshot named snapshot-vol0.
sscs delete -a den-toi-6130 snapshot snapshot-vol0
The following information provides an overview of the CLI commands used for the T10 protection information (PI) feature. Further information concerning T10 PI, including requirements for using the feature, can be found in the CAM online help (within the browser interface) or in the Sun Storage Common Array Manager Array Administration Guide.
The following topics are discussed:
Note - The below syntax may not represent all available options. Consult the complete command syntax by following the link for each stated command. |
Protection Information is a feature of disks that may not be modified. You can view PI capability of a disk by issuing the list disk command:
list -a <array-name> disk <disk-name>
In this example, the storage1 array is asked to report a list of its disks. In the below output, three disks are reported. Notice the Protection Information line. Two disks have PI capability (t0d02, t0d03), one does not (t0d10).
sscs list -a storage1 disk Tray: 0 Disk: t0d02 Capacity: 558.912 GB Type: SAS Speed (RPM): 10020 Status: Optimal State: Enabled Role: Unassigned Mirror Disk: - Virtual Disk: - Firmware: 0804 Serial number: 001022P15D8A PPG15D8A WWN: 20:00:00:00:C9:9F:5E:1F:00:00:00:00:00:00:00:00 Security Capable: None Security Enabled: Disabled Disk Locked: False Security Key Id: - Protection Information: Capable Tray: 0 Disk: t0d03 Capacity: 558.912 GB Type: SAS Speed (RPM): 10020 Status: Optimal State: Enabled Role: Unassigned Mirror Disk: - Virtual Disk: - Firmware: 0804 Serial number: 001022P15DEA PPG15DEA WWN: 20:00:00:00:C9:9F:59:D3:00:00:00:00:00:00:00:00 Security Capable: None Security Enabled: Disabled Disk Locked: False Security Key Id: - Protection Information: Capable Tray: 0 Disk: t0d10 Capacity: 279.396 GB Type: Fibre Channel Speed (RPM): 15015 Status: Optimal State: Enabled Role: Unassigned Mirror Disk: - Virtual Disk: - Firmware: 091C Serial number: 0910C19F7N 3QP19F7N WWN: 20:00:00:1D:38:D3:0E:C1:00:00:00:00:00:00:00:00 Security Capable: None Security Enabled: Disabled Disk Locked: False Security Key Id: - Protection Information: None
Virtual disks with Protection Information may be created by ensuring that all the disks that compose it are PI-capable. From the previous example, we know that disks t0d02 and t0d03 are PI-capable. To create a virtual disk, issue the create vdisk command:
create -a <array-name> -p <pool-name> -d <disk-name[,disk-name...]> vdisk <virtual-disk-name>
In this example, a PI-capable virtual disk named PI_vdisk is created using PI-capable disks on the storage1 array using the Default storage pool. Then, the list vdisk command is used to verify the new virtual disk.
sscs create -p Default -d t0d02,t0d03 -a storage1 vdisk PI_vdisk sscs list -a storage1 vdisk PI_vdisk Virtual Disk: PI_vdisk Status: Optimal State: Ready Number of Disks: 2 RAID Level: 5 Total Capacity: 1.092 TB Configured Capacity: 0.000 MB Available Capacity: 1.092 TB Array Name: storage1 Array Type: 6180 Disk Type: SAS Security: Non-secure Protection Information: Capable Maximal Volume Size: 1.092 TB Associated Disks: Disk: t0d02 Disk: t0d03
To create a PI-enabled volume on a PI-capable virtual disk, the -i,--protection-information option must be specified using a create volume command variant supporting this option. For example:
create -a <array-name> -p <pool-name> -s <number<TB|GB|MB|KB|Bytes|BLK>> [-n <1..224>] [-d <disk-name[,disk-name...]>] [-c <A|B>] [-S] [-i] volume <volume-name>
In this example, a PI-enabled volume named vol1-PI is created on array storage1 using the Default storage pool and a 100MB volume size. Then, the list volume command is used to verify the new volume.
sscs create -a storage1 -p Default -s 100MB -i volume vol1-PI sscs list -a storage1 volume vol1-PI Volume: vol1-PI Type: Standard WWN: 60:08:0E:50:00:17:B5:22:00:00:49:8B:4D:8C:2B: 78 Pool: Default Profile: Default Virtual Disk: PI_vdisk Size: 100.000 MB State: Free Status: Online Action: Ready Condition: Optimal Read Only: No Controller: A Preferred Controller: A Modification Priority: High RAID Level: 5 Segment Size: 512 KB Read Cache: Enabled Write Cache: Enabled Write Cache with Replication: Enabled Write Cache without Batteries: Disabled Write Cache Active: True Flush Write Cache After: 10 s Disk Scrubbing: Enabled Disk Scrubbing with Redundancy: Disabled Security: Non-Secure Protection Information: Enabled Application Tag Ownership: Controller
The following additional PI-related tasks can be performed using the CLI:
Caution - This operation cannot be undone. Once disabled, PI cannot be re-enabled on an existing volume. To minimize accidental execution, only the long version of this option is provided. |
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.