Re: [RFT PATCH] Delay netroot mounting by 1 second

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2009-06-23 at 09:31 +0200, Seewer Philippe wrote:
> David Dillow wrote:
> [snip]
> > To check any of these, you'll need a separate utility. bash
> > has /dev/tcp/IP/port redirection, but I doubt dash supports that. And
> > even then you'll have some klunky trickery in the shell script to add a
> > timeout to it. Nor will you be able to work with anything over UDP.
> > 
> > I think that checking an IP is reachable is sufficient to verify that
> > traffic is flowing -- and we have choices there. We can use the server
> > IP if it is local, and the gateway IP if not. If we're concerned about
> > firewalls blocking ICMP, we could use 'arping' to send ARP requests. If
> > there's a way to kick off an arp request with 'ip' or something in /proc
> > or /sys, that'd avoid additional bloat, but I'm not aware of one.
> 
> Ha! You're brilliant. I completely forgot about ARP.
> 
> Including arping isn't such a bad idea. First of all, I tried using
> arping to solve the problem some years ago but busybox' arping didn't
> have the options required, iputils' arping does. Second, we should
> include it anyway since doing DAD in dhcp-script isn't such a bad idea.
> 
> Now, I'd use the gateway for detection if possible. But if it isn't 
> available, how to guess the server? That logic currently resides in
> the root-handlers/-parsers and I'd prefer not to have the root-handler
> do the checking.

I've been thinking about this a bit, and I'd like to split the duties up
a bit, as I'd like to know the server IPs needed for other reasons. My
proposed split is that legacy handling -- ie nfsroot=blah to
netroot=nfs:blah conversion -- is done as it is now, and have the root
handler do syntax validation and stop, spit out the server IP(s), and do
the mount, depending on options handed to it (--validate, --servers, and
no options, respectively).

The sourced scripts could just call into their handler to do the final
validation, and netroot would get rid of its loop as it can call the
handler directly since it has the protocol field.

The only issue is handling the legacy NFS root-path options, everything
else is expected to have nfs:/nfs4:/nbd:/iscsi: or what not. I don't
think it would be the end of the world if the that handling lived in
netroot itself, as it will be the only root-path legacy handler we have.
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux