3.If the system virtual memory is too low ,then do not proceed further.If you have enough free virtual memory,then you can proceed with below command to scan new LUNS.
# echo "1" > /sys/class/fc_host/host0/issue_lip
# echo "- - -" > /sys/class/scsi_host/host0/scan
# echo "1" > /sys/class/fc_host/host1/issue_lip
# echo "- - -" > /sys/class/scsi_host/host1/scan
Note: You need to monitor the “issue_lip” in /var/log/messages to determine when the scan will complete.This operation is an asynchronous operation.
You can also use rescan-scsi-bus.sh script to detect new LUNS.
# yum install sg3_utils
# ./rescan-scsi-bus.sh
4.Verify if the new LUN is visible or not by counting the available disks.
# fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l
If any new LUNS added ,then you can see more count is more then before scanning the LUNS.
Scanning SCSI DISKS in Redhat Linux
1.Finding the existing disk from fdisk.
[root@mylinz1 ~]# fdisk -l |egrep '^Disk' |egrep -v 'dm-'
Disk /dev/sda: 21.5 GB, 21474836480 bytes
2.Find out how many SCSI controller configured.
[root@mylinz1 ~]# ls /sys/class/scsi_host/host
host0 host1 host2
In this case,you need to scan host0,host1 & host2.
3.Scan the SCSI disks using below command.
[root@mylinz1 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan
[root@mylinz1 ~]# echo "- - -" > /sys/class/scsi_host/host1/scan
[root@mylinz1 ~]# echo "- - -" > /sys/class/scsi_host/host2/scan
4.Verify if the new disks are visible or not.
[root@mylinz1 ~]# fdisk -l |egrep '^Disk' |egrep -v 'dm-'
Disk /dev/sda: 21.5 GB, 21474836480 bytes
Disk /dev/sdb: 1073 MB, 1073741824 bytes
Disk /dev/sdc: 1073 MB, 1073741824 bytes
From Redhat Linux 5.4 onwards, redhat introduced “/usr/bin/rescan-scsi-bus.sh” script to scan all the SCSI bus and update the SCSI layer to reflect new devices.
How to discover, login, and logout iSCSI targets
ORACLE SOLUTIONS
Applies to:
----------------------------------------------------------------------------------------------------------------------
Operating Systems - RHEL 5.x, RHEL 6.x, OL 5.x, OL 6.x, Oracle VM 2.x
Platform - Applies to all Dell PowerEdge Servers
Goal:
----------------------------------------------------------------------------------------------------------------------
To discover iSCSI targets, login targets, and logout targets from your EqualLogic iSCSI storage array.
Solution:---------------------------------------------------------------------------------------------------------------------
Once the process of installing the iSCSI initiator is completed as seen in the wiki article,http://en.community.dell.com/dell-groups/enterprise_solutions/w/oracle_solutions/3-2-1-1-1-how-do-i-install-and-start-iscsi-initiator-utils.aspx, the next step is to discover your iSCSI targets.
Discovering iSCSI Targets:
Once you have the iSCSI service running you will use the 'iscsiadm' userspace utility to discover, login and logout iSCSI targets.
To get a list of available targets the following command can be used:
#iscsiadm -m discovery -t st -p <Group IP address>:3260
NOTE | The group IP address is the IP address of the EqualLogic storage group. |
Example:
# iscsiadm -m discovery -t st -p 172.23.10.240:3260
172.23.10.240:3260,1 iqn.2001-05.com.equallogic:0-8a0906-83bcb3401-16e0002fd0a46f3d-rhel5-test
The example shows that the 'rhel5-test' volume has been found.
Logging in iSCSI Targets:
Once you have discovered your iSCSI targets, you can log in the following target in one of two ways.
Issuing the following command will login all iSCSI targets found. The command to login all iSCSI targets at once is the following:
#iscsiadm -m node -l
If you prefer to login an individual iSCSI target the following command can be issued:
#iscsiadm -m node -T <Complete Target Name> -l -p <Group IP>:3260
Example:
#iscsiadm -m node -l -T iqn.2001-05.com.equallogic:83bcb3401-16e0002fd0a46f3d-rhel5-test -p 172.23.10.240:3260
Logging out iSCSI Targets:
Logging out iSCSI targets also can be accomplished in one of two ways. The process of logging out all iSCSI targets found, can be done with the following command:
#iscsiadm -m node -u
The process of logging out individual iSCSI target uses the following command:
#iscsiadm -m node -u -T <Complete Target Name>-p <Group IP address>:3260
Example:
#iscsiadm -m node -u -T iqn.2001-05.com.equallogic:83bcb3401-16e0002fd0a46f3d-rhel5-test -p 172.23.10.240:3260
No comments:
Post a Comment