linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Scan not being performed properly on boot
@ 2014-08-04  3:02 Peter Roberts
  2014-08-04  3:31 ` Russell Coker
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Roberts @ 2014-08-04  3:02 UTC (permalink / raw)
  To: linux-btrfs

Hi

I've just recently started testing btrfs on my server but after just 24 
hours problems have started. I get booted to a busybox prompt user 
ubuntu 14.04. I have a multi device FS setup and I can't say for sure if 
it managed to boot initially or not but it worked fine in regular usage.

I cannot mount my root with anything other than an explicit /dev/sdx 
reference until I manually run a scan. Then UUID etc all work. I've 
tried setting the /etc/fstab to use that type of reference but it 
doesn't work. In all cases there is some sort of mention of a scan being 
run before mounting fails but it clearly isn't effective.

I would be really appreciative of ant pointers to try and get this going 
again

Thanks

Peter

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

* Re: Scan not being performed properly on boot
  2014-08-04  3:02 Scan not being performed properly on boot Peter Roberts
@ 2014-08-04  3:31 ` Russell Coker
  2014-08-04  4:00   ` George Mitchell
                     ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Russell Coker @ 2014-08-04  3:31 UTC (permalink / raw)
  To: Peter Roberts; +Cc: linux-btrfs

On Mon, 4 Aug 2014 04:02:53 Peter Roberts wrote:
> I've just recently started testing btrfs on my server but after just 24 
> hours problems have started. I get booted to a busybox prompt user 
> ubuntu 14.04. I have a multi device FS setup and I can't say for sure if 
> it managed to boot initially or not but it worked fine in regular usage.

What is GRUB (or your boot loader) giving as parameters to the kernel?

What error messages appear on screen?  Sometimes it's helpful to photograph 
the screen and put the picture on a web server to help people diagnose the 
problem.

> I cannot mount my root with anything other than an explicit /dev/sdx 
> reference until I manually run a scan. Then UUID etc all work. I've 

That sounds like a problem with the Ubuntu initrd, probably filing an Ubuntu 
bug report would be the best thing to do.  Is BTRFS supported in that version 
of Ubuntu?

But just changing your boot configuration to use /dev/sdx is probably the best 
option.

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/


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

* Re: Scan not being performed properly on boot
  2014-08-04  3:31 ` Russell Coker
@ 2014-08-04  4:00   ` George Mitchell
  2014-08-04  4:14     ` Russell Coker
  2014-08-04  5:23     ` Duncan
  2014-08-04  9:36   ` Chris Samuel
  2014-08-04 15:00   ` Peter Roberts
  2 siblings, 2 replies; 10+ messages in thread
From: George Mitchell @ 2014-08-04  4:00 UTC (permalink / raw)
  To: Btrfs BTRFS

On 08/03/2014 08:31 PM, Russell Coker wrote:
> On Mon, 4 Aug 2014 04:02:53 Peter Roberts wrote:
>> I've just recently started testing btrfs on my server but after just 24
>> hours problems have started. I get booted to a busybox prompt user
>> ubuntu 14.04. I have a multi device FS setup and I can't say for sure if
>> it managed to boot initially or not but it worked fine in regular usage.
> What is GRUB (or your boot loader) giving as parameters to the kernel?
>
> What error messages appear on screen?  Sometimes it's helpful to photograph
> the screen and put the picture on a web server to help people diagnose the
> problem.
>
>> I cannot mount my root with anything other than an explicit /dev/sdx
>> reference until I manually run a scan. Then UUID etc all work. I've
> That sounds like a problem with the Ubuntu initrd, probably filing an Ubuntu
> bug report would be the best thing to do.  Is BTRFS supported in that version
> of Ubuntu?
>
> But just changing your boot configuration to use /dev/sdx is probably the best
> option.
>
Assuming you are booting with grub2, you will need to use /dev/sdx in 
the grub2 configuration file.  This is known issue with grub2. Example 
from my script:

--------------------------------------------------------------------------------------
echo    'Loading Linux desktop ...'
linux   /vmlinuz-desktop root=/dev/sda7 ro splash quiet
echo    'Loading initial ramdisk ...'
initrd  /initrd-desktop.img

---------------------------------------------------------------------------------------

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

* Re: Scan not being performed properly on boot
  2014-08-04  4:00   ` George Mitchell
@ 2014-08-04  4:14     ` Russell Coker
  2014-08-04  4:22       ` George Mitchell
  2014-08-04  4:34       ` George Mitchell
  2014-08-04  5:23     ` Duncan
  1 sibling, 2 replies; 10+ messages in thread
From: Russell Coker @ 2014-08-04  4:14 UTC (permalink / raw)
  To: george; +Cc: Btrfs BTRFS

On Sun, 3 Aug 2014 21:00:19 George Mitchell wrote:
> > But just changing your boot configuration to use /dev/sdx is probably the
> > best option.
> 
> Assuming you are booting with grub2, you will need to use /dev/sdx in 
> the grub2 configuration file.  This is known issue with grub2. Example 
> from my script:

That's not a GRUB issue it's an initrd issue.  GRUB just passes text to the 
kernel.  "cat /proc/cmdline" will show you what GRUB sent to the kernel, the 
programs in the initrd read /proc/cmdline and then do what they think is 
appropriate.

> ----------------------------------------------------------------------------
> ---------- echo    'Loading Linux desktop ...'
> linux   /vmlinuz-desktop root=/dev/sda7 ro splash quiet
> echo    'Loading initial ramdisk ...'
> initrd  /initrd-desktop.img

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/


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

* Re: Scan not being performed properly on boot
  2014-08-04  4:14     ` Russell Coker
@ 2014-08-04  4:22       ` George Mitchell
  2014-08-04  4:34       ` George Mitchell
  1 sibling, 0 replies; 10+ messages in thread
From: George Mitchell @ 2014-08-04  4:22 UTC (permalink / raw)
  Cc: Btrfs BTRFS

On 08/03/2014 09:14 PM, Russell Coker wrote:
> On Sun, 3 Aug 2014 21:00:19 George Mitchell wrote:
>>> But just changing your boot configuration to use /dev/sdx is probably the
>>> best option.
>> Assuming you are booting with grub2, you will need to use /dev/sdx in
>> the grub2 configuration file.  This is known issue with grub2. Example
>> from my script:
> That's not a GRUB issue it's an initrd issue.  GRUB just passes text to the
> kernel.  "cat /proc/cmdline" will show you what GRUB sent to the kernel, the
> programs in the initrd read /proc/cmdline and then do what they think is
> appropriate.
>
>> ----------------------------------------------------------------------------
>> ---------- echo    'Loading Linux desktop ...'
>> linux   /vmlinuz-desktop root=/dev/sda7 ro splash quiet
>> echo    'Loading initial ramdisk ...'
>> initrd  /initrd-desktop.img
Russell, it fixed the problem for me, that's all I know.  That's why I 
am suggesting it.

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

* Re: Scan not being performed properly on boot
  2014-08-04  4:14     ` Russell Coker
  2014-08-04  4:22       ` George Mitchell
@ 2014-08-04  4:34       ` George Mitchell
  2014-08-04  5:01         ` Russell Coker
  1 sibling, 1 reply; 10+ messages in thread
From: George Mitchell @ 2014-08-04  4:34 UTC (permalink / raw)
  Cc: Btrfs BTRFS

On 08/03/2014 09:14 PM, Russell Coker wrote:
> On Sun, 3 Aug 2014 21:00:19 George Mitchell wrote:
>>> But just changing your boot configuration to use /dev/sdx is probably the
>>> best option.
>> Assuming you are booting with grub2, you will need to use /dev/sdx in
>> the grub2 configuration file.  This is known issue with grub2. Example
>> from my script:
> That's not a GRUB issue it's an initrd issue.  GRUB just passes text to the
> kernel.  "cat /proc/cmdline" will show you what GRUB sent to the kernel, the
> programs in the initrd read /proc/cmdline and then do what they think is
> appropriate.
>
>> ----------------------------------------------------------------------------
>> ---------- echo    'Loading Linux desktop ...'
>> linux   /vmlinuz-desktop root=/dev/sda7 ro splash quiet
>> echo    'Loading initial ramdisk ...'
>> initrd  /initrd-desktop.img
I see what you are saying.  Its a hack.  But I suspect that most of the 
distros are not yet accommodating btrfs with their standard mkinitrd 
process.  At this point modifying grub2 config does solve the problem.  
If you know a reasonably easy way to fix initrd so that it can interpret 
UUID and LABEL, I would certainly be all ears.

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

* Re: Scan not being performed properly on boot
  2014-08-04  4:34       ` George Mitchell
@ 2014-08-04  5:01         ` Russell Coker
  0 siblings, 0 replies; 10+ messages in thread
From: Russell Coker @ 2014-08-04  5:01 UTC (permalink / raw)
  To: george; +Cc: Btrfs BTRFS

On Sun, 3 Aug 2014 21:34:29 George Mitchell wrote:
> I see what you are saying.  Its a hack.  But I suspect that most of the 
> distros are not yet accommodating btrfs with their standard mkinitrd 
> process.  At this point modifying grub2 config does solve the problem.  
> If you know a reasonably easy way to fix initrd so that it can interpret 
> UUID and LABEL, I would certainly be all ears.

Debian/Wheezy works with BTRFS when using UUID= to specify the root 
filesystem.  Wheezy was released in May 2013, Ubuntu 14.04 was released in 
April 2014 and as Ubuntu is based on Debian it should have at least the same 
features as an older version of Debian.

I think that most Distributions are supporting BTRFS.  Debian/Wheezy has 
support for BTRFS (although I recommend that you don't use it unless you plan 
to take a kernel from Testing), most Debian derivatives will support it, 
Fedora supports it.

It's probably better to make a list of distributions that DON'T support BTRFS, 
it'll be a shorter list.

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/


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

* Re: Scan not being performed properly on boot
  2014-08-04  4:00   ` George Mitchell
  2014-08-04  4:14     ` Russell Coker
@ 2014-08-04  5:23     ` Duncan
  1 sibling, 0 replies; 10+ messages in thread
From: Duncan @ 2014-08-04  5:23 UTC (permalink / raw)
  To: linux-btrfs

George Mitchell posted on Sun, 03 Aug 2014 21:00:19 -0700 as excerpted:

>>> I cannot mount my root with anything other than an explicit /dev/sdx
>>> reference until I manually run a scan. Then UUID etc all work. I've
>> That sounds like a problem with the Ubuntu initrd, probably filing an
>> Ubuntu bug report would be the best thing to do.  Is BTRFS supported in
>> that version of Ubuntu?
>>
>> But just changing your boot configuration to use /dev/sdx is probably
>> the best option.
>>
> Assuming you are booting with grub2, you will need to use /dev/sdx in
> the grub2 configuration file.  This is known issue with grub2. Example
> from my script:
> 
> ------------------------------------------------------------------------
> echo    'Loading Linux desktop ...'
> linux   /vmlinuz-desktop root=/dev/sda7 ro splash quiet
> echo    'Loading initial ramdisk ...'
> initrd  /initrd-desktop.img
> 
> ------------------------------------------------------------------------

??

Known issue with ubuntu's grub2, perhaps?  Or perhaps with separate 
initrds as opposed to kernel-appended initramfss?  Or maybe it's with 
loadable kernel modules as opposed to a custom-built monolithic kernel?  
Or maybe it's an issue with mbr style grub2 but not gpt with a dedicated 
BIOS boot partition, or perhaps with grub2 in EFI mode instead of BIOS 
mode?

Because it works just fine here, grub2, root=LABEL= style root= line 
pointed at a multi-device btrfs rootfs, BIOS mode gpt partitions with a 
dedicated BIOS partition for grub2 to use, custom built monolithic kernel 
with all necessary modules builtin and an appended initramfs, not a 
separately loaded initrd.

As rootfs /is/ a multi-device btrfs I /do/ have to have an initramfs, 
because apparently the kernel's command-line parser doesn't properly 
handle the btrs device= mount option in rootflags=device= parameters, and 
without a userspace btrfs device scan, the btrfs device= mount option 
must be passed for multi-device filesystems or btrfs will refuse to mount 
the device without degraded.  But with an appropriate initramfs, it most 
certainly does work here.

FWIW, my initramfs is dracut-based, btrfs and udev dracut modules loaded 
of course, with or without the systemd dracut module also loaded (I 
recently converted to systemd and was running the non-systemd dracut 
before that.

And root=LABEL= works just fine.

In fact, I have grub2 variables setup with the labels for several 
different rootfs choices, working multi-device btrfs rootfs, primary 
backup multi-device btrfs rootfs, and secondary backup reiserfs rootfs.  
I then have a grub2 menu setup that lets me choose between the three, 
substituting in the appropriate grub2 variable based root=LABEL= kernel 
commandline option as necessary.  With the previously mentioned exception 
of having to use the initramfs in the first place in ordered to work 
around the kernel's rootflags=device= parsing issue instead of being able 
to direct-boot the rootfs without an initramfs at all, it all works 
exactly as expected.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


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

* Re: Scan not being performed properly on boot
  2014-08-04  3:31 ` Russell Coker
  2014-08-04  4:00   ` George Mitchell
@ 2014-08-04  9:36   ` Chris Samuel
  2014-08-04 15:00   ` Peter Roberts
  2 siblings, 0 replies; 10+ messages in thread
From: Chris Samuel @ 2014-08-04  9:36 UTC (permalink / raw)
  To: linux-btrfs

On Mon, 4 Aug 2014 01:31:42 PM Russell Coker wrote:

> Is BTRFS supported in that version of Ubuntu?

Out of the box a fresh 14.04 install onto btrfs worked fine for me on two 
different sets of hardware.  13.10 the same on a third piece of hardware.

cheers,
Chris
-- 
 Chris Samuel  :  http://www.csamuel.org/  :  Melbourne, VIC



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

* Re: Scan not being performed properly on boot
  2014-08-04  3:31 ` Russell Coker
  2014-08-04  4:00   ` George Mitchell
  2014-08-04  9:36   ` Chris Samuel
@ 2014-08-04 15:00   ` Peter Roberts
  2 siblings, 0 replies; 10+ messages in thread
From: Peter Roberts @ 2014-08-04 15:00 UTC (permalink / raw)
  To: russell; +Cc: linux-btrfs

On 04/08/2014 04:31, Russell Coker wrote:
> What is GRUB (or your boot loader) giving as parameters to the kernel? 
> What error messages appear on screen? Sometimes it's helpful to 
> photograph the screen and put the picture on a web server to help 
> people diagnose the problem. 
Here a screenshot http://imgur.com/8pQgG8g

Making changes to /etc/fstab didn't seem to work and nor did manually 
adding device=/dev/sda1,device... in the GRUB config itself. What has 
fixed the problem though seems pretty horrible it to specify 
root=/dev/sda1 instead of UUID=....

> That sounds like a problem with the Ubuntu initrd, probably filing an 
> Ubuntu bug report would be the best thing to do. Is BTRFS supported in 
> that version of Ubuntu? But just changing your boot configuration to 
> use /dev/sdx is probably the best option. 
I'll file a bug report but I'm not sure whether this is a GRUB or an 
initrd / initramfs problem. Getting a persistent fix required a bodge in 
/etc/grub.d/10-linux

As for support, I don't think it is considered stable in 14.04 but I 
haven't had to do anything special to use it and used to official 
installer to get where I am (converting the single disk FS to a RAID1 
after).

In any case, thanks for the help :)

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

end of thread, other threads:[~2014-08-04 15:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-04  3:02 Scan not being performed properly on boot Peter Roberts
2014-08-04  3:31 ` Russell Coker
2014-08-04  4:00   ` George Mitchell
2014-08-04  4:14     ` Russell Coker
2014-08-04  4:22       ` George Mitchell
2014-08-04  4:34       ` George Mitchell
2014-08-04  5:01         ` Russell Coker
2014-08-04  5:23     ` Duncan
2014-08-04  9:36   ` Chris Samuel
2014-08-04 15:00   ` Peter Roberts

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).