On Mar 28 2014 10:57, Andrey Borzenkov wrote:
On Fri, Mar 28, 2014 at 10:27 AM, Paul Neuwirth <mail@paul-neuwirth.de> wrote:
On Mar 27 2014 20:24, Andrey Borzenkov wrote:
В Thu, 27 Mar 2014 07:59:20 +0100 Per Jessen <per@computer.org> пишет:
Paul Neuwirth wrote:
On Mar 26 2014 16:03, Per Jessen wrote:
Hmm, he did say it was root, so yes, it has to be in the initrd. Paul, you may have to rebuild the initrd to get the iscsi setup copied in.
yes, i have "node.startup = onboot" in the node configuration. and yes it happens in initrd. i rebuild initrd already, but wondering, how mkinitrd shoulld detect, that the root device (/dev/md0) uses an iscsi device. something to add into a config or into the mkinitrd command?
I think mkinitrd is somewhat uncritical and simply copies in the iscsi config whenever it finds iscsi devices in fstab. Judging by your initrd, it has iscsi so that's covered. Your initrd looks remarkably like one of mine, right down to the tg3 network driver.
You might want to look into if the md startup waits for the iscsi ditto.
According to script order, iscsi comes far before mounting of root partition. So the actual question is - is discovery and setup of iSCSI targets synchronous? If not ...
.. mkinitrd waits 15 seconds before starting array for root in degraded mode. There is no real solution except increasing timeout.
I do not have any iSCSI setup so could someone test how long it takes for devices to appear? Look into /lib/mkinitrd/scripts/boot-iscsi.sh what it does.
i don't think that's the actual problem. iscsi device is found before mounting the root device, but after the raid has been build:
MD is assembled incrementally using mdadm --incremental.
This is the first piece. RAID is assembled but (should not be) not started yet.
Full log would be more useful. You can also boot kernel with debug=1 which is expected to make initrd more verbose. You will see which script in which order is executed.
md should be started after iscsi (or add the second mirror after discovering?).
That's what I expect based on code review. Please provide full log.
I just found this in the logfiles on previous shutdown: 2014-03-25T17:00:24.434338+01:00 epsilon systemd[1]: Reloading. 2014-03-25T17:00:52.976544+01:00 epsilon systemd[1]: message repeated 3 times: [ Reloading.] 2014-03-25T17:01:17.913218+01:00 epsilon systemd[1]: Stopping Session 1 of user root. 2014-03-25T17:01:17.913652+01:00 epsilon systemd[1]: Stopped Session 1 of user root. 2014-03-25T17:01:17.913987+01:00 epsilon systemd[1]: Stopping Sound Card. 2014-03-25T17:01:17.914339+01:00 epsilon systemd[1]: Stopped target Sound Card. 2014-03-25T17:01:17.914690+01:00 epsilon systemd[1]: Stopping System Time Synchronized. 2014-03-25T17:01:17.915019+01:00 epsilon systemd[1]: Stopped target System Time Synchronized. 2014-03-25T17:01:17.915347+01:00 epsilon systemd[1]: Stopping LVM2 metadata daemon... 2014-03-25T17:01:17.917743+01:00 epsilon systemd[1]: Stopping Stop Read-Ahead Data Collection 10s After Completed Startup. 2014-03-25T17:01:17.918273+01:00 epsilon systemd[1]: Stopped Stop Read-Ahead Data Collection 10s After Completed Startup. 2014-03-25T17:01:17.921247+01:00 epsilon systemd[1]: Stopping User Manager for 0... 2014-03-25T17:01:17.923273+01:00 epsilon systemd[1]: Stopping ifup managed network interface enp18s0... 2014-03-25T16:45:06.000797+01:00 epsilon systemd[2838]: Time has been changed 2014-03-25T17:01:17.952079+01:00 epsilon systemd[2838]: Stopping Default. 2014-03-25T17:01:17.952501+01:00 epsilon systemd[2838]: Stopped target Default. 2014-03-25T17:01:17.952872+01:00 epsilon systemd[2838]: Starting Shutdown. 2014-03-25T17:01:17.953250+01:00 epsilon systemd[2838]: Reached target Shutdown. 2014-03-25T17:01:17.953637+01:00 epsilon systemd[2838]: Starting Exit the Session... 2014-03-25T17:01:17.970692+01:00 epsilon systemd[1]: Stopping Login and scanning of iSCSI devices... 2014-03-25T17:01:17.972398+01:00 epsilon systemd[1]: Stopping Multi-User System. 2014-03-25T17:01:17.973909+01:00 epsilon systemd[1]: Stopped target Multi-User System. 2014-03-25T17:01:17.974425+01:00 epsilon systemd[1]: Stopping LSB: Network time protocol daemon (ntpd)... 2014-03-25T17:01:17.977503+01:00 epsilon systemd[1]: Stopping D-Bus System Message Bus... 2014-03-25T17:01:17.982791+01:00 epsilon systemd[1]: Stopping Command Scheduler... 2014-03-25T17:01:17.987358+01:00 epsilon systemd[1]: Stopping OpenSSH Daemon... 2014-03-25T17:01:17.991524+01:00 epsilon sshd[2721]: Received signal 15; terminating. 2014-03-25T17:01:17.992139+01:00 epsilon systemd[1]: Stopping /etc/init.d/after.local Compatibility... 2014-03-25T17:01:17.996519+01:00 epsilon systemd[1]: Stopped /etc/init.d/after.local Compatibility. 2014-03-25T17:01:17.998890+01:00 epsilon systemd[1]: Stopping Login Service... 2014-03-25T17:01:18.000910+01:00 epsilon systemd[1]: Stopping Login Prompts. 2014-03-25T17:01:18.003666+01:00 epsilon systemd[1]: Stopped target Login Prompts. 2014-03-25T17:01:18.004410+01:00 epsilon systemd[1]: Stopping Getty on tty1... 2014-03-25T17:01:18.005189+01:00 epsilon kernel: [ 4240.008315] md: md0 still in use. 2014-03-25T17:01:18.005196+01:00 epsilon kernel: [ 4240.008762] md/raid1:md0: Disk failure on sdb1, disabling device. 2014-03-25T17:01:18.005198+01:00 epsilon kernel: [ 4240.008762] md/raid1:md0: Operation continuing on 1 devices. maybe this causes the device not to be added to the array. so how do I get the system shut down properly?