I wanted to confirm that btrfs will continue to work on raid1 when one of devices will be gone. dd if=/dev/null of=img0 bs=1 seek=2G dd if=/dev/null of=img1 bs=1 seek=2G mkfs.btrfs -d raid1 -m raid1 img0 img1 losetup /dev/loop1 img0 losetup /dev/loop2 img1 mkdir dir mount -t btrfs /dev/loop1 dir btrfs device scan mount -t btrfs /dev/loop1 dir echo abc > dir/a.txt umount dir losetup -d /dev/loop2 btrfs device scan mount -t btrfs /dev/loop1 dir mount: wrong fs type, bad option, bad superblock on /dev/loop1, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so am I missing some nuance? -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 07/11/2011 08:22 PM, krzf83@gmail.com wrote:> I wanted to confirm that btrfs will continue to work on raid1 when one > of devices will be gone. > > dd if=/dev/null of=img0 bs=1 seek=2G > dd if=/dev/null of=img1 bs=1 seek=2G > mkfs.btrfs -d raid1 -m raid1 img0 img1 > losetup /dev/loop1 img0 > losetup /dev/loop2 img1 > mkdir dir > mount -t btrfs /dev/loop1 dir > btrfs device scan > mount -t btrfs /dev/loop1 dir > echo abc> dir/a.txt > umount dir > losetup -d /dev/loop2 > btrfs device scan > mount -t btrfs /dev/loop1 dir > mount: wrong fs type, bad option, bad superblock on /dev/loop1, > missing codepage or other error > In some cases useful info is found in syslog - try > dmesg | tail or so > > am I missing some nuance?Yeah you need to mount -o degraded. Thanks, Josef -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks. I don''t see reason why this needs another mount switch. This would fail to start whole system in / parition was btrfs raid1, with no reason to do so. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html