From: Roman Mamedov <rm@romanrm.net>
To: Ulli Horlacher <framstag@rus.uni-stuttgart.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: how to extend a btrfs disk image?
Date: Sun, 20 Dec 2020 14:22:52 +0500 [thread overview]
Message-ID: <20201220142252.01cf4140@natsu> (raw)
In-Reply-To: <20201219225945.GA3591@tik.uni-stuttgart.de>
On Sat, 19 Dec 2020 23:59:45 +0100
Ulli Horlacher <framstag@rus.uni-stuttgart.de> wrote:
> Ok, I was able to extend the btrfs filesystem via a loopback devive.
>
> What is the suggested way to do this at boot time?
>
> For now I have in /etc/rc.local:
>
> cd /nfs/rusnas/fex
> for d in spool_[1-9].btrfs; do
> echo -n "$d ==> "
> losetup -fP --show $d
> done
> sync
> sleep 2 # without this sleep the mount will fail!
You could try replacing the sleep with "btrfs device scan", certainly more
elegant (assuming it helps). Maybe even narrow it down to
"btrfs device scan /dev/loop*", or even scan each added device.
> mount -v spool_1.btrfs /mnt/spool
Better mount one of the loop devices, not the file, lest mount will probably
make one more, a dupe of one that your script has already added, and who knows
what side effects this could have.
> This works, but is there a more elegant way?
> Using /etc/fstab seems not to be possible?
There doesn't seem to be "/etc/looptab" or such, that would set these up on
boot. So your approach seems fine to me.
--
With respect,
Roman
next prev parent reply other threads:[~2020-12-20 9:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 12:30 how to extend a btrfs disk image? Ulli Horlacher
2020-12-17 14:12 ` Roman Mamedov
2020-12-19 22:59 ` Ulli Horlacher
2020-12-20 9:22 ` Roman Mamedov [this message]
2020-12-20 10:35 ` Ulli Horlacher
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=20201220142252.01cf4140@natsu \
--to=rm@romanrm.net \
--cc=framstag@rus.uni-stuttgart.de \
--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