iSCSIイニシエータをUbuntu 12.04にセットアップ


$ sudo apt-get update
$ sudo apt-get install open-iscsi
$ dpkg -l open-iscsi
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  open-iscsi     2.0.873-3ubu amd64        High performance, transport indep
$ sudo iscsiadm -m discovery -t sendtargets -p 1.2.3.4
1.2.3.4:3260,1 iqn.2013-08.me.hrendoh:test.disk
$ sudo iscsiadm -m node --targetname iqn.2013-08.me.hrendoh:test.disk --login
Logging in to [iface: default, target: iqn.2013-08.me.hrendoh:test.disk, portal: 1.2.3.4,3260] (multiple)
Login to [iface: default, target: iqn.2013-08.me.hrendoh:test.disk, portal: 1.2.3.4,3260] successful.
$ sudo iscsiadm -m session
tcp: [1] 1.2.3.4:3260,1 iqn.2013-08.me.hrendoh:test.disk
$ sudo fdisk -l

Disk /dev/vda: 16.1 GB, 16106127360 bytes
16 heads, 63 sectors/track, 31207 cylinders, total 31457280 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e1e29

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048      499711      248832   83  Linux
/dev/vda2          501758    31455231    15476737    5  Extended
/dev/vda5          501760    31455231    15476736   8e  Linux LVM

Disk /dev/mapper/localhost-root: 13.7 GB, 13652459520 bytes
255 heads, 63 sectors/track, 1659 cylinders, total 26664960 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/localhost-root doesn't contain a valid partition table

Disk /dev/mapper/localhost-swap_1: 2143 MB, 2143289344 bytes
255 heads, 63 sectors/track, 260 cylinders, total 4186112 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/localhost-swap_1 doesn't contain a valid partition table

Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sda doesn't contain a valid partition table
,