C H A P T E R 5 |
Logical Drive, Partition, and Logical Volume Commands |
This chapter provides the available Sun StorEdge 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:
The abort create command stops the creation of a logical drive.
To create a logical drive, use the create logical-drive command. For details, see create logical-drive. To view logical drives, use the show logical-drive command. For details, see show logical-drive.
The following example stops the creation of logical drive 8.
The abort expand command stops the expansion of a logical drive.
To expand a logical drive, use the expand command. For details, see expand. To view the progress of an expansion, use the show logical-drives expanding command. For details, see show logical-drives expanding.
The following example stops the expansion of logical drive 8.
The abort media-check command stops a media check on specified disks or all member disks of the specified logical drive.
For more information on the check media command, see check media.
The following example stops the media check for all member disks of logical drive 5.
The abort parity-check command stops the parity check on the specified logical drive.
To check parity, use the check-parity command. For details, see check parity. To view the progress of a parity check, use the show logical-drives parity-check command. For details, see show logical-drives parity-check.
The following example stops the parity check on logical drive 0.
The abort rebuild command stops the rebuilding of a logical drive.
To rebuild a logical drive, use the rebuild command. For details, see rebuild. To view the progress of an expansion, use the show logical-drives rebuilding command. For details, see show logical-drives rebuilding.
The following example stops rebuilding logical drive 4.
The add disk command adds one disk or a list of disks to the specified logical drive. The disks must not be members of a logical drive. If you try to add a disk to an unsupported RAID level, an error returns.
The following example adds two disks to logical drive 2.
The check media command sequentially checks each physical drive in a specified logical drive, block by block, for bad blocks. If a bad block is encountered, the controller rebuilds the data from the bad block onto a good block if one is available on the physical drive. If no good blocks are available on the physical drive, the controller designates the physical drive Bad, generates an event message and, if a spare drive is available, begins rebuilding data from the bad physical drive onto the spare.
Use the show media-check command to review the progress of a media check. For details, see show media-check.
It is useful to run a media scan if a drive has failed, if drive errors are encountered, or when a rebuild is required after replacing a drive. You might want to run a nightly script to execute the check media command rather than running the command continuously.
You can use the abort media-check command to stop a media check.
The following example checks all member disks of logical drive 5.
The check parity command checks the integrity of redundant data on fault-tolerant logical drives. A qualified logical drive must be configured as a RAID1, RAID3, or RAID5 array. For RAID 3 and 5 configurations, the parity checking procedure on a logical drive recalculates the parity of data stripes in each of the logical drive’s RAID stripe sets and compares it with the stored parity. If a discrepancy is found, an error is reported and the new correct parity is substituted for the stored parity. For RAID 1 configurations, if an inconsistency is encountered, data is copied from the master disk to the slave disk. If a bad block is encountered when the parity is regenerated, the data is copied from the other disk, master or slave, to the reporting disk drive reallocating the bad block.
Note - You cannot check parity on multiple logical drives simultaneously. If you try to run multiple parity checks at the same time, an error is displayed. |
To view the progress of a parity check, use the show logical-drives parity-check command. For details, see show logical-drives parity-check. To cancel the parity check, use the abort parity-check command. For details, see abort parity-check.
To check parity and view the parity status for logical drive 0, type:
sccli> check parity ld0 sccli> show ld parity-check LD LD-ID Status ------------------------ ld0 627D800A 2% complete |
The configure local-spare command specifies a local spare disk as a dedicated spare disk for the specified logical drive. The disk drive status is set to standby. Local spares can only be assigned to logical drives in RAID1, RAID3, and RAID5 arrays.
Specify the disk to configure. For example, specify the disk with target ID 1 on channel 2 as 2.1. |
|
The following example configures disk drive ID 5 on channel 2 as a local spare for the logical drive with index number 2.
The following example configures disk drive ID 5 on channel 2 as a local spare for the logical drive with ID 2C33AAEA.
The create logical-drive command creates a logical drive with the specified RAID level and disk drives, assigns the logical drive to the primary or secondary RAID controller, assigns the global spare drives, sets the stripe size, sets the maximum disk capacity per drive, sets the cache write policy, and sets the logical drive initialization mode.
Caution - Any time logical drives are created or deleted, the numbering of logical drive indexes might change. After creating or deleting logical drives, issue a show logical-drivecommand to view an updated list of logical drive indexes. Or, use logical drive IDs, which do not change over the lifetime of the logical drive, rather than logical drive indexes. For more information, see Logical Drive Syntax. |
Note - All device capacity is displayed in powers of 1024. For details, see Device Capacity. |
Depending on the optimization mode and RAID level selected, newly created logical drives are configured with the default stripe sizes shown in the following table.
Note - Default stripe sizes optimize performance for most applications. |
When you create a logical drive, you can replace the default stripe size with one that better suits your application.
To view the optimization mode, type show cache-parameters. For more information about optimization modes, see set cache-parameters.
create logical-drive raid-level disk-list [assignment] [global-spare {disk-list}] [stripe-size {size}] [max-disk-capacity{size}] [write-policy] [mode] |
Specify the RAID level to assign to the logical drive. Valid values: raid0, raid1, raid3, raid5, raid1+, raid3+, raid5+. The plus (+) sign includes a local spare. The local spare is randomly chosen from the disk-list. |
|
Specify a comma-separated list of IDs to use for the RAID set and the local spare, if specified. Use the show disks free command to determine which disks are available. |
|
Specify the controller assignment for the logical drive. If no value is specified, the logical drive is assigned to the primary controller by default. Valid values: primary, secondary. |
|
Specify a list of drives to use as global spares, for example, d0:1,d0:2-3. When you assign a global spare, the system automatically assigns global spare status to the unassigned drive with the lowest drive ID. This enables the array to use the global spare to rebuild a logical drive automatically without user intervention when a failing drive needs to be replaced. |
|
Specify the stripe block size in a multiple of 4. Valid values: 4k, 8k, 16k, 32k, 64k, 128k, 256k. Depending on the RAID level and cache optimization setting, some of the values may not be available for your configuration. To view the valid values for a specific RAID level, use the show stripe-size-list command. For details, see show stripe-size-list. If no stripe size is specified, the default value is used. |
|
Allocates only nMB of each drive, instead of the entire drive; the remaining space on the drives can be used to expand the logical drive later. Include a MB or GB suffix with the specified parameter. The default value is the maximum capacity of the logical drive. |
|
An alternative to the max-disk-capacity keyword that specifies the total usable size of the resulting logical drive. The logical drive can be expanded later until it fills the capacity of all the member drives. |
|
Specify the logical drive cache policy. Valid values: write-back, write-through. If you do not specify a write policy, the logical drive uses the write policy specified for the controller. If the write policy changes for the controller, the write policy automatically changes for the logical drive as well. To set the controller write policy, use the set cache-parameters command. For details, see set cache-parameters. |
|
Specify the initialization mode. The default value is online. Because logical drive initialization can take up to several hours, you can choose to initialize a logical drive online to immediately begin configuring and using the logical drive before initialization is complete. However, because the controller is building the logical drive while performing I/O operations, initializing a logical drive online requires more time than offline initialization. Specify offline to manually bring the drive online. If you do not select online initialization, you can configure and use the drive only after initialization is complete. Because the controller is building the logical drive without having to also perform I/O operations, offline initialization requires less time than online initialization. |
The following example creates a logical drive as RAID 1 with disks 1 through 4 on channel 2 on the primary controller. Channel 2 ID 0 is assigned as the global spare.
The following example creates a 10-Gbyte RAID 5 volume using six disk drives (disks with IDs 0 to 5 on channel 2), one of which is reserved as a global spare for this logical drive.
The following example creates a logical drive as RAID 1 with disks 1, 3, and 4 on channel 2 on the primary controller. Channel 2 ID 0 is assigned as the global spare, and each disk drive uses 1000-Mbyte capacity to build the RAID.
The delete logical-drive command deletes the specified logical drives and disassociates all disks that are assigned to the logical drive.
Caution - Any time logical drives are created or deleted, the numbering of logical drive indexes might change. After creating or deleting logical drives, issue a show logical-drivecommand to view an updated list of logical drive indexes. Or, use logical drive IDs, which do not change over the lifetime of the logical drive, rather than logical drive indexes. For more information, see Logical Drive Syntax. |
Note - Before you can delete a logical drive, you must unmap all assigned LUNs. To review LUN maps, see show lun-maps. |
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.
The expand command expands a logical drive or logical volume by the specified size. The size you specify is added for each available physical drive in the logical drive, and is limited to the maximum available free disk space on the smallest physical drive. The total capacity added is calculated automatically, based on the RAID level. RAID levels 0, 1, 3, and 5 support expansion. For more information on how the expansion size is calculated, refer to the Sun StorEdge 3000 Family RAID Firmware User’s Guide.
Note - To expand a logical volume, you must first expand the logical drives that make up the logical volume. |
Note - All device capacity is displayed in powers of 1024. For details, see Device Capacity. |
The following example expands each physical drive in logical drive 5 by 36 Gbyte and brings the logical drive online.
The rebuild command rebuilds the specified logical drive. RAID levels 1, 3, and 5 are supported. If you attempt to perform the rebuild command on an unsupported RAID level or if no spare drives are available, an error is returned.
In most cases, you do not need to use this command because replaced drives are automatically rebuilt. If a spare is not present when the failure occurs, or for some reason the drive does not rebuild, you can use this command to manually start the rebuild process. Also, if the rebuild process is interrupted by a reset, use this command to restart the rebuilding process.
The time required to rebuild a logical drive is determined by the size of the logical drive, the I/O that is being processed by the controller and the array’s rebuild priority setting. To review the rebuild priority, run the show disk-array command. For details, see show disk-array.
The following example rebuilds logical drive 0.
The set logical-drive command sets the write policy and controller assignment for the specified logical drive. Before using this command, you must create a logical drive. For details, see create logical-drive.
You can also use this command to reset the status of a previously failed drive. After a logical drive experiences a fatal failure, it will show as Dead when you view drive status using the show logical-drive command.
When this occurs for non-redundant RAID sets, reset the controller and then reset the drive status to good.
When this occurs for redundant RAID sets, reset the controller, reset the drive status to degraded, and then rebuild the logical drive.
Note - Before resetting drive status to either good or degraded, you must reset the controller. After resetting the controller, the drive status will still show as Dead. For more information on resetting the controller, refer to reset controller. |
Note - For information on resetting drive status using the firmware application, refer to the Sun StorEdge 3000 Family RAID Firmware User’s Guide. |
Set the write policy for the logical drive. Valid values: write-back, write-through, default. If you do not specify a write-policy, or if you specify default, the logical drive uses the write-policy specified for the controller. If the write policy changes for the controller, the write policy automatically changes for the logical drive as well. To set the controller write policy, use the set cache-parameters command. For details, see set cache-parameters. |
|
Specify the controller assignment for the logical drive. If no value is specified, the logical drive is assigned to the primary controller by default. Valid values include: primary and secondary. |
|
Specify to reset the logical drive status. Valid values include: degraded (for failed redundant RAID sets) and good (for failed non-redundant RAID sets). |
The following example sets the write policy for logical drive 0 to write-back.
The following example resets the drive status to good for a failed non-redundant RAID set.
The show disks command displays information about the disk drives in the specified logical drive. Returned values include: channel number, SCSI ID, size (MB), speed, logical drive index, logical drive ID that the disk is assigned to, status, vendor, and revision.
Caution - Any time logical drives are created or deleted, the numbering of logical drive indexes might change. After creating or deleting logical drives, issue a show logical-drivecommand to view an updated list of logical drive indexes. Or, use logical drive IDs, which do not change over the lifetime of the logical drive, rather than logical drive indexes. For more information, see Logical Drive Syntax. |
Note - ld can be substituted for the keyword logical-drive. |
The following example returns all logical drive disks with the logical drive ID of 13843684.
The following example returns all logical drive disks with a logical drive index of 0.
The returned values for the show disks command are described in the following section.
The show logical-drive command displays information about specified logical drives. For details on creating logical drives, see create logical-drive.
Caution - Any time logical drives are created or deleted, the numbering of logical drive indexes might change. After creating or deleting logical drives, issue a show logical-drivecommand to view an updated list of logical drive indexes. Or, use logical drive IDs, which do not change over the lifetime of the logical drive, rather than logical drive indexes. For more information, see Logical Drive Syntax. |
Note - If no write policy is specified for the logical drive, the write policy is set to the global controller setting and “Default” displays in the Write-Policy field. To view the controller write policy, run the show cache-parameters command. For more information about the cache policy, see set cache-parameters. |
Note - The abbreviation ld can be substituted for the keyword logical-drive. |
If no options are specified, all logical drives are displayed.
The following example returns all logical drive information.
The following example returns all logical drives with logical drive index numbers 0 and 1.
Returned values include LD index, LD ID, size (MB or GB), controller assignment, RAID level, number of disks, number of spares, number of failed disks, status, write policy type, block size (KB), and block status.
The show logical-drives add-disk command displays the status of disks that are being added to a logical drive. Returned values include LD index, LD ID, and progress. For details on the add disk command, see add disk.
Note - The abbreviation ld can be substituted for the keyword logical-drive. |
The following example returns the completion percentage for the disks that are being added.
The show logical-drives expanding command displays the progress of the logical drive expansion. Returned values include LD index, LD ID, and progress. For details on expanding logical drives, see expand.
Note - The abbreviation ld can be substituted for the keyword logical-drive. |
The following example returns the completion percentage for the logical drive expansion.
sccli> show logical-drives expanding LD LD-ID Status ------------------------ ld0 250FF1DC 60% complete (offline) |
The show logical-drives initializing command displays the progress of the RAID controller initialization. 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 completion percentage of the RAID controller for all logical drives.
sccli> show ld initializing LD LD-ID Status ------------------------ ld1 59839F65 10% complete (online) |
The show logical-drives logical-volume command displays information for all logical drives in a specified logical volume.
Caution - Any time logical volumes are created or deleted, the numbering of logical volume indexes might change. After creating or deleting logical volumes, issue a show logical-volumescommand to view an updated list of logical volume indexes. Or, use logical volume IDs, which do not change over the lifetime of the logical volume, rather than logical volume indexes. For more information, see Logical Volume Syntax. |
Note - If no write policy is specified for the logical drive, the write policy is set to the global controller setting and “Default” displays in the Write-Policy field. To view the controller write policy, run the show cache-parameters command. For more information about the cache policy, see set cache-parameters. |
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 returns all logical drives with the logical volume ID of 12345678.
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 (GB), status, number of disks, number of spares, and number of failed disks.
The show logical-drives check-parity command displays the status of a parity check being performed on a logical drive. Returned values include LD index, LD ID, and progress. To cancel the parity check, use the abort parity-check command. For details, see abort parity-check.
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-check LD LD-ID Status ------------------------ ld0 627D800A 2% complete |
For details on the check parity command, see check parity.
The show logical-drives rebuilding command displays the status for all logical drives being rebuilt. Returned values include LD index, LD ID, and progress. To cancel the rebuild, use the abort rebuild command. For details, see abort rebuild.
Note - The abbreviation ld can be substituted for the keyword logical-drive. |
The following example returns the rebuilding process percent complete for the logical drive.
The show media-check command displays the progress of a media check. To cancel the media check, use the abort media-check command. For details, see abort media-check.
The following example shows the progress of the media check.
sccli> show media-check Ch ID Iteration Status ------------------------------ 2 6 0 2% complete 2 7 0 2% complete 2 8 0 2% complete 2 9 0 2% complete |
The show stripe-size list command displays the valid stripe block size list for the specified RAID level. To set the stripe size for an individual logical drive, use the create logical-drive command. For details, see create logical-drive.
Specify the RAID level to display the corresponding stripe block size. Valid values: raid0, raid1, raid3, raid5. |
The following example shows the stripe block list for RAID5.
sccli> show stripe-size-list raid5 raid5-stripe-sizes: 16KB 32KB 64KB 128KB 256KB raid5-stripe-size-default: 128KB |
The shutdown logical-drive command guarantees that all the data is written to the disk drives, so the disk drives can be safely removed from the chassis. 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. |
Caution - Any time logical drives are created or deleted, the numbering of logical drive indexes might change. After creating or deleting logical drives, issue a show logical-drivecommand to view an updated list of logical drive indexes. Or, use logical drive IDs, which do not change over the lifetime of the logical drive, rather than logical drive indexes. For more information, see Logical Drive Syntax. |
Note - A logical drive that belongs to a logical volume cannot be shut down. |
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 local-spare command removes a local spare disk as a dedicated spare disk for the specified logical drive.
Caution - Any time logical drives are created or deleted, the numbering of logical drive indexes might change. After creating or deleting logical drives, issue a show logical-drivecommand to view an updated list of logical drive indexes. Or, use logical drive IDs, which do not change over the lifetime of the logical drive, rather than logical drive indexes. For more information, see Logical Drive Syntax. |
Specify the disk to unconfigure. For example, specify the disk with target ID 1 on channel 2 as 2.1. |
|
The following example unconfigures disk drive ID 5 on channel 2 as a local spare for the logical drive with index number 2.
The following example unconfigures disk drive ID 5 on channel 2 as a local spare for the logical drive with ID 2C33AAEA.
The following commands are explained in this section:
The configure partition command specifies how much disk space to assign to the partition or deletes a specified partition. When a logical drive or logical volume is created, it is automatically assigned to partition 0.
Note - All device capacity is displayed in powers of 1024. For details, see Device Capacity. |
The following example creates a partition for a logical drive with a logical drive index number of 2, partition number of 2, and 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, and partition size of 4000 Mbyte, and leaves the remaining capacity for the next partition.
This example deletes a partition from logical drive 0.
The map partition command maps a partition to the specified host channel, target, and LUN on the specified controller. To review host channel assignments, run the show channels command. For more information, see show channels. To review LUN maps, see show lun-maps.
Note - A maximum of 32 partitions per logical drive can be created. And, a maximum of 64 host WWN entries can be created. |
To map a partition, use the following syntax:
map partition-id channel channel-number target SCSI-id lun lun-number [wwpn | host-id][read-only | read-write] [include | exclude] [mask] [name] |
Or, to map a partition, use the following syntax:
map partition-id channel.target.lun [wwpn | host-id][read-only | read-write] [include | exclude] [mask] [name] |
Specify a combination of LD-ID/LV-ID and partition-number in XXXXXXXX-PP format where XXXXXXXX represents the Logical Drive/Volume ID, or a combination of LD/LV Index and partition number in ld{X}/lv{X}-PP format where LD/LV Index is the Logical Drive/Volume Index number. PP is a two-digital hexidecimal number that represents the partition number. Valid partition-IDs for a logical drive, for example, are 3C2B1111-01 or ld2-03. Valid partition-IDs for a logical volume, for example, are 205FB9AC-01 or lv2-03. |
|
Specify the channel, target, and LUN to map. For example, 4.1.2 represents physical channel 4, target ID 1, logical unit number 2. |
|
Sun StorEdge 3000 family FC and SATA devices only. Specify a worldwide port name (WWPN) to map to the host bus adapter with the specified WWPN. To review the available WWPN values, run the show port-wwn command. For details, see show port-wwn. |
|
Specify the host-ID of the corresponding WWPN to map to the host bus adapter. To review the available WWPN values, run the show port-wwn command. For details, see show port-wwn. |
|
Sun StorEdge 3000 family FC and SATA devices only. To specify the access mode, which assigns Read-Only or Read/Write privileges, type read-only or read-write. |
|
Sun StorEdge 3000 family FC and SATA devices only. Specify include to grant LUN access to the host identified by the WWN and WWN Mask. Type exclude to deny the identified host LUN access. If no host has been granted access to the selected LUN (by specifying include), all hosts can access that LUN. Once any host is granted access to a LUN, only hosts with explicit access (with include specified) can access that LUN. |
|
Sun StorEdge 3000 family FC and SATA devices only. Specify the WWN Mask. LUN access is granted based on the host identified by WWN and mask. |
|
Sun StorEdge 3000 family FC and SATA devices only. To set a name for the filter, type the name you want to use |
The following example maps partition 0 of the logical drive with index number 2 to LUN 0 of channel 1 on ID 112 and 113.
The following example maps partition 0 of the logical drive with ID 2D1A2222 to LUN 0 of channel 1 on ID 112.
The following example maps partition 0 of the logical volume with index number 2 to LUN 0 of channel 1 on ID 112. It sets access permission to read/write, includes the filter so all hosts can access the LUN, and names it “sabre-2.”
The show lun-maps command shows all partitions mapped to a specified host channel. Returned values include host channel, target ID, LUN ID, logical volume or logical drive index, partition ID, controller assignment, and worldwide name (WWN) filters for the LUNs.
Sun StorEdge 3000 family FC and SATA arrays only. This command additionally shows mask information, access (RW for read/write or RO for ready only permission), type (I for include or E for exclude), and name.
The following example shows all partitions mapped to host channel 1 and 3.
The following example shows all partitions mapped to the host channels in a Sun StorEdge 3510 FC array.
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 (GB), and size (GB).
The following example shows the logical drive partition table for the logical drive with the ID 161637C1.
sccli> show partitions logical-drive 161637c1 LD/LV ID-Partition Size ------------------------------------- ld0-00 161637C1-00 101.00GB |
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 |
The unmap partition command unmaps a partition. Use the appropriate syntax depending on the target you want to unmap. To view the current partitions, use the show partitions or show lun-maps command. For details, see show partitions or show lun-maps.
You can unmap a partition currently mapped to the specified channel.target.lun address. If a host worldwide port name (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.
Specify a combination of LD-ID/LV-ID and partition-number in XXXXXXXX-PP format where XXXXXXXX represents the Logical Drive/Volume ID, or a combination of LD/LV Index and partition number in ld{X}/lv{X}-PP format where LD/LV Index is the Logical Drive/Volume Index number. PP is a two-digital hexidecimal number that represents the partition number. Valid partition IDs for a logical drive, for example, are 3C2B1111-01 or ld2-03. Valid partition IDs for a logical volume, for example, are 205FB9AC-01 or lv2-03. |
|
Specify a host channel number between 0 and 7 when unmapping a specific partition from only one channel. |
|
Specify the channel, target, and LUN to unmap. This must be on the same controller as the logical volume or the logical drive that you are unmapping. Specify a host channel number between 0 and 7 when unmapping a specific partition from only one channel. Specify a host channel SCSI target number between 0 and 126. Since a host channel can have multiple SCSI IDs, the user can map the partition to multiple SCSI IDs of a host channel. Use the SCSI-ID-list format: {p}[,...{q}[,...{n}]]. Specify a host channel LUN number. For example, 4.1.2 represents physical channel 4, target ID 1, logical unit number 2. |
|
Sun StorEdge 3000 family FC and SATA devices only. Specify a worldwide port name (WWPN) to unmap from the host bus adapter with the specified WWPN. To review the available WWPN values, run the show port-wwn command. For details, see show port-wwn. |
|
Sun StorEdge 3000 family FC and SATA devices only. Specify a host name to unmap from the host bus adapter with the specified worldwide name (WWN). |
The following example unmaps the partition assigned to host channel, target ID 0, LUN 3.
The following example unmaps the partition from partition ID 0A7F8942-00.
The following commands are explained in this section:
Note - Logical volumes are unsuited to some modern configurations such as Sun Cluster environments, and do not work in those configurations. Use logical drives instead. For more information about logical drives, see create logical-drive. |
The create logical-volume 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.
Caution - Any time logical volumes are created or deleted, the numbering of logical volume indexes might change. After creating or deleting logical volumes, issue a show logical-volumes command to view an updated list of logical volume indexes. Or, use logical volume IDs, which do not change over the lifetime of the logical volume, rather than logical volume indexes. For more information, Logical Volume Syntax. |
A comma separated list of logical drive indexes, for example, ld0,ld1,ld2, or a list of logical drive identifiers, such as, 71038221. |
|
Specify the controller assignment for the logical volume. If no value is specified, the logical volume is assigned to the primary controller by default. Valid values: primary, secondary. |
|
Set the write policy for the logical volume. Valid values: write-back, write-through. If you do not specify a write policy, the logical volume uses the write policy specified for the controller. If the write policy changes for the controller, the write policy automatically changes for the logical volume as well. To set the controller write policy, use the set cache-parameters command. For details, see set cache-parameters. |
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.
The delete logical-volume command deletes the specified logical volumes.
Caution - Any time logical volumes are created or deleted, the numbering of logical volume indexes might change. After creating or deleting logical volumes, issue a show logical-volumes command to view an updated list of logical volume indexes. Alternatively, use logical volume IDs, which do not change over the lifetime of the logical volume, rather than logical volume indexes. For more information, see Logical Volume Syntax. |
Note - Before you can delete a logical volume, you must unmap all assigned LUNs. To review LUN maps, see show lun-maps. |
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 set logical-volume command sets the write policy and controller assignment for the specified logical volume. Before using this command, you must create a logical volume. For more details, see create logical-volume.
Note - Logical volumes are unsuited to some modern configurations such as Sun Cluster environments, and do not work in those configurations. Use logical drives instead. For more information about logical drives, see create logical-drive. |
Set specific drives in a logical volume. The index number is generated from the Sun StorEdge CLI. Use the show logical-volumes command to find the number. |
|
Set specific drives in a logical volume. The ID number is generated from the Sun StorEdge CLI. Use the show logical-volumes command to find the number. |
|
Set the write policy for the logical volume. Valid values: write-back, write-through, default. If you do not specify a write-policy, or if you specify default, the logical volume uses the write-policy specified for the controller. If the write policy changes for the controller, the write policy automatically changes for the logical volume as well. To set the controller write policy, use the set cache-parameters command. For details, see set cache-parameters. |
|
Specify the controller assignment for the logical volume. If no value is specified, the logical volume is assigned to the primary controller by default. Valid values: primary, secondary. |
The following example sets write policy for logical volume 4 to write-back.
The show logical-volumes command displays information about all, or a specified list, of logical volumes. Returned values include LV index, LV ID, logical volume count, LD ID list, size (Mbyte or Gbyte), write policy, and assignment information. For details on creating logical volumes, see create logical-volume.
Caution - Any time logical volumes are created or deleted, the numbering of logical volume indexes might change. After creating or deleting logical volumes, issue a show logical-volumes command to view an updated list of logical volume indexes. Or, use logical volume IDs, which do not change over the lifetime of the logical volume, rather than logical volume indexes. For more information, Logical Volume Syntax. |
Note - If no write policy is specified for the logical volume, the write policy is set to the global controller setting and “Default” displays in the Write-Policy field. To view the controller write policy, run the show cache-parameters command. For more information about the cache policy, see set cache-parameters. |
Note - All device capacity is displayed in powers of 1024. For details, see Device Capacity. |
If no arguments are specified, all logical volumes are displayed.
The following example returns all logical volume information.
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 © 2009 Sun Microsystems, Inc. All rights reserved.