On Oct 16 10:14:14, [email protected] wrote: > [moving to tech@] > > On Tuesday, 20 September 2016 08:03:32 CEST Stefan Fritsch wrote: > > On Tue, 20 Sep 2016, Darren Tucker wrote: > > > On Tue, Sep 20, 2016 at 1:43 AM, Jan Stary <[email protected]> wrote: > > > > This is current/i386 on an ALIX.1E (demsg below). > > > > I have an USB disk connected for /backup. > > > > > > > > Upon every reboot, the filesystem on that disk is dirty: > > > > WARNING: R/W mount of /backup denied. Filesystem is not clean - run > > > > fsck
Since then, I have used three different disks and USB enclosures, each working flawlessly anywhere else. The problem is still there, so it's most probably not the disk. > > > I saw something similar on an APU where the root disk was on > > > (USB-attached) sdcard: > > > http://marc.info/?l=openbsd-misc&m=144237305322074&w=2 > > > > > > It seems to be a race. There used to be a 4sec pause in the kernel > > > that was removed: > > > > > > """ > > > Remove 4 second delay on reboot/shutdown that was added 8 years > > > ago to "workaround MP timeout/splhigh/scsi race at reboot time". > > > """ > > I think before we re-add some arbitrary delays, we should check if we are > > actually sending an explicit cache flush command to the disk controllers. > > I have some code somewhere that does this for umount and mount -ur. I will > > look for it and send it to tech@, but probably not today. For now, I just put 'umount /backup' in my rc.shutdown and that makes it umount cleanly. > I found a few cases, where we should send a cache flush but don't. > Unfortunately, none of these cases explain the problem seen by Jan and Darren. > > The cases I have found are: > > * When a R/W mount is updated to R/O. I will send patches for this in a > separate mail. Not this case. > * When a R/W mount is unmounted but there is still another partition from the > same disk mounted. Not this case. > For the usb disk issue, some more debugging is necessary. How can I help debug this? Jan Controller /dev/usb0: addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), AMD(0x1022), rev 1.00 port 1 powered port 2 powered port 3 addr 2: high speed, self powered, config 1, Mass Storage Device(0x2506), Prolific Technology Inc.(0x067b), rev 1.00, iSerialNumber 000000000000 port 4 powered Controller /dev/usb1: addr 1: full speed, self powered, config 1, OHCI root hub(0x0000), AMD(0x1022), rev 1.00 port 1 powered port 2 powered port 3 powered port 4 powered
