On Sun, Jan 8, 2017 at 7:45 PM, Joe <j...@jretrading.com> wrote: >> What happened before: >> I had issue with a Debian server SATA bus [1]. I noticed because >> apt-get upgrade hung, because initramfs updater calls "sync" which >> hang because of [1]. All operations accessing a certain (backup) disk >> blocked. Shutdown over network. It was reported server power LED still >> up, so probably shutdown hang, too. Server was powered off and disk >> pulled. > > The disc you removed: did it have an entry in /etc/fstab? Does this > server use systemd? If yes to both, comment the /etc/fstab entry or > give it an extra option 'noauto'.
In short: yes, this was the problem. I didn't found this first because there was no easily visible error message. Thanks you for your help! Do you - or anyone - know how to mount a disk at boot without failing when it is not there? Like normal "classic" behavior? Of course I can write a simple script if I somehow manage systemd to execute it. In the old days there was some rc.local, surely I find something like this. I just wonder what to put into fstab that script detects as to be mounted without systemd aborting when it is missing (without patching systemd of course) Longer story (aka "what actually happened"): The disk I removed had no entry. But I put it into external USB dock, replacing the disk that there was before (not assuming an USB disk could be required at all). The removed USB disk had an entry in fstab, but with "noauto". Yeah, but unfortunately in wrong format (I think it was "<dev> <mnt> noauto noauto 0 0", but of course noauto is not a valid file type). And yes, this was the problem. systemd seems to ignore the check flag and always checks (if auto or unless noauto). That's why "fsck -a" worked. But systemd does not run fsck -a but (I guess) implements an own parser for fstab, then does not even call fsck (which gives a clear error message when it is called with an non-existing device), so there was no error message from fsck either (actually fsck would even pass on the example, which does not matter, since it was not even started). Then I was in "maintenance mode" with 0 failed units, because "fs mount unit" does not count in here. Also on Console all lines were prefixed with "OK". > Systemd assumes that any local drive > listed in /etc/fstab without 'noauto' is essential for booting, and will > drop you to maintenance mode if the drive cannot be found. Yes, maintenance mode without network. The network card was available, but not IP configured (an error message about missing firmware was also present in journal and I assumed it would be the real problem, but this message seems to be normal). So my problem was that systemd makes a wrong assumption, does not report the error well, does not start fsck which would report and then go to maintenance mode without without remote access possibility and finally does not show this error as failed unit or on console. Only in the journal there was an error together with several others. These others are "normal" for systemd. This worked well before systemd when some init script just started "fsck -a && mount -a" :-) >> Then server did not come up. Now I went to its location with monitor >> and keyboard. I saw a screen full of boot messages, each line prefixed >> with green "[OK]". On bottom, I got asked for root password. I though >> Debian does not use root passwords? I'm old fashioned so fortunately I >> set one, so I could log in. > > Yes, a plain Debian installation will ask you to set a root password. Ahh good, so this is safe. > No, there is no special server variant, Debian Stable would normally be > used, with whatever additional software the user wishes. Alright, so seems I chose correctly. Steffen