From: Ulli Horlacher <framstag@rus.uni-stuttgart.de>
To: linux-btrfs@vger.kernel.org
Subject: how to extend a btrfs disk image?
Date: Thu, 17 Dec 2020 13:30:08 +0100 [thread overview]
Message-ID: <20201217123008.GA22831@tik.uni-stuttgart.de> (raw)
How can I add a second disk-image to an existing btrfs filesystem?
I have to use btrfs via a disk image on a nfs Netapp storage system with a
16 TB file size limit. One cannot use bigger files.
I have set up sucessfully:
root@fextest:/nfs/rusnas/fex# touch disk1.btrfs
root@fextest:/nfs/rusnas/fex# truncate -s 16TB disk1.btrfs
root@fextest:/nfs/rusnas/fex# ll disk1.btrfs
-rw-r--r-- root root 16,000,000,000,000 2020-12-17 13:18:59 disk1.btrfs
root@fextest:/nfs/rusnas/fex# mkfs.btrfs disk1.btrfs
btrfs-progs v5.4.1
See http://btrfs.wiki.kernel.org for more information.
Label: (null)
UUID: 4f7befb1-c892-497f-a40c-c6ac1a18368d
Node size: 16384
Sector size: 4096
Filesystem size: 14.55TiB
Block group profiles:
Data: single 8.00MiB
Metadata: DUP 1.00GiB
System: DUP 8.00MiB
SSD detected: no
Incompat features: extref, skinny-metadata
Checksum: crc32c
Number of devices: 1
Devices:
ID SIZE PATH
1 14.55TiB disk1.btrfs
root@fextest:/nfs/rusnas/fex# mount disk1.btrfs /mnt/tmp
root@fextest:/nfs/rusnas/fex# df -TH /mnt/tmp
Filesystem Type Size Used Avail Use% Mounted on
/dev/loop2 btrfs 16T 3.7M 16T 1% /mnt/tmp
No problem so far, everything is easy ;-)
Now I want to extend this filesystem, but this approach fails:
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
root@fextest:/nfs/rusnas/fex# sysinfo
System: Linux fextest 5.4.0-58-generic x86_64
Distribution: Ubuntu 20.04.1 LTS
Hardware: VMware, Inc. VMware Virtual Platform None (VMware)
CPU: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz, 4 x 2394 MHz
RAM: 4095 MB
--
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:<20201217123008.GA22831@tik.uni-stuttgart.de>
next reply other threads:[~2020-12-17 12:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 12:30 Ulli Horlacher [this message]
2020-12-17 14:12 ` how to extend a btrfs disk image? Roman Mamedov
2020-12-19 22:59 ` Ulli Horlacher
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=20201217123008.GA22831@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