From: Ulli Horlacher <framstag@rus.uni-stuttgart.de>
To: linux-btrfs@vger.kernel.org
Subject: Re: how to extend a btrfs disk image?
Date: Sat, 19 Dec 2020 23:59:45 +0100 [thread overview]
Message-ID: <20201219225945.GA3591@tik.uni-stuttgart.de> (raw)
In-Reply-To: <20201217191207.17243c40@natsu>
On Thu 2020-12-17 (19:12), Roman Mamedov wrote:
> > root@fextest:/nfs/rusnas/fex# touch disk2.btrfs
> > root@fextest:/nfs/rusnas/fex# truncate -s 16TB disk2.btrfs
> > root@fextest:/nfs/rusnas/fex# btrfs device add /nfs/rusnas/fex/disk2.btrfs /mnt/tmp
> > ERROR: /nfs/rusnas/fex/disk2.btrfs is not a block device
>
> Since file is not a block device, here you have to do the same manually. See
> documentation for 'losetup'.
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!
mount -v spool_1.btrfs /mnt/spool
This works, but is there a more elegant way?
Using /etc/fstab seems not to be possible?
--
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:<20201217191207.17243c40@natsu>
next prev parent reply other threads:[~2020-12-19 23:00 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 [this message]
2020-12-20 9:22 ` Roman Mamedov
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=20201219225945.GA3591@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