Bug#510367: [Pkg-sysvinit-devel] Bug#510367: initscripts: checkfs.sh runs before /etc/modules processed
On Sat, 2018-12-29 at 18:34 +, Dmitry Bogatov wrote: > control: tags -1 +moreinfo > > [2009-01-05 13:34] Arthur Marsh > > Petter Reinholdtsen wrote, on 2009-01-01 21:14: > > > [Arthur Marsh] > > > > After manually observing a reboot, it appears that although module > > > > eata is successfully loaded before filesystems are checked, the > > > > device files for the SCSI disk are created asynchronously, in my > > > > case after the filesystem check script has attempted to check the > > > > filesystems on the SCSI disk. > > > > > > Right. So you have been hit by the introduction of asynchronous > > > behaviour of the Linux kernel. I have no good idea how to solve it. > > > We need to make the early boot system asynchronous too to avoid such > > > problems. It also affect USB disks and other busses with slow > > > discovery process. :( > > > > > > Happy hacking, > > > > Would this behaviour be changed by changing from > > > > CONFIG_SCSI_SCAN_ASYNC=y > > > > to: > > > > CONFIG_SCSI_SCAN_ASYNC=n > > > > in the kernel configuration? > > Dear maintainers of linux, could you please take a look at this issue? > Is there any smart way to wait for this asyncronous behaviour? It's not generally possible to wait for asynchronous scanning to complete, because for USB there is no time limit for devices to appear. You should either poll for the required devices to appear at regular intervals, or use a udev hook to react to their appearance. In either case there should be a configurable timeout or some way to break out and attempt a manual recovery from the missing device. Ben. -- Ben Hutchings Life is what happens to you while you're busy making other plans. - John Lennon signature.asc Description: This is a digitally signed message part
Bug#510367: [Pkg-sysvinit-devel] Bug#510367: initscripts: checkfs.sh runs before /etc/modules processed
control: tags -1 +moreinfo [2009-01-05 13:34] Arthur Marsh > Petter Reinholdtsen wrote, on 2009-01-01 21:14: > > [Arthur Marsh] > >> After manually observing a reboot, it appears that although module > >> eata is successfully loaded before filesystems are checked, the > >> device files for the SCSI disk are created asynchronously, in my > >> case after the filesystem check script has attempted to check the > >> filesystems on the SCSI disk. > > > > Right. So you have been hit by the introduction of asynchronous > > behaviour of the Linux kernel. I have no good idea how to solve it. > > We need to make the early boot system asynchronous too to avoid such > > problems. It also affect USB disks and other busses with slow > > discovery process. :( > > > > Happy hacking, > > Would this behaviour be changed by changing from > > CONFIG_SCSI_SCAN_ASYNC=y > > to: > > CONFIG_SCSI_SCAN_ASYNC=n > > in the kernel configuration? Dear maintainers of linux, could you please take a look at this issue? Is there any smart way to wait for this asyncronous behaviour?
Bug#510367: [Pkg-sysvinit-devel] Bug#510367: initscripts: checkfs.sh runs before /etc/modules processed
Petter Reinholdtsen wrote, on 2009-01-01 21:14: [Arthur Marsh] After manually observing a reboot, it appears that although module eata is successfully loaded before filesystems are checked, the device files for the SCSI disk are created asynchronously, in my case after the filesystem check script has attempted to check the filesystems on the SCSI disk. Right. So you have been hit by the introduction of asynchronous behaviour of the Linux kernel. I have no good idea how to solve it. We need to make the early boot system asynchronous too to avoid such problems. It also affect USB disks and other busses with slow discovery process. :( Happy hacking, Would this behaviour be changed by changing from CONFIG_SCSI_SCAN_ASYNC=y to: CONFIG_SCSI_SCAN_ASYNC=n in the kernel configuration? I will probably leave it set y and just have a custom delay script as I would like to be able to use stock debian kernels even though I usually custom compile them. Arthur. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#510367: [Pkg-sysvinit-devel] Bug#510367: initscripts: checkfs.sh runs before /etc/modules processed
[Arthur Marsh] When the system boots, checkfs.sh runs before module eata loads, and so fsck is not performed on the filesystems on the SCSI disk. /etc/modules is then processed and the SCSI disk is accessible. Which script is processing /etc/modules on your machine? Can you provide the output from 'ls /etc/rcS.d/'? On my machine, it is done by module-init-tools in the module-init-tools package, and it is started before checkfs.sh. Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#510367: [Pkg-sysvinit-devel] Bug#510367: initscripts: checkfs.sh runs before /etc/modules processed
Petter Reinholdtsen wrote, on 2009-01-01 18:42: [Arthur Marsh] When the system boots, checkfs.sh runs before module eata loads, and so fsck is not performed on the filesystems on the SCSI disk. /etc/modules is then processed and the SCSI disk is accessible. Which script is processing /etc/modules on your machine? Can you provide the output from 'ls /etc/rcS.d/'? On my machine, it is done by module-init-tools in the module-init-tools package, and it is started before checkfs.sh. Happy hacking, victoria:/etc# ls rcS.d /tmp/tmp.tmp victoria:/etc# cat /tmp/tmp.tmp README S01glibc.sh S02hostname.sh S02mountkernfs.sh S03udev S04mountdevsubfs.sh S05bootlogd S05initrd-tools.sh S05keymap.sh S06keyboard-setup S07hdparm S08hwclockfirst.sh S10checkroot.sh S11hwclock.sh S12mtab.sh S18ifupdown-clean S20module-init-tools S20modutils S25libdevmapper1.02 S25mdadm-raid S28checkfs-loop S30checkfs.sh S30etc-setserial S30procps S34fuse S35mountall.sh S36mountall-bootclean.sh S36udev-mtab S37mountoverflowtmp S38pppd-dns S39dns-clean S39ifupdown S40networking S43portmap S45mountnfs.sh S46mountnfs-bootclean.sh S46setserial S47lm-sensors S48console-screen.sh S49console-setup S50alsa-utils S51soundfont S55bootmisc.sh S55urandom S70nviboot S70x11-common S71xserver-xorg S75sudo S80microcode.ctl S99stop-bootlogd-single but see also the logs boot and messages.0 that the check of all file systems takes place *before* module eata loads and the SCSI disk is detected: # cat boot Thu Jan 1 07:25:15 2009: . Thu Jan 1 07:25:15 2009: Setting preliminary keymap...done. Thu Jan 1 07:25:15 2009: Setting parameters of disc: /dev/hda. Thu Jan 1 07:25:15 2009: /dev/hdb ^[[31mfailed!^[[39;49m Thu Jan 1 07:25:15 2009: (none). Thu Jan 1 07:25:15 2009: Setting the system clock. Thu Jan 1 07:25:15 2009: System Clock set to: Thu Jan 1 07:25:15 CST 2009. Thu Jan 1 07:25:15 2009: Activating swap:swapon on /dev/hda6 Thu Jan 1 07:25:15 2009: . Thu Jan 1 07:25:15 2009: Will now check root file system:fsck 1.41.3 (12-Oct-2008) Thu Jan 1 07:25:15 2009: [/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a -C0 /dev/hda5 Thu Jan 1 07:25:15 2009: /dev/hda5: clean, 441086/1528064 files, 2657469/3068407 blocks (check in 5 mounts) Thu Jan 1 07:25:15 2009: . Thu Jan 1 07:25:15 2009: Setting the system clock. Thu Jan 1 07:25:17 2009: System Clock set to: Thu Jan 1 07:25:17 CST 2009. Thu Jan 1 07:25:17 2009: Cleaning up ifupdown Thu Jan 1 07:25:17 2009: Loading kernel module eata. Thu Jan 1 07:25:18 2009: Loading device-mapper support. Thu Jan 1 07:25:19 2009: Assembling MD array md0...^[[31mfailed (no devices found).^[[39;49m Thu Jan 1 07:25:19 2009: Generating udev events for MD arrays...done. Thu Jan 1 07:25:19 2009: Will now check all file systems. Thu Jan 1 07:25:19 2009: fsck 1.41.3 (12-Oct-2008) Thu Jan 1 07:25:19 2009: Checking all file systems. Thu Jan 1 07:25:19 2009: [/sbin/fsck.ext3 (1) -- /mirror3] fsck.ext3 -a -C0 /dev/hda3 Thu Jan 1 07:25:19 2009: /dev/hda3: recovering journal Thu Jan 1 07:25:20 2009: /dev/hda3: clean, 1148/412896 files, 1666743/1666743 blocks Thu Jan 1 07:25:20 2009: [/sbin/fsck.vfat (1) -- /victoriac] fsck.vfat -a /dev/hda1 Thu Jan 1 07:25:20 2009: [/sbin/fsck.vfat (2) -- /scsic] fsck.vfat -a /dev/sda1 Thu Jan 1 07:25:20 2009: open /dev/sda1:No such file or directory Thu Jan 1 07:25:20 2009: dosfsck 3.0.1, 23 Nov 2008, FAT32, LFN Thu Jan 1 07:25:20 2009: [/sbin/fsck.vfat (2) -- /scsid] fsck.vfat -a /dev/sda5 Thu Jan 1 07:25:20 2009: open /dev/sda5:No such file or directory Thu Jan 1 07:25:20 2009: dosfsck 3.0.1, 23 Nov 2008, FAT32, LFN Thu Jan 1 07:25:49 2009: dosfsck 3.0.1, 23 Nov 2008, FAT32, LFN Thu Jan 1 07:25:49 2009: /dev/hda1: 59315 files, 3388425/3577496 clusters Thu Jan 1 07:25:49 2009: [/sbin/fsck.vfat (1) -- /victoriad] fsck.vfat -a /dev/hda7 Thu Jan 1 07:25:53 2009: dosfsck 3.0.1, 23 Nov 2008, FAT32, LFN Thu Jan 1 07:25:53 2009: /dev/hda7: 5061 files, 1171537/1226561 clusters Thu Jan 1 07:25:53 2009: fsck died with exit status 1 Thu Jan 1 07:25:53 2009: Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable.. Thu Jan 1 07:25:53 2009: Setting kernel variables (/etc/sysctl.conf)...done. Thu Jan 1 07:25:53 2009: Starting filesystem in userspace: fuse. Thu Jan 1 07:25:54 2009: Will now mount local filesystems:. Thu Jan 1 07:25:55 2009: Will now activate swapfile swap:done. Thu Jan 1 07:25:55 2009: Cleaning /tmp...done. Thu Jan 1 07:25:55 2009: Cleaning /var/run...done. Thu Jan 1 07:25:56 2009: Cleaning /var/lock...done. Thu Jan 1 07:25:56 2009: Checking minimum space in /tmp...done. Thu Jan 1 07:25:56 2009: Running 0dns-down to make sure resolv.conf is ok...done. and messages: messages.0:Jan 1 07:26:34 victoria kernel: [ 60.854840] sd 0:0:6:0: [sda] 8466688 512-byte hardware sectors: (4.33 GB/4.03 GiB) messages.0:Jan 1 07:26:34 victoria kernel: [ 60.893917] sd 0:0:6:0: [sda] Write Protect is off
Bug#510367: [Pkg-sysvinit-devel] Bug#510367: initscripts: checkfs.sh runs before /etc/modules processed
[Arthur Marsh] After manually observing a reboot, it appears that although module eata is successfully loaded before filesystems are checked, the device files for the SCSI disk are created asynchronously, in my case after the filesystem check script has attempted to check the filesystems on the SCSI disk. Right. So you have been hit by the introduction of asynchronous behaviour of the Linux kernel. I have no good idea how to solve it. We need to make the early boot system asynchronous too to avoid such problems. It also affect USB disks and other busses with slow discovery process. :( Happy hacking, -- Petter Reinholdtsen -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#510367: [Pkg-sysvinit-devel] Bug#510367: initscripts: checkfs.sh runs before /etc/modules processed
Petter Reinholdtsen wrote, on 01/01/09 21:14: [Arthur Marsh] After manually observing a reboot, it appears that although module eata is successfully loaded before filesystems are checked, the device files for the SCSI disk are created asynchronously, in my case after the filesystem check script has attempted to check the filesystems on the SCSI disk. Right. So you have been hit by the introduction of asynchronous behaviour of the Linux kernel. I have no good idea how to solve it. We need to make the early boot system asynchronous too to avoid such problems. It also affect USB disks and other busses with slow discovery process. :( Happy hacking, I manually added the following script to execute as /etc/rcS.d/S22sleep-for-scsi #!/bin/sh if (lsmod|grep eata); then echo waiting 5 seconds for module eata to query SCSI bus sleep 5 fi The 5 second wait between module-loading and filesystem checking was sufficient time for the SCSI bus to be queried and device files /dev/sda? to be created. As my system is not a candidate for sub-5-second boot anyway, I don't mind the wait if it means that the filesystems are checked before they are mounted (-:. Arthur. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org