public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: Drew DeVault <sir@cmpwn.com>, linux-kernel@vger.kernel.org
Subject: Re: Failover root devices
Date: Fri, 18 Sep 2015 10:34:13 -0400	[thread overview]
Message-ID: <55FC20E5.1080801@gmail.com> (raw)
In-Reply-To: <55FAF8C0.30205@cmpwn.com>

[-- Attachment #1: Type: text/plain, Size: 3177 bytes --]

On 2015-09-17 13:30, Drew DeVault wrote:
>> That said, using the term failover for this is probably not the best
>> idea, many people associate it almost exclusively with online failover
>> and high-availability setups, and trying to do something like that with
>> the root file system is just asking for trouble (I'll be happy to go
>> into specifics as to why if someone asks).
>
> Do you have a suggestion for another name for this feature? Maybe we can
> just call it "multiple root devices". The issue comes with the
> associated command line options, like "rootfailoverdelay". Perhaps it
> could be called "rootcycledelay". "rootdelay" is the obvious one, but
> it's taken for another feature.
Possibly 'multirootdelay'?

However, is there any case you can think of for wanting the values to be 
different between rootdelay and the per-device scan delay other than 
having the per-device scan delay be 0 and rootdelay be >0?

The way I'd probably write it would be:
1. Wait rootdelay seconds
2. Check for 1st device
3. If first device is not there, check for 2nd
4. If second device is not there, check next one
5. Repeat 4 until all devices are checked.
6. If a device wasn't found, check if we were told to loop until one is 
found, and if so, start at 1 again.
And then add an option to tell it to wait 'rootdelay' seconds between 
checking each device.
>
>>> 1. Wait rootdelay seconds
>>> 2. Check 1st device, not present
>>> 3. Recheck 1st device until rootfailoverdelay seconds has passed
>>> 4. Move on to 2nd device, present -> boot
>>>
>>> Or:
>>>
>>> 1. Wait rootdelay seconds
>>> 2. Check 1st device, not present
>>> 3. Recheck 1st device until rootfailoverdelay seconds has passed
>>> 4. Move on to 2nd device, not present
>>> 5. Recheck 2st device until rootfailoverdelay seconds has passed
>>> 6. GOTO 2
>>>
>>> And so on.
>> As for this, I'd say default to the first method, and then provide an
>> option to switch to the second (both have practical uses).
>
> Sorry to cause confusion - these are actually the same method, but
> handling different scenarios. The first is dealing with the first device
> being nonexistent, and the second device existing. The second is dealing
> with both being nonexistent, and cycling between them until one of them
> shows up. After further thought, though, I think the best solution is a
> bit different: a new command line option called "rootmultiwait" or
> similar, which is a maximum amount of time to wait for the user's first
> choice of root device to become available, then testing all devices
> until that time runs out or the first choice becomes available.
I think there's value in being able to tell it to go through each one 
exactly once, and halt like it does now if it can't find the filesystem 
on any of them.  That should probably be the default behavior in fact, 
as it's more similar to what's done now.

Secondarily, I've been thinking more about this, and I think it would be 
wonderful to have such functionality in the nfsroot code as well (and 
for that matter, also in any other built-in networked root filesystem 
support).


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]

  reply	other threads:[~2015-09-18 14:34 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17  0:16 Failover root devices Drew DeVault
2015-09-17 16:02 ` Austin S Hemmelgarn
2015-09-17 17:30   ` Drew DeVault
2015-09-18 14:34     ` Austin S Hemmelgarn [this message]
2015-09-18 14:43       ` Drew DeVault
  -- strict thread matches above, loose matches on Subject: below --
2015-09-17 11:40 Ortwin Glück
2015-09-17 11:49 ` Drew DeVault
2015-09-17 17:47   ` Richard Weinberger
2015-09-17 17:49     ` Drew DeVault
2015-09-17 17:52       ` Richard Weinberger
2015-09-17 18:05         ` Drew DeVault
2015-09-17 18:17           ` Richard Weinberger
2015-09-17 18:18             ` Drew DeVault
2015-09-17 18:19               ` Richard Weinberger
2015-09-17 18:21                 ` Drew DeVault
2015-09-17 18:23                   ` Richard Weinberger
2015-09-17 18:28                     ` Drew DeVault
2015-09-18 14:59                       ` Ortwin Glück
2015-09-18 15:00                         ` Drew DeVault
2015-09-18 15:04                           ` Ortwin Glück
2015-09-18 15:36                             ` Austin S Hemmelgarn
2015-09-17 18:27             ` Harald Hoyer
2015-09-17 18:29               ` Drew DeVault
2015-09-17 18:33                 ` Richard Weinberger
2015-09-17 18:35                   ` Drew DeVault
2015-09-17 18:42                     ` Richard Weinberger
2015-09-17 18:29               ` Richard Weinberger
2015-09-17 18:37     ` Austin S Hemmelgarn
2015-09-17 18:40       ` Richard Weinberger
2015-09-18 14:40         ` Austin S Hemmelgarn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55FC20E5.1080801@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sir@cmpwn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox