Start a Conversation

Unsolved

This post is more than 5 years old

5804

January 13th, 2014 04:00

Identifying storage on Linux, Windows and AIX

Identifying storage on Linux, Windows and AIX

Introduction

In this article, I am going to talk about how to identify storage on Linux, Windows and AIX. The problems to be addressed include:

1.       How can LUN be identified?

2.       After LUN expansion, what actions need to be done to make the host see the new space?

3.       When the storage group is created, must the host install the host agent to identify the LUN?

Detailed Information

1. How can LUN be identified?

If it is on the HBA, you do not need to do anything, and it will be ok after a little while. Linux offers many ways to scan the SCSI bus and identify SCSI devices. Linux does not support dynamic scan before kernel 2.4. Since kernel 2.6, it supports dynamic scan, but the kernel does not provide command to dynamically configure SCSI devices, such as HPUX ioscan.

Therefore, the effective methods include: • Restart OS

Reload the HBA driver, with tool modprobe on kernel 2.4, configure /proc, for example: # echo "scsi add-single-device 0 1 2 3"> /proc/scsi/scsi

On kernel 2.6, excute scan in /sys folder, for example:

# cd /sys/class/scsi_host/host1/

# ls-al scan

# echo '---'> scan

• HBA vendors use a script to perform scan, for example:

QLogic # /ql-dynamic-tgt-lun-disc.sh - scan

Emulex # lun_scan all

• Use Linux vendor’s script to perform scan, for example:

SLES #/bin/rescan-scsi-bus.sh

2. After LUN expansion, what actions need to be done to make the host see the new space?

After LUN expansion, users can use fdisk-l command and find the capacity of device, such as /dev/sdn, has become larger. Whether the file system supports online expansion just depends on the file system itself. For ext2/3/4, resize2fs can be used for this operation. Let me summarize the volume expansion steps on Linux root VG managed by LVM:

1. Add a disk, log in the OS, and run fdisk command to format the new partition, such as /dev/sdb1

2. Create pv: pvcreate /dev/sdb1

3. Extend VG: vgextend /dev/VolGroup00 /dev/sdb1

4. Run vgdisplay and see expanded VG. If you see the increased capacity, the VG has been extended successfully

5. Extend LV: lvextend-L + n (M or G) /dev/VolGroup00/LogVol00 /dev/VolGroup00

6. Activate VG: Run lvm vgchange-ay /dev/VolGgroup00

7. Run e2fsck to check the file system: e2fsck /dev/VolGroup00/LogVol00

8. resize2fs /dev/VolGroup00/LogVol00

In LVM, the lvextend command certainly supports online volume extension, so it does not affect the application. However, file system expansion is another story, which demands the file system’s support.

On Windows, you can do:

1. At the command prompt, type diskpart.exe.

2. Type list volume to display the existing volumes on the computer.

3. Select the number of the volume you want to extend.

4. Type extend [size = n] [disk = n] [noerr].

Here are the parameters:

size = n capacity of the expansion

disk = n disk to extend

NOERR only applies to scripts. When an error occurs, this parameter demands diskpart to continue as if no error occurs. Without the noerr parameter, the error causes diskPart to exit with an error code.

4.       Type exit to quit diskpart.exe.

On AIX:

1. Unmount the file system and inactivate volume group (using umount and varyoffvg command).

2. Run emc_cfgmgr command.

3. Run INQ command to verify the OS has identified an increase of capacity on disk.

4. Activate the volume group (varyonvg command).

5. Run the chvg -g command so the volume group's new capacity is recognized.

6. Run lslv command , and note the size of PP and PPs.

7. Mount the file system and run chfs-a size = command. This will extend file system using all the new space according to EMC Host Connectivity Guide for IBM AIX.

3. When the storage group is created, must the host install the host agent to identify the LUN?

You do not need to install the agent which is just used for host registration. In this case, manually perform a host registration on the storage end.

Author: Kevin Liu

             

iEMC APJ

Please click here for for all contents shared by us.

17 Posts

April 17th, 2014 06:00

Excellent work, real useful

No Events found!

Top