Bug 197356 - mountlate is too fast for some iSCSI / UFS configurations
Summary: mountlate is too fast for some iSCSI / UFS configurations
Status: Closed Not Accepted
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 10.1-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Edward Tomasz Napierala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-05 21:46 UTC by Phillip R. Jaenke
Modified: 2015-03-13 12:50 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phillip R. Jaenke 2015-02-05 21:46:37 UTC
In some scenarios, /etc/rc.d/mountlate is still too fast for late filesystems, specifically observed in an iSCSI configuration. Relevant devices arrive just slightly too late, which results in mountlate aborting and dropping to single user.

/dev/ufs/osrc    /prod/odev/src    ufs     rw,late    0    0
/dev/ufsid/54d3d4231491292f    /opt/scratch    ufs     rw,late 0   0

Both of these entries failed due to mountlate successfully racing against iscsictl. Rough estimate is that it's probably around 0.5s too quick.

No patch as the fix is really, really simple. Adding 'sleep 1' at line 24 (after 'err=0' before 'echo -n') in /etc/rc.d/mountlate fixes this problem with no known side effects.
Comment 1 Edward Tomasz Napierala freebsd_committer freebsd_triage 2015-03-13 12:49:50 UTC
To be honest I don't think adding the sleep is the right solution - it works for your setup, but in some other installation it might need some more time.

I have a better way - use autofs.  It will mount those directories on demand, but more importantly - it will retry if the mount fails, in a way transparent to the application.

I've just committed support for "-noauto" autofs map - with it, all that is needed is to uncomment one line in /etc/auto_master and mark problematic filesystems as "noauto" in /etc/fstab.  It's in CURRENT, https://svnweb.freebsd.org/base?view=revision&revision=279955, expected to be merged to 10-STABLE in one month.