I'm trying to create a btrfs file system on 2 disks but it shows an error:

$ sudo mkfs.btrfs -d single /dev/sda1 /dev/sde1                                                                                                                                              1 ↵
btrfs-progs v5.1 
See http://btrfs.wiki.kernel.org for more information.

ERROR: skipping duplicate device /dev/sde1 in the filesystem
ERROR: not enough free space to allocate chunk

I have no idea what causes this error. It is very strange since creating it on single disks works fine, but not on 2 disks.

The disks are 2TB each so surely have enough space.

The operating system is freshly updated, to 5.1.6-arch1-1-ARCH.

FYI this is under vmware in a Arch Linux guest.

  • What happens when you create the filesystem on one disk, and then add the second disk? – Emmanuel Rosa Jun 4 '19 at 10:32
  • @EmmanuelRosa It stops working after restart if I do that, when I mount it says wrong fs type, bad option. – simonzack Jun 4 '19 at 11:04
  • @EmmanuelRosa found the issue, stupid me. Thanks for the comment though, it was something I tried before as well. Glad I resolved this after struggling for a week on it, for both btrfs & mdadm. – simonzack Jun 4 '19 at 11:23

I found out the issue, I was just plain stupid before. But this still really confuses me as I was sure that when I checked this many days ago it wasn't the case. But anyway the issue is:

Hard disk 0 & Hard disk 4, the physical hard disks I added to my Arch Linux vmware guest, were one and the same!

No wonder it was telling me about superblock errors. It must have tried to write a superblock on the first disk, then write something else on the second disk, but since they were both the same disk it corrupted what it wrote for the first disk!

Everything works now.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.