From: Ulli Horlacher <framstag@rus.uni-stuttgart.de>
To: linux-btrfs@vger.kernel.org
Subject: Re: how to extend a btrfs disk image?
Date: Sun, 20 Dec 2020 11:35:32 +0100 [thread overview]
Message-ID: <20201220103532.GA31610@tik.uni-stuttgart.de> (raw)
In-Reply-To: <20201220142252.01cf4140@natsu>
On Sun 2020-12-20 (14:22), Roman Mamedov wrote:
> > 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.
Indeed better!
> > 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.
Ok, now I use:
ldev=$(losetup -l | awk '/spool_1.btrfs/{print $1;exit}')
mount -v $ldev /mnt/spool
This is all necessary because our Netapp storage system has an annoying
16 TB file size limit. This was ok for the last century, but for today it
is an anachronism.
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart E-Mail: horlacher@tik.uni-stuttgart.de
Allmandring 30a Tel: ++49-711-68565868
70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/
REF:<20201220142252.01cf4140@natsu>
prev parent reply other threads:[~2020-12-20 10:36 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
2020-12-20 10:35 ` Ulli Horlacher [this message]
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=20201220103532.GA31610@tik.uni-stuttgart.de \
--to=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