linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RAID1 root filesystem - same device shows up twice in 'btrfs fi show'
@ 2016-01-21 19:50 Scott Talbert
  2016-01-22  4:41 ` Anand Jain
  0 siblings, 1 reply; 3+ messages in thread
From: Scott Talbert @ 2016-01-21 19:50 UTC (permalink / raw)
  To: linux-btrfs

Hi,

I'm using:

Kernel 4.2.6
btrfs-progs v4.3
Debian Wheezy

I have a RAID1 root filesystem with two devices.  When the system 
initially boots up, "btrfs fi show" will show the same device twice:

Label: none  uuid: 49f7413a-99ad-41b0-8783-06c9406e2280
 	Total devices 2 FS bytes used 1.19GiB
 	devid    1 size 7.60GiB used 3.03GiB path /dev/sdf2
 	devid    2 size 7.60GiB used 3.01GiB path /dev/sdf2

The filesystem seems to work fine (as best as I can tell) in this state. 
If I then run another "btrfs device scan", it will correct itself:

Label: none  uuid: 49f7413a-99ad-41b0-8783-06c9406e2280
         Total devices 2 FS bytes used 1.19GiB
         devid    1 size 7.60GiB used 3.03GiB path /dev/sde2
         devid    2 size 7.60GiB used 3.01GiB path /dev/sdf2

Any idea what might be going on here?  On Debian it appears that the 
initial "btrfs device scan" is being done by an initramfs local-premount 
script where it does:

modprobe btrfs
/bin/btrfs device scan 2>/dev/null

Does there perhaps need to be some delay between inserting the kernel 
module and running a scan?

Thanks,
Scott

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

* Re: RAID1 root filesystem - same device shows up twice in 'btrfs fi show'
  2016-01-21 19:50 RAID1 root filesystem - same device shows up twice in 'btrfs fi show' Scott Talbert
@ 2016-01-22  4:41 ` Anand Jain
  2016-01-22 14:53   ` Scott Talbert
  0 siblings, 1 reply; 3+ messages in thread
From: Anand Jain @ 2016-01-22  4:41 UTC (permalink / raw)
  To: Scott Talbert, linux-btrfs



  Thanks for the report.
  Strange. but interesting. Can you pls help to isolate...

On 01/22/2016 03:50 AM, Scott Talbert wrote:
> Hi,
>
> I'm using:
>
> Kernel 4.2.6
> btrfs-progs v4.3
> Debian Wheezy
>
> I have a RAID1 root filesystem with two devices.  When the system
> initially boots up, "btrfs fi show" will show the same device twice:
>
> Label: none  uuid: 49f7413a-99ad-41b0-8783-06c9406e2280
>      Total devices 2 FS bytes used 1.19GiB
>      devid    1 size 7.60GiB used 3.03GiB path /dev/sdf2
>      devid    2 size 7.60GiB used 3.01GiB path /dev/sdf2
>
> The filesystem seems to work fine (as best as I can tell) in this state.
> If I then run another "btrfs device scan", it will correct itself:



> Label: none  uuid: 49f7413a-99ad-41b0-8783-06c9406e2280
>          Total devices 2 FS bytes used 1.19GiB
>          devid    1 size 7.60GiB used 3.03GiB path /dev/sde2
>          devid    2 size 7.60GiB used 3.01GiB path /dev/sdf2
>
> Any idea what might be going on here?  On Debian it appears that the
> initial "btrfs device scan" is being done by an initramfs local-premount
> script where it does:
>
> modprobe btrfs
> /bin/btrfs device scan 2>/dev/null
>
> Does there perhaps need to be some delay between inserting the kernel
> module and running a scan?

May be dev1 is known as sdf initially before bootup and later when
system boots its known as sde.

I believe /boot is on non btrfs FS?

As this is a root device, Can you tell which "one" device is used for
the mount in fstab ?

Do you see the following log in the bootup logs / dmesg ?
------
printk(KERN_INFO "BTRFS: device fsid %pU devid %llu transid %llu %s %s\n",
disk_super->fsid, devid, transid, path,
ret == 2 ? "(overwritten)":"");
-------

Can you provide..
  blkid output



Thanks, Anand


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

* Re: RAID1 root filesystem - same device shows up twice in 'btrfs fi show'
  2016-01-22  4:41 ` Anand Jain
@ 2016-01-22 14:53   ` Scott Talbert
  0 siblings, 0 replies; 3+ messages in thread
From: Scott Talbert @ 2016-01-22 14:53 UTC (permalink / raw)
  To: Anand Jain; +Cc: linux-btrfs

On Fri, 22 Jan 2016, Anand Jain wrote:

> Thanks for the report.
> Strange. but interesting. Can you pls help to isolate...
>
> On 01/22/2016 03:50 AM, Scott Talbert wrote:
>> Hi,
>> 
>> I'm using:
>> 
>> Kernel 4.2.6
>> btrfs-progs v4.3
>> Debian Wheezy
>> 
>> I have a RAID1 root filesystem with two devices.  When the system
>> initially boots up, "btrfs fi show" will show the same device twice:
>> 
>> Label: none  uuid: 49f7413a-99ad-41b0-8783-06c9406e2280
>>      Total devices 2 FS bytes used 1.19GiB
>>      devid    1 size 7.60GiB used 3.03GiB path /dev/sdf2
>>      devid    2 size 7.60GiB used 3.01GiB path /dev/sdf2
>> 
>> The filesystem seems to work fine (as best as I can tell) in this state.
>> If I then run another "btrfs device scan", it will correct itself:
>
>
>
>> Label: none  uuid: 49f7413a-99ad-41b0-8783-06c9406e2280
>>          Total devices 2 FS bytes used 1.19GiB
>>          devid    1 size 7.60GiB used 3.03GiB path /dev/sde2
>>          devid    2 size 7.60GiB used 3.01GiB path /dev/sdf2
>> 
>> Any idea what might be going on here?  On Debian it appears that the
>> initial "btrfs device scan" is being done by an initramfs local-premount
>> script where it does:
>> 
>> modprobe btrfs
>> /bin/btrfs device scan 2>/dev/null
>> 
>> Does there perhaps need to be some delay between inserting the kernel
>> module and running a scan?
>
> May be dev1 is known as sdf initially before bootup and later when
> system boots its known as sde.
>
> I believe /boot is on non btrfs FS?

/boot is on the btrfs rootfs, ie, /dev/sde2 / /dev/sdf2.  I do have a 
bios_grub partition as partition #1 but not a separate /boot partition.

> As this is a root device, Can you tell which "one" device is used for
> the mount in fstab ?

I am using the UUID to mount in fstab:
UUID=49f7413a-99ad-41b0-8783-06c9406e2280 /               btrfs 
defaults 0       1

> Do you see the following log in the bootup logs / dmesg ?
> ------
> printk(KERN_INFO "BTRFS: device fsid %pU devid %llu transid %llu %s %s\n",
> disk_super->fsid, devid, transid, path,
> ret == 2 ? "(overwritten)":"");
> -------

Interestingly, the kernel logs show both devices...

[   10.225915] BTRFS: device fsid 49f7413a-99ad-41b0-8783-06c9406e2280 
devid 2 transid 1033 /dev/sdf2
[   10.226297] BTRFS: device fsid 49f7413a-99ad-41b0-8783-06c9406e2280 
devid 1 transid 1033 /dev/sde2

> Can you provide..
> blkid output

/dev/sde2: UUID="49f7413a-99ad-41b0-8783-06c9406e2280" 
UUID_SUB="692ba0c4-05b9-4681-86c4-b4af9028a533" TYPE="btrfs"
/dev/sdf2: UUID="49f7413a-99ad-41b0-8783-06c9406e2280" 
UUID_SUB="63ee640c-0df0-490c-bff6-91d71a246ed6" TYPE="btrfs"

Thanks,
Scott

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

end of thread, other threads:[~2016-01-22 14:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-21 19:50 RAID1 root filesystem - same device shows up twice in 'btrfs fi show' Scott Talbert
2016-01-22  4:41 ` Anand Jain
2016-01-22 14:53   ` Scott Talbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).