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: [email protected] Allmandring 30a Tel: ++49-711-68565868 70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/ REF:<[email protected]>
