public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* can't mount RAID-1 btrfs after reboot
@ 2009-08-14  9:34 Tomasz Chmielewski
  2009-08-14 10:41 ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Tomasz Chmielewski @ 2009-08-14  9:34 UTC (permalink / raw)
  To: linux-btrfs

I can't mount RAID-1 btrfs after reboot (well, sort of).

Using 2.6.31-rc5 and btrfs-progs 0.19, I created a RAID-1 fileystem 
using these command line options:

# mkfs.btrfs -L btrfs-data -m raid1 -d raid1 /dev/sda4 /dev/sdb4


After which I was able to mount the filesystem with either of the below 
(or both):

# mount /dev/sda4 /mnt/btrfs-sda4

# mount /dev/sdb4 /mnt/btrfs-sdb4


After a reboot, I'm no longer able to mount the filesystem from /dev/sda4:

# mount /dev/sda4 /mnt/btrfs/

Mount command complains and doesn't mount it and says I can find more 
info in dmesg:

Btrfs loaded
device label btrfs-data devid 1 transid 67 /dev/sda4
btrfs: failed to read the system array on sda4
btrfs: open_ctree failed


I'm able to mount the filesystem by using /dev/sdb4:

# mount /dev/sdb4 /mnt/btrfs/

After which I can unmount it, and use /dev/sda4 to mount the filesystem:

# umount /dev/sdb4
# mount /dev/sda4 /mnt/btrfs/


Does it make sense?

It behaved like this also with some earlier kernels.


-- 
Tomasz Chmielewski
http://wpkg.org

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

* Re: can't mount RAID-1 btrfs after reboot
  2009-08-14  9:34 can't mount RAID-1 btrfs after reboot Tomasz Chmielewski
@ 2009-08-14 10:41 ` Jens Axboe
  2009-08-30 23:09   ` Tomasz Chmielewski
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2009-08-14 10:41 UTC (permalink / raw)
  To: Tomasz Chmielewski; +Cc: linux-btrfs

On Fri, Aug 14 2009, Tomasz Chmielewski wrote:
> I can't mount RAID-1 btrfs after reboot (well, sort of).
>
> Using 2.6.31-rc5 and btrfs-progs 0.19, I created a RAID-1 fileystem  
> using these command line options:
>
> # mkfs.btrfs -L btrfs-data -m raid1 -d raid1 /dev/sda4 /dev/sdb4
>
>
> After which I was able to mount the filesystem with either of the below  
> (or both):
>
> # mount /dev/sda4 /mnt/btrfs-sda4
>
> # mount /dev/sdb4 /mnt/btrfs-sdb4
>
>
> After a reboot, I'm no longer able to mount the filesystem from /dev/sda4:
>
> # mount /dev/sda4 /mnt/btrfs/
>
> Mount command complains and doesn't mount it and says I can find more  
> info in dmesg:
>
> Btrfs loaded
> device label btrfs-data devid 1 transid 67 /dev/sda4
> btrfs: failed to read the system array on sda4
> btrfs: open_ctree failed
>
>
> I'm able to mount the filesystem by using /dev/sdb4:
>
> # mount /dev/sdb4 /mnt/btrfs/
>
> After which I can unmount it, and use /dev/sda4 to mount the filesystem:
>
> # umount /dev/sdb4
> # mount /dev/sda4 /mnt/btrfs/

Try btrfsctl -a first.

-- 
Jens Axboe


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

* Re: can't mount RAID-1 btrfs after reboot
  2009-08-14 10:41 ` Jens Axboe
@ 2009-08-30 23:09   ` Tomasz Chmielewski
  2009-08-31  5:21     ` Calvin Walton
  0 siblings, 1 reply; 4+ messages in thread
From: Tomasz Chmielewski @ 2009-08-30 23:09 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-btrfs

Jens Axboe wrote:

>> I'm able to mount the filesystem by using /dev/sdb4:
>>
>> # mount /dev/sdb4 /mnt/btrfs/
>>
>> After which I can unmount it, and use /dev/sda4 to mount the filesystem:
>>
>> # umount /dev/sdb4
>> # mount /dev/sda4 /mnt/btrfs/
> 
> Try btrfsctl -a first.

It seems to do the trick.

I suppose longer term, doing "btrfsctl -a" before mounting a (RAID) 
btrfs filesystem shouldn't be needed, or?


-- 
Tomasz Chmielewski
http://wpkg.org


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

* Re: can't mount RAID-1 btrfs after reboot
  2009-08-30 23:09   ` Tomasz Chmielewski
@ 2009-08-31  5:21     ` Calvin Walton
  0 siblings, 0 replies; 4+ messages in thread
From: Calvin Walton @ 2009-08-31  5:21 UTC (permalink / raw)
  To: Tomasz Chmielewski; +Cc: Jens Axboe, linux-btrfs

On Mon, 2009-08-31 at 01:09 +0200, Tomasz Chmielewski wrote:
> Jens Axboe wrote:
> 
> >> I'm able to mount the filesystem by using /dev/sdb4:
> >>
> >> # mount /dev/sdb4 /mnt/btrfs/
> >>
> >> After which I can unmount it, and use /dev/sda4 to mount the filesystem:
> >>
> >> # umount /dev/sdb4
> >> # mount /dev/sda4 /mnt/btrfs/
> > 
> > Try btrfsctl -a first.
> 
> It seems to do the trick.
> 
> I suppose longer term, doing "btrfsctl -a" before mounting a (RAID) 
> btrfs filesystem shouldn't be needed, or?

Shorter term, writing a udev rule along the lines of

ENV{ID_FS_TYPE}=="btrfs", RUN+="/sbin/btrfsctl -A %N"

(put it in /etc/udev/rules.d/64-btrfs-scan.rules or so) will cause your
btrfs to be scanned when found. Possibly something like this could be
distributed with btrfsprogs?

-- 
Calvin Walton <calvin.walton@gmail.com>


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

end of thread, other threads:[~2009-08-31  5:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-14  9:34 can't mount RAID-1 btrfs after reboot Tomasz Chmielewski
2009-08-14 10:41 ` Jens Axboe
2009-08-30 23:09   ` Tomasz Chmielewski
2009-08-31  5:21     ` Calvin Walton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox