C H A P T E R 5 |
Logical Drive, Partition, and Logical Volume Commands |
This chapter provides the available CLI commands with sample code for logical drives, partitions, and logical volumes. Topics covered in this chapter include:
Note - Logical drive indexes can change whenever a logical drive is deleted, while a logical drive identifier never changes over the life of the logical drive. |
The following commands are explained in this section:
This command performs a parity check on qualified logical drives. A qualified logical drive must be configured as a RAID1, RAID3, or RAID5.
To check parity and view the parity status for logical drive 0, type:
sccli> check parity ld0 sccli> show ld parity LD LD-ID Status ------------------------ ld0 627D800A 2% complete |
This command specifies a local spare disk as a dedicated spare disk for the specified logical drive. The disk drive status is set to standby.
Specify the disk to create. For example, specify the disk with target ID 1 on channel 2 as 2.1. |
|
The following example configures disk drive ID 5 on SCSI channel 2 as a local spare for the logical drive with index number 2:
The following example configures disk drive ID 5 on SCSI channel 2 as a local spare for the logical drive with ID 2C33AAEA:
This command creates a logical drive with a RAID level and disk drives, and assigns the logical drive to a primary or secondary RAID controller.
create logical-drive raid-level disk-list [assigned-to] [local-spare {disk-list}] [max-disk-capacity] [size] |
The following example creates a logical drive as RAID 1 with disks 1 through 4 on SCSI channel 2 on the primary controller. Channel 2 ID 0 is assigned as the local spare:
The following example creates a 10GB RAID 5 volume using six disk drives (disks with IDs 0 to 5 on channel 2), one of which is reserved as a dedicated spare for this logical drive:
The following example creates a logical drive as RAID 1 with disks 1, 3, and 4 on SCSI channel 2 on the primary controller. Channel 2 ID 0 is assigned as the local spare, and each disk drive uses 1000MB capacity to build the RAID:
This command deletes the specified logical drives and unmaps all partitions of the logical drive from all host channels, and disassociates all disks that are assigned to the logical drive.
delete logical-drives {ld{n} | LD-ID} |
The following example deletes the logical drive with the logical drive index number 2:
The following example deletes the logical drive with the logical drive ID number 3C24554F:
This command displays information about the disk drives in the specified logical drive. Returned values include: Channel number, SCSI ID, Size (MB), Speed, LD Index, LD ID that the disk is assigned to, Status, and Vendor.
The following example returns all logical drive disks with a logical drive index of 0:
The following example returns all logical drive disks with the logical drive ID of 3C256723:
The following example returns all logical drive disks:
This command displays information about a specified list of logical drives.
If no options are specified, all logical drives are displayed.
The following example returns all logical drive information:
Note - The abbreviation ld can be substituted for the keyword logical-drive. |
The following example returns all logical drives with logical drive index numbers 0 and 2. Logical drive 2 was not assigned.
Returned values include: LD Index, LD ID, RAID level, Size (MB), Status, Number of disks, number of spares, and number of failed disk.
This command displays information for all logical drives in a specified logical volume.
The following example returns all logical drives with the logical volume ID of 12345678:
Note - The abbreviation ld can be substituted for the keyword logical-drive. The abbreviation lv can be substituted for the keyword logical-volume. |
The following example shows all logical drives in the logical volume with the ID of 0:
Returned values include: LD Index, LD ID, RAID Level, Size (MB), Status, Number of Disks, Number of Spares, and Number of Failed Disks.
The show logical-drives initializing command displays the progress of the RAID controller initialization.
Returned values include: LD Index, LD ID, and Progress.
The following example returns the completion percentage of the RAID controller for the logical drive:
The show logical-drives parity-check command displays the status of a parity check being performed on a logical drive. Returned values include: LD Index, LD ID, and Progress.
Note - The abbreviation ld can be substituted for the keyword logical-drive. |
The following example returns the percent complete for the parity check for logical drive 0:
sccli> check parity ld0 sccli> show ld parity LD LD-ID Status ------------------------ ld0 627D800A 2% complete |
The show logical-drives rebuilding command displays the status for all logical drives being rebuilt. Returned values include: LD Index, LD ID, and Progress.
The following example returns the rebuilding process percent complete for the logical drive:
This command permanently deactivates the specified logical drive so the associated physical drive can be physically removed from the array. For example, so the drives can be removed from the chassis.
Note - Other logical drives in the array are still accessible if only one logical drive is shut down. |
![]() |
Caution - This command is not reversible. To access the logical drive again, the array must be rebooted. |
shutdown logical-drive ld{n} | LD-ID |
Note - The abbreviation ld can be substituted for the keyword logical-drive. |
The following example shuts down the logical drive and then shows the status of that drive:
The unconfigure logical-spare command removes a local spare disk as a dedicated spare disk for the specified logical drive.
Specify the disk to create. For example, specify the disk with target ID 1 on channel 2 as 2.1. |
|
The following example unconfigures disk drive ID 5 on SCSI channel 2 as a local spare for the logical drive with index number 2:
The following example unconfigures disk drive ID 5 on SCSI channel 2 as a local spare for the logical drive with ID 2C33AAEA:
The following commands are explained in this section:
This command specifies how much disk space to assign to the partition. When a logical drive or logical volume is created, it is automatically assigned to partition 0
The following example creates a partition for a logical drive with a logical drive index number of 2, partition number of 2, partition size of 4000 Mbyte, and leaves the remaining capacity for the next partition:
The following example creates a partition for a logical drive with a logical drive ID of 1D2F34AA, partition number of 2, partition size of 4000 Mbyte, and leaves the remaining capacity for the next partition:
The following example creates a partition for a logical drive with a logical volume ID of AABBCCDD, partition number of 2, partition size of 4000 Mbyte, and leaves the remaining capacity for the next partition:
This command deletes a specified partition.
To delete a partition, assign a size of zero, or specify the delete keyword. For example:
This command maps a partition to the specified host channel, target, and LUN on the specified controller.
To map a partition, use the following syntax:
Or, to map a partition, use the following syntax:
The following example maps partition 0 of the logical drive with index number 2 to LUN 0 of SCSI channel 1 on SCSI ID 112 and 113:
The following example maps partition 0 of the logical drive with index ID 2D1A2222 to LUN 0 of SCSI channel 1 on SCSI ID 112:
The following example maps partition 0 of the logical volume with index number 2 to LUN 0 of SCSI channel 1 on SCSI ID 112:
This command shows all partitions mapped to specified host channel. Returned values include: Partition Number, Logical Volume or Logical Drive Index, Logical Volume or Logical Drive ID, Host Channel Number, On-Controller, and SCSI ID.
{n}[,...{m}] or a range format "{n}-{m}" or {n}[,...{p}-{m}] a valid channel number is from 0-7 or 0-5 depending upon hardware configuration |
The following example shows all partitions mapped to host channel 1 and 3:
The following example shows all partitions mapped to the host channel:
sccli> show lun-maps Ch Tgt LUN ld/lv ID-Partition Assigned Filter Map -------------------------------------------------------------- 0 40 0 ld0 6508FFD9-00 Primary |
The show partitions command displays information about all disk partitions, or just those partitions allocated from the specified logical volumes or logical drives. Returned values include: Logical Volume or Logical Drive Index, Logical Volume or Logical Drive ID, Partition Number, Offset (MB), and Size (MB).
The following example shows the logical drive partition table for the logical drive with the ID 3C2D3322:
The following example shows the logical volume partition table for the logical volume with index number 0:
sccli> show part lv0 LD/LV ID-Partition Size ------------------------------- lv0-00 02CE9894-00 4.00GB |
This command unmaps a partition. Use one of two syntaxes depending on the target you want to unmap.
You can unmap a partition currently mapped to the specified channel.target.lun address. If a host WWPN or alias (previously defined using create host-wwn-name) is specified, the specified host LUN mapping is removed without affecting other host LUN maps on the same host LUN.
To unmap a partition using a channel, target, LUN address, use the following syntax:
You can unmap a specified partition from any LUNs to which its mapped, or if channel is specified, from LUNs on the specified channel.
To unmap a partition from a specified partition or channel, use the following syntax:
The following example unmaps the partition from host channel 1 LUN 1 on SCSI ID 112:
The following example unmaps the partition from host channel 1 LUN 1 on SCSI ID 114:
The following commands are explained in this section:
This command creates a logical volume from the specified logical drives on the specified controller. The logical drives used to create the logical volume must not already be mapped to any host channels. Be sure to specify the secondary keyword if the underlying logical drives are mapped to the secondary controller.
create logical-volume ld-list [primary | secondary] |
A comma separated list of logical drive indexes, for example, ld0,ld1,ld2, or a list of logical drive identifiers, such as, 71038221. |
|
The following example creates a logical volume using ld0 and ld2 and assigns it to the primary controller:
The following example creates a logical volume using IDs 2378FDED, 7887DDAB and assigns it to the secondary controller:
This command deletes the specified logical volumes.
delete logical-volumes {lvn | LV-ID} |
The following example deletes the logical volume with the logical volume index number 2:
The following example deletes the logical volume with the logical volume ID number 3C24554F:
The show logical-volumes command displays information about all, or a specified list, of logical volumes. Returned values include: LV Index, LV ID, LD Count, LD ID list, Size (MB), and Assign to information.
If no options are specified, all logical volumes are displayed. The following example returns all logical volume information:
sccli> show logical-volumes LV LV-ID Size Assigned LDs ----------------------------------------- lv0 02CE9894 4.00GB Primary 2 ld0,ld1 |
The following example returns all logical volumes with logical volume index numbers 0 and 2:
# sccli c2t0d0 show logical-volumes lv0,lv2 LV LV-ID Size Assigned LDs ----------------------------------------- lv0 02CE9894 4.00GB Primary 2 ld0,ld1 lv2 02CE9894 4.00GB Primary 2 ld0,ld1 |
Copyright © 2004, Sun Microsystems, Inc. All rights reserved.