linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: btrfs and systemd
Date: Mon, 29 Aug 2016 01:28:30 +0000 (UTC)	[thread overview]
Message-ID: <pan$887ef$35b40aeb$b83a6f75$374bc3a8@cox.net> (raw)
In-Reply-To: 47ee55de-a77b-185a-1a01-b8b39899b188@profihost.ag

Stefan Priebe - Profihost AG posted on Sun, 28 Aug 2016 22:15:21 +0200 as
excerpted:

> Hi,
> 
> i'm trying to get my 60TB btrfs volume to mount with systemd at boot.
> But this always fails with: "mounting timed out. Stopping." after 90s.
> 
> I can't find any fstab setting for systemd to higher this timeout.
> There's just  the x-systemd.device-timeout but this controls how long to
> wait for the device and not for the mount command.
> 
> Is there any solution for big btrfs volumes and systemd?

Yes.

The key here is to realize that systemd creates mount units dynamically 
based on the fstab file, placing them in /run/systemd/generator/ (take a 
look =:^), and then uses them to process mounts.  So the normal method 
for reconfiguring/overriding systemd units applies.  See the systemd.unit 
manpage, example section, example 2 (as of systemd 230), for override 
details, but in general you choose whether you want to override the 
entire default unit (probably not, as you'd replace the generated file 
and override the fstab options) or just specific options (likely what you 
want), and place your override file in the appropriate subdir of 
/etc/systemd/ accordingly.


Now that you know where to put the file with the override, take a look at 
the systemd.mount manpage, options section.  Based on that (IOW, I've not 
actually tried this), the setting you need to change is TimeoutSec.


You can also consider changing the global timeout setting by setting 
DefaultTimeoutStart in /etc/systemd/system.conf, tho that's going to 
affect other units as well.  But it may be easier, if your other units 
start up fine without getting anywhere close to the timeout, and thus 
never need to use the timeout setting.  Of course if they break, you'll 
then be dealing with the longer timeouts, but you may find it easier to 
simply set that default and deal with the long timeouts on anything else 
when and if some other unit does actually break and start following the 
longer default timeouts.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


  reply	other threads:[~2016-08-29  1:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-28 20:15 btrfs and systemd Stefan Priebe - Profihost AG
2016-08-29  1:28 ` Duncan [this message]
2016-08-29  1:48 ` Qu Wenruo
2016-08-29  6:28   ` Stefan Priebe - Profihost AG
2016-08-29 11:18     ` Imran Geriskovan
2016-08-29 11:33       ` Paul Jones
2016-08-29 12:42         ` Imran Geriskovan
2016-08-29 11:40       ` Austin S. Hemmelgarn
2016-08-29 11:33     ` Timofey Titovets
2016-08-30  8:20       ` Stefan Priebe - Profihost AG

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='pan$887ef$35b40aeb$b83a6f75$374bc3a8@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --cc=linux-btrfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).