Andi Drebes wrote:
Hi! I recently tried to mount a filesystem in RAID1 mode using loopback devices. I followed the instructions at [1]. Here's exactly what I've done:$ dd if=/dev/zero of=raid1_0.img bs=1M count=500 $ dd if=/dev/zero of=raid1_1.img bs=1M count=500 $ mkfs.btrfs -m raid1 -d raid1 raid1_0.img raid1_1.img $ losetup /dev/loop0 raid1_0.img $ losetup /dev/loop1 raid1_1.img $ mount -t btrfs /dev/loop0 /mnt/btrfs mount: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
The problem is btrfs randomly changes the "current master" superblock of the filesystem. Only 1 of the devices will be mountable. You just have to try the other ones, like: > $ mount -t btrfs /dev/loop0 /mnt/btrfs > mount: wrong fs type, bad option, bad superblock on /dev/loop0, $ mount -t btrfs /dev/loop1 /mnt/btrfs until you find one that works. I've been testing 4 devices and often have to try all 4. Maybe someday we will fix this so ANY raid member can start the mount (but this may need a disk format change). jim -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
