Configuring a disk
You can configure a new disk by various methods.
- If you can shut down and power off the system, use Method 1. Whenever possible, it is always preferable to shut down and power off any system when you are attaching a physical disk to it.
- If you cannot shut down your system and you know details about the new disk, such as the subclass, type, parent name, and where it is connected, use Method 2.
- If you cannot shut down your system and you only know the location of the disk, use Method 3.
After a disk is configured, although it is generally available for use, the Logical Volume Manager requires that it is further identified as a physical volume.
Method 1
Use the following method when you can shut down and power off the system before attaching the disk:
At this point, the disk is usable by the system but it needs a PVID for use by the LVM. If the new disk does not have a PVID, then see Making an available disk a physical volume.
Method 2
Use the following method when you cannot shut down your system and you know the following information about the new disk:
- How the disk is attached (subclass)
- The type of the disk (type)
- Which system attachment the disk is connected to (parent name)
- The logical address of the disk (where connected).
Do the following:
- Physically connect the new disk to the system and then power on the disk and system according to the documentation that came with your system.
- To configure the disk and ensure that it is available as a physical
volume, use the mkdev command
with the flags shown, as in the following example:
This example adds a 2.2 GB disk with a SCSI ID of 6 and logical unit number of 0 to the scsi3 SCSI bus. The -c flag defines the class of the device. The -s flag defines the subclass. The -t flag defines the type of device. The -p flag defines the parent device name that you want to assign. The -w flag designates the disk's location by SCSI ID and logical unit number. The -a flag specifies the device attribute-value pair,mkdev -c disk -s scsi -t 2200mb -p scsi3 \ -w 6,0 -a pv=yes
pv=yes
, which makes the disk a physical volume and writes a boot record with a unique physical volume identifier onto the disk (if it does not already have one).
At this point, the disk is defined both as an available device and as a physical volume. You can type the lspv command on the command line to list the new disk entry. If the new disk does not appear in the lspv output, refer to the Installation and migration.
Method 3
Use the following method when you cannot shut down your system and you know only the location of the disk:
- Physically connect the new disk to the system and then power on the disk and system according to the documentation that came with your system.
- To check which physical disks are already configured on the system, type the
lspv command on the command line. For more information about the
lspv command, see the lspv command topic. The output looks similar to the following:
hdisk0 000005265ac63976 rootvg
- Type cfgmgr on the command line to enter the Configuration Manager. The Configuration Manager automatically detects and configures all newly connected devices on the system, including the new disk. For more information about the cfgmgr command, see cfgmgr.
- To confirm that the new disk was configured, type the lspv command
again. The output looks similar to one of the following:
hdisk1 none none
or
hdisk1 00005264d21adb2e none
The first field identifies the system-assigned name of the disk. The second field displays the physical volume ID (PVID), if any. If the new disk does not appear in the lspv output, refer to the Installation and migration.
At this point, the disk is usable by the system but it needs a PVID for use by the LVM. If the new disk does not have a PVID, then see Making an available disk a physical volume.