分类: LINUX
2006-09-17 23:32:03
deb261:~# apt-get install open-iscsi Reading package lists... Done Building dependency tree... Done The following NEW packages will be installed open-iscsi 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0B/104kB of archives. After unpacking 340kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! open-iscsi Install these packages without verification [y/N]? y Selecting previously deselected package open-iscsi. (Reading database ... 34744 files and directories currently installed.) Unpacking open-iscsi (from .../open-iscsi_1.0.485-3_i386.deb) ... Setting up open-iscsi (1.0.485-3) ... Starting iSCSI initiator service: succeeded. |
deb261:~# /etc/init.d/open-iscsi start Starting iSCSI initiator service: succeeded. |
iscsi: registered transport (tcp) |
deb261:~# iscsiadm -m discovery -t sendtargets -p 10.1.0.11:3260 [045e0b] 10.1.0.11:3260,1 iqn.2001-04.com.example:storage.disk2.sys1.xyz |
deb261:~# iscsiadm -m node [045e0b] 10.1.0.11:3260,1 iqn.2001-04.com.example:storage.disk2.sys1.xyz |
deb261:~# iscsiadm -m node -r 045e0b -l |
deb261:~# fdisk -l Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 2500 20081218+ 83 Linux /dev/sda2 2501 2610 883575 5 Extended /dev/sda5 2501 2610 883543+ 82 Linux swap / Solaris Disk /dev/sdb: 8589 MB, 8589934592 bytes 64 heads, 32 sectors/track, 8192 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 8192 8388592 83 Linux Disk /dev/sdc: 1073 MB, 1073741824 bytes 34 heads, 61 sectors/track, 1011 cylinders Units = cylinders of 2074 * 512 = 1061888 bytes Disk /dev/sdc doesn't contain a valid partition table |
scsi1 : iSCSI Initiator over TCP/IP, v.0.3 Vendor: IET Model: VIRTUAL-DISK Rev: 0 Type: Direct-Access ANSI SCSI revision: 04 SCSI device sdb: 16777216 512-byte hdwr sectors (8590 MB) sdb: Write Protect is off sdb: Mode Sense: 77 00 00 08 SCSI device sdb: drive cache: write back SCSI device sdb: 16777216 512-byte hdwr sectors (8590 MB) sdb: Write Protect is off sdb: Mode Sense: 77 00 00 08 SCSI device sdb: drive cache: write back sdb: sdb1 sd 1:0:0:0: Attached scsi disk sdb Vendor: IET Model: VIRTUAL-DISK Rev: 0 Type: Direct-Access ANSI SCSI revision: 04 SCSI device sdc: 2097152 512-byte hdwr sectors (1074 MB) sdc: Write Protect is off sdc: Mode Sense: 77 00 00 08 SCSI device sdc: drive cache: write back SCSI device sdc: 2097152 512-byte hdwr sectors (1074 MB) sdc: Write Protect is off sdc: Mode Sense: 77 00 00 08 SCSI device sdc: drive cache: write back sdc: unknown partition table sd 1:0:0:1: Attached scsi disk sdc |
deb261:~# iscsiadm -m node -r 045e0b -u deb261:~# fdisk -l Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 2500 20081218+ 83 Linux /dev/sda2 2501 2610 883575 5 Extended /dev/sda5 2501 2610 883543+ 82 Linux swap / Solaris |