All of lore.kernel.org
 help / color / mirror / Atom feed
* raid1
@ 2011-07-12  0:22 krzf83@gmail.com 
  2011-07-12  0:38 ` raid1 Josef Bacik
  0 siblings, 1 reply; 3+ messages in thread
From: krzf83@gmail.com  @ 2011-07-12  0:22 UTC (permalink / raw)
  To: linux-btrfs

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?

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

* Re: raid1
  2011-07-12  0:22 raid1 krzf83@gmail.com 
@ 2011-07-12  0:38 ` Josef Bacik
  2011-07-12  0:53   ` raid1 krzf83@gmail.com 
  0 siblings, 1 reply; 3+ messages in thread
From: Josef Bacik @ 2011-07-12  0:38 UTC (permalink / raw)
  To: krzf83@gmail.com; +Cc: linux-btrfs

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

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

* Re: raid1
  2011-07-12  0:38 ` raid1 Josef Bacik
@ 2011-07-12  0:53   ` krzf83@gmail.com 
  0 siblings, 0 replies; 3+ messages in thread
From: krzf83@gmail.com  @ 2011-07-12  0:53 UTC (permalink / raw)
  To: linux-btrfs

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.

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

end of thread, other threads:[~2011-07-12  0:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-12  0:22 raid1 krzf83@gmail.com 
2011-07-12  0:38 ` raid1 Josef Bacik
2011-07-12  0:53   ` raid1 krzf83@gmail.com 

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.