First, a disclaimer, I've worked on the UNIX versions of iSCSI
1. are you using one or multiple NIC's on your host
2. what are the configuration of the NIC's on the host - all NIC's
3. if using multiple NICs, they should be on separate subnets
4. what's the host OS? Linux - what versions etc.
5. I believe in Linux using the open iSCSI initiator that you manually log in to each target using a command - I'm under the impression that you issue a command for each target for log on
I will post the steps I took to get it going below, hopefully they are useful to someone. Everything is working fine but when I reboot my disk is not there. I had similar issues in Windows months ago but that got fixed. How can I make mount points in Linux persistent?
Steps I took to connect with RHEL4 for those who are interested. Please provide any feedback if you feel that it is wrong.
For RHEL4
* Install iscsi-utils: up2date --install iscsi-initiator-utils * Install naviagent that matches your FLARE version: rpm -Uvh naviagentcli-6.26.2.0.2-1.noarch.rpm * Install a version of Powerpath that is compatible with your RHEL version and update Extract the tar file and install appropriate rpm. Check EMC website on what version to use * Edit your iscsi.conf file, it should contain the following entries
These settings could differ depending on OS version. TargetName specifies the targets on the SAN you want to log into. Check the Port Configuration on the Clariion * Start ISCSI service: service iscsi start * iscsi-ls will show you the targets that you are logged into * Start naviagent service: service naviagent start * Start PowerPath service: service Powerpath start * set naviagent and iscsi to start at bootup: service naviagent on and service iscsi on * Run fdisk -l, an entry called /dev/emcpowera will be listed * Run fdisk /dev/emcpowera and create partition * Create file system on partition, mke2fs -j /dev/emcpowera1 * Edit /etc/fstab, add the following /dev/emcpowera /mynewdirectory ext3 _netdev 0 0 * Run mount -a , your LUN is now accessible through mount point
first of all thank you so much for sharing your "journey", hopefully you save some people a lot of time
take a look at this notes from Cisco as RH by default uses Cisco initiator, scroll down to section on mounting file systems. You could also try using disk labels (created during mke2fs) to mount file system at boot time, to rule out that PowerPath starts after iSCSI service.
I did try the label but kept on getting an error stating that the label was a duplicate upon mount. Turns out when I ran e2label /dev/emcpowera1 mylabelname it also assigned that same label to /dev/sda1 and /dev/sdb1
that's normal since emcpowera device combines two native devices sda1 and sdb1. Now i think that with multiple paths to the same device, using labels may not work since there are multiple devices with the same label, but there is got to be a way to make it mount at boot time. Did you take a look at that Cisco document ?
I did try the label but kept on getting an error stating that the label was a duplicate upon mount. Turns out when I ran e2label /dev/emcpowera1 mylabelname it also assigned that same label to /dev/sda1 and /dev/sdb1
Maybe this is causing the problem I have now with the LUN not being detected after reboot.
So if this is normal behaviour than I suppose we can't do much about it.
Had a quick look. I am not sure whether it is the same driver. It refers to the following
Mounting Filesystems
Do not add mount entries for iSCSI devices to /etc/fstab because the Linux boot process normally mounts filesystems listed in /etc/fstab before the network is configured. The script "iscsi-mountall" will manage the checking and mounting of devices listed in the file /etc/fstab.iscsi, which has the same format as /etc/fstab. This script is automatically invoked by the iSCSI startup script.
To avoid the configuration problems associated with device name changes resulting from configuration changes, use filesystem UUIDs or labels (see man pages for mke2fs, mount, and fstab) or logical volume management (see Linux LVM).
There is no iscsi-mountall script on the server so this driver is probably different from the SF driver that is installed with iscsi-initiator-utils
kelleg
4 Operator
•
4.5K Posts
0
June 12th, 2008 09:00
First, a disclaimer, I've worked on the UNIX versions of iSCSI
1. are you using one or multiple NIC's on your host
2. what are the configuration of the NIC's on the host - all NIC's
3. if using multiple NICs, they should be on separate subnets
4. what's the host OS? Linux - what versions etc.
5. I believe in Linux using the open iSCSI initiator that you manually log in to each target using a command - I'm under the impression that you issue a command for each target for log on
regards,
glen kelley
AllBlack
1 Rookie
•
74 Posts
0
June 12th, 2008 14:00
I had to add this to iscsi.conf
TargetName=iqn.1992-04.com.emc:cx.ck200064601253.a0
TargetName=iqn.1992-04.com.emc:cx.ck200064601253.b0
Enabled=no
I am glad this one has been solved.
Up to next step, I want to get this clarified
When I do fdisk -l, I get the following
Disk /dev/emcpowera: 536.8 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/emcpowera doesn't contain a valid partition table
Disk /dev/sda: 536.8 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sda doesn't contain a valid partition table
Disk /dev/sdb: 536.8 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
/dev/emcpowera is the one I need to work with.
Are /dev/sda and /dev/sdb supposed to be still showing up?
Using RHEL4, SF_NET driver (iscsi-utils),PP4.5.3,Naviagent 6.26
dynamox
9 Legend
•
20.4K Posts
1
June 12th, 2008 15:00
AllBlack
1 Rookie
•
74 Posts
0
June 12th, 2008 17:00
I will post the steps I took to get it going below, hopefully they are useful to someone.
Everything is working fine but when I reboot my disk is not there. I had similar issues in Windows months ago but that got fixed. How can I make mount points in Linux persistent?
Steps I took to connect with RHEL4 for those who are interested. Please provide any feedback if you feel that it is wrong.
For RHEL4
* Install iscsi-utils: up2date --install iscsi-initiator-utils
* Install naviagent that matches your FLARE version: rpm -Uvh naviagentcli-6.26.2.0.2-1.noarch.rpm
* Install a version of Powerpath that is compatible with your RHEL version and update
Extract the tar file and install appropriate rpm. Check EMC website on what version to use
* Edit your iscsi.conf file, it should contain the following entries
HeadDigest=never
DataDigest=never
ComFailTimeout=15
Continious=no
ConnFailTimeout=120
InitialR2T=yes
DiscoveryAddress=203.107.129.138
TargetName=iqn.1992-04.com.emc:cx.ck200064601253.a0
TargetName=iqn.1992-04.com.emc:cx.ck200064601253.b0
Enabled=no
These settings could differ depending on OS version. TargetName specifies the targets on the
SAN you want to log into. Check the Port Configuration on the Clariion
* Start ISCSI service: service iscsi start
* iscsi-ls will show you the targets that you are logged into
* Start naviagent service: service naviagent start
* Start PowerPath service: service Powerpath start
* set naviagent and iscsi to start at bootup: service naviagent on and service iscsi on
* Run fdisk -l, an entry called /dev/emcpowera will be listed
* Run fdisk /dev/emcpowera and create partition
* Create file system on partition, mke2fs -j /dev/emcpowera1
* Edit /etc/fstab, add the following /dev/emcpowera /mynewdirectory ext3 _netdev 0 0
* Run mount -a , your LUN is now accessible through mount point
dynamox
9 Legend
•
20.4K Posts
0
June 12th, 2008 18:00
first of all thank you so much for sharing your "journey", hopefully you save some people a lot of time
take a look at this notes from Cisco as RH by default uses Cisco initiator, scroll down to section on mounting file systems. You could also try using disk labels (created during mke2fs) to mount file system at boot time, to rule out that PowerPath starts after iSCSI service.
http://www.cisco.com/en/US/docs/storage/iscsi_drivers/linux/release/notes/rnlx211.html#wp35504
dynamox
9 Legend
•
20.4K Posts
0
June 12th, 2008 19:00
I did try the label but kept on getting an error
stating that the label was a duplicate upon mount.
Turns out when I ran e2label /dev/emcpowera1
mylabelname it also assigned that same label to
/dev/sda1 and /dev/sdb1
that's normal since emcpowera device combines two native devices sda1 and sdb1. Now i think that with multiple paths to the same device, using labels may not work since there are multiple devices with the same label, but there is got to be a way to make it mount at boot time. Did you take a look at that Cisco document ?
AllBlack
1 Rookie
•
74 Posts
0
June 12th, 2008 19:00
I did try the label but kept on getting an error stating that the label was a duplicate upon mount.
Turns out when I ran e2label /dev/emcpowera1 mylabelname it also assigned that same label to
/dev/sda1 and /dev/sdb1
Maybe this is causing the problem I have now with the LUN not being detected after reboot.
So if this is normal behaviour than I suppose we can't do much about it.
AllBlack
1 Rookie
•
74 Posts
0
June 12th, 2008 20:00
It refers to the following
Mounting Filesystems
Do not add mount entries for iSCSI devices to /etc/fstab because the Linux boot process normally mounts filesystems listed in /etc/fstab before the network is configured. The script "iscsi-mountall" will manage the checking and mounting of devices listed in the file /etc/fstab.iscsi, which has the same format as /etc/fstab. This script is automatically invoked by the iSCSI startup script.
To avoid the configuration problems associated with device name changes resulting from configuration changes, use filesystem UUIDs or labels (see man pages for mke2fs, mount, and fstab) or logical volume management (see Linux LVM).
There is no iscsi-mountall script on the server so this driver is probably different from the SF driver that is installed with iscsi-initiator-utils
kelleg
4 Operator
•
4.5K Posts
0
June 13th, 2008 11:00
You should have the network services running so the host can see the LUNs prior to doing anything with the LUNs.
maybe make PowerPath starting up dependent on iscsi service running (at least that's the way you do it in Windows)
glen
AllBlack
1 Rookie
•
74 Posts
0
June 15th, 2008 13:00
SKT2
2 Intern
•
1.3K Posts
0
June 19th, 2008 12:00
here is how our fstab entry looks like
/dev/vghw_rds3_p1/lvol1 /hw_rds3_p1/oradata01 ext3 _netdev,defaults 1 2
/dev/vghw_rds3_p1/lvol2 /hw_rds3_p1/oradata02 ext3 _netdev,defaults 1 2
/dev/vghw_rds3_p1/lvol3 /hw_rds3_p1/oraadmin ext3 _netdev,defaults 1 2
/dev/vghw_rds3_p1/lvol4 /hw_rds3_p1/orabin ext3 _netdev,defaults 1 2
/dev/vghw_rds3_p1_arc/lvol1 /hw_rds3_p1/oraarch ext3 _netdev,defaults 1 2