Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: iscsi crash

On Sun, Jan 05, 2014 at 09:48:13AM +0100, wrote:

> is configured. So I think the kernel is modular. The GENERIC kernel
> does not work because the option 'pseudo-device iscsi' is needed but
> not set in GENERIC.

For amd64 I don't have to add 'pseudo-device iscsi'. When you start
the iscsid, the pseudo-device driver is loaded automatically as
a kernel module.

% sudo iscsid
% dmesg | tail -1
iscsi: attached.  major = 203
% modstat iscsi
NAME             CLASS      SOURCE     REFS  ADDRESS          SIZE     REQUIRES 
iscsi            driver     filesys    0     ffffffff80c8b000 45332    -
% sudo iscsictl add_send_target -a
Added Send Target 1
% sudo iscsictl refresh_targets
% sudo iscsictl list_targets
% sudo iscsictl login -P 3
Created Session 2, Connection 1
% dmesg | tail -8
scsibus1 at iscsi0: 1 target, 16 luns per target
sd1 at scsibus1 target 0 lun 0: <SYNOLOGY, iSCSI Storage, 3.1> disk fixed
sd1: fabricating a geometry
sd1: 20480 MB, 20480 cyl, 64 head, 32 sec, 512 bytes/sect x 41943040 sectors
sd1: fabricating a geometry
dk8 at sd1: sd1a
dk8: 41942976 blocks at 64, type: ffs
sd1: async, 8-bit transfers, tagged queueing
% sudo iscsictl list_sessions
Session 2: Target
% sudo iscsictl logout -I 2
% dmesg | tail -3
dk8 at sd1 (sd1a) deleted
sd1: detached
scsibus1: detached
% sudo modunload iscsi
[... takes a while ...]
% dmesg | tail -1
iscsi0: detached
% modstat iscsi
NAME             CLASS      SOURCE     REFS  ADDRESS          SIZE     REQUIRES 
% pkill iscsid
% pgrep iscsid

On other archs, that do not yet support modules, I have added
the pseudo-device like you. But I'm not sure if that already
worked for netbsd-6.

The whole construct of iscsi driver and iscsi daemon is still
flakey. Both parts keep session states, killing iscsid will
lose part of the state and only unloading the module will clean up
the remaining parts and that's not possible if you have a builtin
driver. If you kill iscsid while having set up an iscsi session
and you cannot unload the driver, you should reboot.

                                Michael van Elst
                                "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index