linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Tony Prokott <tprokott@zoho.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Conversion to btrfs raid1 profile on added ext device renders some systems unable to boot into converted rootfs
Date: Thu, 18 Oct 2018 15:08:08 +0800	[thread overview]
Message-ID: <ca04659e-0103-6698-6971-2a34f7cd929d@gmx.com> (raw)
In-Reply-To: <16685d14644.eefe20a081666.8834845236508091976@zoho.com>


[-- Attachment #1.1: Type: text/plain, Size: 3338 bytes --]



On 2018/10/18 下午2:16, Tony Prokott wrote:
>  ---- On Wed, 17 Oct 2018 17:57:25 -0700 Qu Wenruo <quwenruo.btrfs@gmx.com> wrote ---- 
> ...
>  > > But after chrooting to update-initramfs and cataloging resulting image content, usb_storage and uas were present under /lib/modules/xxx already, and failing systems still just busybox without a real rootfs rather than launch systemd; even tried kernel option "rootwait" which had no effect on access to ext storage; udev still seems not to have noticed the ext drives once busybox had control. 
>  >  
>  > Still looks like a initramfs problem other than btrfs problem. 
>  >  
>  > In the busybox environment, have you tried listing /dev to see if that 
>  > external device is found? 
> 
> agreed that initramfs smells bad, but it hadn't been a problem until btrfs mounts (external-raid) had to rely on the usb channel;

By default, btrfs must see *all* devices to mount RAID1/10/5/6/0.
Unless you're using "degraded" mount option.

You could argue it's a bad decision, but still you have the choice.

> in busybox, ext drives/partitions are all missing from /dev; can't tell why so, ahci and usb modules are loaded afaict
> 
>  > Since you have a busybox environment, have you checked if "btrfs" command lives in the initramfs? 
> 
> yes btrfs command works from busybox
> 
>  > IIRC at least you need the following things/abilities to boot: 
>  >  
>  > 1) usb and sata drivers 
>  >    Means you could see both devices in the busybox environment under /dev 
>  >  
>  > 2) "Btrfs" command 
>  >    Mostly for scan 
>  > Then you could try the following commands under busybox environment: 
>  > # btrfs device scan 
>  > # mount <device> <some temporary mount point> 
> 
> "btrfs dev scan" runs but doesn't indicate recognizing any; since raid1 conversion, ext drives are required for any btrfs mounts to be seen whole.
> When manually trying to mount in busybox, it gives a similar error about missing external device by UUID_SUB

Then it's still something wrong about the initramfs.

From your description, it looks pretty like the lack of external disk
driver is the root cause.

Could you try "btrfs fi show" to see which devices is missing?
I strongly suspect it's the external device, if so, then it is the
mkinitramfs driver causing the problem.

> 
>  > If it works, it may mean you're missing "btrfs device scan" during boot 
>  > so kernel can't see all RAID1 disks for btrfs and failed to boot. 
>  >  
>  > Please refer to your distribution initramfs creation tool to see how to 
>  > add that scan. (Some distro has special hook for btrfs to handle such case). 
> 
> may have to tweak the /etc/initramfs-tools/initramfs.conf or modules list; MODULES=dep setting might act better than MODULES=most
> will look into this further to see about contrasting block device modules between cindy and the others

Sorry I can't help much in this case, as I'm not debian user.

But in Archlinux, it's pretty easy by just adding a 'block' hook.
And in that case, Archlinux will install all kernel modules under
'drivers/usb/storage' directory.

For details, you could refer to this file:
https://git.archlinux.org/mkinitcpio.git/tree/install/block

Thanks,
Qu

> 
> appreciate the timely response-
> TP
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-10-18  7:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17 16:38 Conversion to btrfs raid1 profile on added ext device renders some systems unable to boot into converted rootfs Tony Prokott
2018-10-18  0:57 ` Qu Wenruo
2018-10-18  6:16   ` Tony Prokott
2018-10-18  7:08     ` Qu Wenruo [this message]
2018-10-23 19:21       ` Tony Prokott
2018-10-23 23:55         ` Qu Wenruo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca04659e-0103-6698-6971-2a34f7cd929d@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=tprokott@zoho.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).