Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: iscsi target on a zfs zvol?
hauke%Espresso.Rhein-Neckar.DE@localhost (Hauke Fath) writes:
>I would like to set up an iscsi target backed by a zfs zvol, to serve=20
>as a Mac time machine volume.
Independent of your problem you should use 'istgt' from pkgsrc.
>863:/u/sources/netbsd-developer/src/external/bsd/iscsi/lib/../dist/src/lib/=
>disk.c:720:=20
>***ERROR*** error reading "target0"
># hexdump -C -n 512 /dev/zvol/rdsk/tank/time_machine_1=20
>00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =20
>at which point
>DISK: LUN 0: 2097152 MB disk storage for "target0"
>Looks like an initialization issue on behalf of iscsi-target. Does that=20
>ring a bell for anyone?
Probably unrelated to ZFS, this reminds me of:
# stat -s /dev/rvnd0a
st_dev=43010 st_ino=65103 st_mode=020640 st_nlink=1 st_uid=0 st_gid=5 st_rdev=10496 st_size=0 st_atime=1590051866 st_mtime=1590051866 st_ctime=1590051866 st_birthtime=1590051866 st_blksize=65536 st_blocks=0 st_flags=0
# hexdump -C /dev/rvnd0a | head -1
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |............
# stat -s /dev/rvnd0a
st_dev=43010 st_ino=65103 st_mode=020640 st_nlink=1 st_uid=0 st_gid=5 st_rdev=10496 st_size=10485760 st_atime=1657481715 st_mtime=1590051866 st_ctime=1590051866 st_birthtime=1590051866 st_blksize=65536 st_blocks=0 st_flags=0
Before opening the device with hexdump, the st_size field is 0.
The size is cached in the vnode, but only determined when you open the
device. The information gets lost again when the vnode is expired,
which only happens when there is a memory shortage.
Home |
Main Index |
Thread Index |
Old Index