All of lore.kernel.org
 help / color / mirror / Atom feed
* how to extend a btrfs disk image?
@ 2020-12-17 12:30 Ulli Horlacher
  2020-12-17 14:12 ` Roman Mamedov
  0 siblings, 1 reply; 5+ messages in thread
From: Ulli Horlacher @ 2020-12-17 12:30 UTC (permalink / raw)
  To: linux-btrfs


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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-20 10:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.