Howto guide to scan new disk or LUNs on Linux or HPUX machines. This guide explains steps to scan and then identify new disk device names.
When you add new disk to system, you need to scan it so that kernel will be able to identify new hardware and assign disk name to it. Adding new disk to system can be local or from storage. If its a local then its a addition of disk in free disk slots attached to server. If its a storage LUN then its a masking and zoning at storage level to WWN of server.
When you add new disk to system, you need to scan it so that kernel will be able to identify new hardware and assign disk name to it. Adding new disk to system can be local or from storage. If its a local then its a addition of disk in free disk slots attached to server. If its a storage LUN then its a masking and zoning at storage level to WWN of server.
Once the disk / LUN is made available / visible to server, next step is to scan it. Kernel has a know hardware tree with it. This tree needs to be updated with new disk information. To let kernel know that new disk is made available to server disk scanning is required. If disk is from storage array then there are chances you have storage vendor utilities / scripts available to scan storage on server example: evainfo (for EVA storage), xpinfo (for XP12K storage), powermt (for EMC storage). If these utilities are not available, you still be able to scan them from OS.
HPUX disk scan :
In HPUX, we have dedicated
ioscan
command to scan new hardware. You can ask command to scan on hard disks with -C
option i.e. class. Before executing this command, keep the output of previous disks (ioscan -funC disk
) handy. This output can be compared to new output (command below) to identify new disk.
Scan output shows you all detected disks on system and their assigned disk names in ctd format. Sometimes,
ioscan
unable to install special device files for newly detected disks, in such situation you can run insf
(install special files) command to ensure all detected hardware has device files in place.
New disk even can be identified by comparing directory structure of
/dev/disk
or /dev/dsk/
before and after scan. Any new addition during scan to this directories is your new disk.
Once you identify this new disk, you can use it on system via volume managers like LVM.
Linux Disk scan:
In Linux its bit tricky since there is no direct
ioscan
available. First you need get current available disk details using fdisk
command as below :
Keep this list handy to compare with the list after scan.
Scan SCSI disks
Now, if you have connected disks via SCSI then you need to scan SCSI hosts on server. Check current list of hosts on server as below :
Now, you have 4 hosts on this server (in example above). You need to scan all these 4 hosts in order to scan new disks attached to them. This can be done by writing
- - -
in their respective scan files. See below commands:
This completes your scan on SCSI hosts on server. Now you can again run
fdisk
command we saw previously and compare new output with old one. You will see new disk being added to system and its respective device name too.
Scan FC LUNs:
If you have connected disks via FC then you need to scan FC hosts on server. Check current list of hosts on server as below :
Now there are 2 FC hosts on server. Again we need to scan them by writing 1 to their respective
issue_lip
file along with scan steps from above.
This will scan your FC HBA for new visible disks. Once command completes (check syslog for completion event), you can use
fdisk
command to list disks. Compare output with ‘before scan’ output and get new disk names!
0 comments:
Post a Comment