ISCSI
We have an Infortrend A16E-G2130-4 - ES-6200 in Amsterdam. It has 4 Gigabit Ethernet ports. One of them is connected to the KNAMS switch, the other one is connected directly to sage's eth1.
Setup
- Install open-iscsi admin tools
- iscsiadm -m discovery --type=sendtargets --portal=145.97.39.176
[39f9a6] 145.97.39.176:3260,1 iqn.2002-10.com.infortrend:raid.sn7295750.0A [51bce0] 192.168.1.2:3260,1 iqn.2002-10.com.infortrend:raid.sn7295750.10 [39f9d5] 145.97.39.176:3260,1 iqn.2002-10.com.infortrend:raid.sn7295750.00
- The numbers in the brackets are so called record ids. They are the input to the next command.
- iscsiadm -m node --record=39f9d5 --login
- Ther kernel messages will show something like the following for all available LUNs:
Vendor: IFT Model: A16E-G2130-4 Rev: 349A Type: Direct-Access ANSI SCSI revision: 04 SCSI device sdc: 2072608768 512-byte hdwr sectors (1061176 MB) sdp: Write Protect is off SCSI device sdc: drive cache: write back SCSI device sdc: 2072608768 512-byte hdwr sectors (1061176 MB) sdc: Write Protect is off SCSI device sdc: drive cache: write back sdc: unknown partition table sd 4:0:0:6: Attached scsi disk sdc sd 4:0:0:6: Attached scsi generic sg15 type 0
- Now you have lots of iSCSI disks, that you can use in a LVM volume. Note: You have to use vgscan to make the disks visible for LVM.
- If there's already a volume group on the disk, vgscan will report its name:
Reading all physical volumes. This may take a while... Found volume group "iscsivg" using metadata type lvm2
- You can activate the disk using vgchange -a y iscsivg
Authentification
- The iscsi disk and the client do a CHAP authentification handshake. Usernames and passwords are in /etc/iscsid.conf.
Take care!
- Don't call iscsiadm -m node --record=39f9d5 --login twice - otherwise you'll see all disks twice!
- Make sure that all iscsi filesystems are unmounted before iscsi is shut down during reboot. Otherwise your filesystem might be corrupted.
Setup of the array
- The array offers an SSH based admin interface. SSH to the box and use the apcpass for login.
- For some reason that I don*t understand, I have to set Putty to Window->Translation->Character Set 'CP437'. Otherwise, the admin interface ignores most of my keystrokes.
Main Menu
Tue Feb 6 22:03:25 2007 A16E-G2130-4 - ES-6200 Cache Status: Clean BAT: ++++ ┌──────────── < Main Menu > ─────────────┐ │ Quick installation │ │ view and edit Logical drives │ │ view and edit logical Volumes │ │ view and edit Host luns │ │ view and edit Drives │ │ view and edit channelS │ │ view and edit Configuration parameters │ │ view and edit Peripheral devices │ │ system Functions │ │ view system Information │ │ view and edit Event logs │ └────────────────────────────────────────┘ Arrow Keys:Move Cursor Enter:Select Esc:Exit Ctrl+L:Refresh Screen
Partitioning
The array has one logical drive configured. It's a RAID 6 spanning all 16 drives. That's about 10TB in total. Since Linux has problems with disks larger than 1.6TB, the logical drive is partitioned into 7 partitions.
- Go to View and edit Logical drives
Tue Feb 6 22:07:16 2007 A16E-G2130-4 - ES-6200 Cache Status: Clean BAT: ++++ ╔════╤════════╤══╤═════╤════════╤══════════╤═╤═╤═╤═╤═══╤═══╤═══╤═══════════════╗ ║ LG │ ID │LV│ RAID│Size(MB)│ Status 1│2│3│O│C│#LN│#SB│#FL│ NAME ║ ╟────┼────────┼──┼─────┼────────┼──────────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 0 │5DADE8F3│NA│RAID6│10012016│GOOD │ │ │7│B│ 16│ 0│ 0│raid6 ║ ╟────┼────────┼──┼─────┼────────┼──────────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 1 │ │ │ │ │ │ │ │ │ │ │ │ │ ║ ╟────┼────────┼──┼─────┼────────┼──────────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 2 │ │ │ │ │ │ │ │ │ │ │ │ │ ║ ╟────┼────────┼──┼─────┼────────┼──────────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 3 │ │ │ │ │ │ │ │ │ │ │ │ │ ║ ╟────┼────────┼──┼─────┼────────┼──────────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 4 │ │ │ │ │ │ │ │ │ │ │ │ │ ║ ╟────┼────────┼──┼─────┼────────┼──────────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 5 │ │ │ │ │ │ │ │ │ │ │ │ │ ║ ╟────┼────────┼──┼─────┼────────┼──────────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 6 │ │ │ │ │ │ │ │ │ │ │ │ │ ║ ╟────┼────────┼──┼─────┼────────┼──────────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 7 │ │ │ │ │ │ │ │ │ │ │ │ │ ║ ╚════╧════════╧══╧═════╧════════╧══════════╧═╧═╧═╧═╧═══╧═══╧═══╧═══════════════╝ Arrow Keys:Move Cursor Enter:Select Esc:Exit Ctrl+L:Refresh Screen
- Select the first logical drive. A context menu appears
Tue Feb 6 22:09:06 2007 A16E-G2130-4 - ES-6200 Cache Status: Clean BAT: ++++ ╔══╔════════════════════════════════╗══════╤═╤═╤═╤═╤═══╤═══╤═══╤═══════════════╗ ║ L║ vieW drives ║ us 1│2│3│O│C│#LN│#SB│#FL│ NAME ║ ╟──║ Partition logical drive ║ ────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 0║ logical drive Name ║ │ │ │7│B│ 16│ 0│ 0│raid6 ║ ╟──║ mIgrate logical drive ║ ────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 1║ add driVes ║ │ │ │ │ │ │ │ │ ║ ╟──║ reGenerate parity ║ ────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 2║ cOpy and replace drive ║ │ │ │ │ │ │ │ │ ║ ╟──║ Media scan ║ ────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 3║ write policY ║ │ │ │ │ │ │ │ │ ║ ╟──╚════════════════════════════════╝ ────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 4 │ │ │ │ │ │ │ │ ║ ╟────┼────────┼──┼─────┼────────┼──────────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 5 │ │ │ │ │ │ │ │ │ │ │ │ │ ║ ╟────┼────────┼──┼─────┼────────┼──────────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 6 │ │ │ │ │ │ │ │ │ │ │ │ │ ║ ╟────┼────────┼──┼─────┼────────┼──────────┼─┼─┼─┼─┼───┼───┼───┼───────────────╢ ║ 7 │ │ │ │ │ │ │ │ │ │ │ │ │ ║ ╚════╧════════╧══╧═════╧════════╧══════════╧═╧═╧═╧═╧═══╧═══╧═══╧═══════════════╝ Arrow Keys:Move Cursor Enter:Select Esc:Exit Ctrl+L:Refresh Screen
- Select Partition logical drive to see the partitions.
LUN Mapping
The array has 4 different Gigabit Ehternet iSCSI interfaces. LUNs (in our case partitions) must be made visible before they can be used. If a host is connected to channel 0, the LUNs must be made visible on channel 0.
- In the main menu, select view and edit Host luns and select CHL 0 ID 0. You'll see all available mappings:
Tue Feb 6 22:16:06 2007 A16E-G2130-4 - ES-6200 Cache Status: Clean BAT: ++++ ┌──────────╔═══╤═════╤═══╤═════════╤══════════╤═════╗ │ Quick ins║LUN│LV/LD│DRV│Partition│ Size(MB) │ RAID║ │ view and ╟───┼─────┼───┼─────────┼──────────┼─────╢ │ view and ║ 0│ LD│ 0│ 0│ 1600000│RAID6║ │ view and ╟───┼─────┼───┼─────────┼──────────┼─────╢ │ v╔═══════║ 1│ LD│ 0│ 1│ 1600000│RAID6║ │ v║ CHL 0 ╟───┼─────┼───┼─────────┼──────────┼─────╢ │ v║ CHL 1 ║ 2│ LD│ 0│ 2│ 1600000│RAID6║ │ v║ CHL 2 ╟───┼─────┼───┼─────────┼──────────┼─────╢ │ s║ CHL 3 ║ 3│ LD│ 0│ 3│ 1600000│RAID6║ │ v║ Edit i╟───┼─────┼───┼─────────┼──────────┼─────╢ │ v╚═══════║ 4│ LD│ 0│ 4│ 1600000│RAID6║ └──── ╟───┼─────┼───┼─────────┼──────────┼─────╢ ║ 5│ LD│ 0│ 5│ 1000000│RAID6║ ╟───┼─────┼───┼─────────┼──────────┼─────╢ ║ 6│ LD│ 0│ 6│ 1012016│RAID6║ ╟───┼─────┼───┼─────────┼──────────┼─────╢ ║ 7│ │ │ │ │ ║ ╚═══╧═════╧═══╧═════════╧══════════╧═════╝ Arrow Keys:Move Cursor Enter:Select Esc:Exit Ctrl+L:Refresh Screen
- If you choose Edit iSCSI Initiator List, you can add hosts that are allowed to access the array.
Tue Feb 6 22:18:48 2007 A16E-G2130-4 - ES-6200 Cache Status: Clean BAT: ++++ ┌──────────── < Main Menu > ─────────────┐ │ Quick installation │ │ view and edit Logical drives │ │ view and edit logical Volumes │ │ view╔═════════════════╗ │ │ v╔══║ Host Alias Name ║ ════╗ │ │ v║ C╟─────────────────╢ ║ │ │ v║ C║ragweed ║ ║ meters │ │ v║ C╚══╔════════════════════════════════════════════════════╗ │ s║ CHL ║ Host Alias Name - ragweed ║ │ v║ Edit║ Host IQN - iqn.2007-02.org.wikimedia.knams. ║ │ v╚═════║ User Name - topsecret ║ └──── ║ User Password - ********* ║ ║ Target Name - topsecret ║ ║ Target Password - ********* ║ ║ IP Address - 145.97.39.139 ║ ║ NetMask - 255.255.255.0 ║ ╚════════════════════════════════════════════════════╝ Arrow Keys:Move Cursor Enter:Select Esc:Exit Ctrl+L:Refresh Screen