[Stgt-devel] stgt and large devices?
FUJITA Tomonori
fujita.tomonori
Wed May 16 09:09:07 CEST 2007
From: Tomasz Chmielewski <mangoo at wpkg.org>
Subject: [Stgt-devel] stgt and large devices?
Date: Tue, 15 May 2007 16:35:11 +0200
> I have a large device (650 GB or so) which I used to export with IET
> like that:
>
> Target iqn.2006-08.net.syneticon:thecus.backup
> Lun 0 Path=/dev/mapper/LVM2-backup,Type=fileio
> Alias backup
>
>
> As I wanted to try stgt, I stopped IET, started tgtd, and tgtadm:
>
> tgtadm --op new --mode target --tid 1 -T
> iqn.2006-08.net.syneticon:thecus.backup
> tgtadm --op new --mode logicalunit --tid 1 --lun 0 -b
> /dev/mapper/LVM2-backup
> tgtadm --op bind --mode target --tid 1 -I ALL
>
>
> The initiator can connect, but the content of the disk is different from
> that on the real disk - I can't mount the filesystem.
>
> when I browse through the beginning of a disk, I can see some familiar
> content, but it is nevertheless different.
>
>
> With smaller targets (I tried up to 25 GB), everything is fine.
>
>
> Was stgt tested with big devices?
Strage. It works for me.
On the target box:
aris:~# ./tgt/usr/tgtadm --op show --mode target
Target 1: iqn.2001-04.com.example:storage.disk2.paris.sys1.xyz
System information:
Type: disk
Driver: iscsi
Status: running
I_T nexus information:
LUN information:
LUN: 0
SCSI ID: deadbeaf1:0
SCSI SN:
Size: 682G
Backing store: /dev/mapper/tgt-l0
Account information:
ACL information:
ALL
On the initiator box:
tulip:/home/fujita# mkfs.ext3 /dev/sdg1
mke2fs 1.40-WIP (14-Nov-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
89391104 inodes, 178781352 blocks
8939067 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
5456 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
tulip:/home/fujita# mount /dev/sdg1 /mnt/
tulip:/home/fujita# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 276543576 5888396 256607544 3% /
tmpfs 3571036 0 3571036 0% /lib/init/rw
udev 10240 124 10116 2% /dev
tmpfs 3571036 0 3571036 0% /dev/shm
/dev/sdg1 703904704 201864 667946572 1% /mnt
Then I unmount /dev/sdg1 on the initiator box and run IET with
/dev/mapper/tgt-l0. I can /dev/sg1 again on the initiator box.
More information about the stgt
mailing list