You are not logged in.
Today I tried to install Archlinux on btrfs RAID1,but the system will not boot after installation.
I installed btrfs-progs and added btrfs hook to mkinitcpio.conf, and then run the mkinitcpio -p linux.
After rebooting, the system stops at the fallback command line mode.
Problem is in btrfs device scan command,and the error code is:
failed to open /dev/btrfs-control skipping device registration:no such file or directory.
after that,the btrfs RAID1 can't mount and fallback to fallback command line mode.
but I try to ls /dev,the btrfs-control file exits.
and now I can run btrfs device scan and mount the btrfs filesystem,and exit the fallback command line mode.
The system can login normally.
The question is, Why run btrfs hook, /dev/btrfs-control file don't exits,but after fallback to fallback command line mode,this file exits.
At first, I add a delay in the init before "btrfs device scan" command, but this does not solve the problem.
But when I add the command btrfs into hook:
mknod / dev / btrfs-control c 10 234
The system can be started normally.
Last edited by yafeng (2014-11-15 16:26:52)
Offline
Just to clarify, this isn't a case of something that once worked and now does not work?
Offline
You don't need the btrfs initcpio hook unless you don't have udev in your initramfs. Can you boot without it?
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Just to clarify, this isn't a case of something that once worked and now does not work?
Yes, I'm sure, when I tested a few days ago still work properly.
Offline
You don't need the btrfs initcpio hook unless you don't have udev in your initramfs. Can you boot without it?
If only a single disk btrfs file system, btrfs hook is not needed,
But if it is a btrfs RAID system, you must run 'btrfs device scan' before mount
Otherwise it is impossible to mount
and the btrfs hook only run this command:
#!/usr/bin/ash
run_hook() {
btrfs device scan
}
Offline
WorMzy wrote:You don't need the btrfs initcpio hook unless you don't have udev in your initramfs. Can you boot without it?
But if it is a btrfs RAID system, you must run 'btrfs device scan' before mount
Otherwise it is impossible to mount
This is incorrect, udev handles btrfs device detection for you.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
The new discovery, add "modprobe btrfs" command before "btrfs device scan"
The system can start normaly too, guess possible reason is that udev hook not loaded btrfs filesystem drive.
Offline
The new discovery, add "modprobe btrfs" command before "btrfs device scan"
The system can start normaly too, guess possible reason is that udev hook not loaded btrfs filesystem drive.
So is it fixed now?
Offline
yafeng wrote:The new discovery, add "modprobe btrfs" command before "btrfs device scan"
The system can start normaly too, guess possible reason is that udev hook not loaded btrfs filesystem drive.So is it fixed now?
No, the problem has not been solved yet.
I modified the code so that you can boot my pc
But if you install archlinux in a multi-device btrfs volume
System still does not boot, until you also modify initscripts,
I hope Archlinux developers can fix this problem.
Offline
But if you install archlinux in a multi-device btrfs volume
System still does not boot, until you also modify initscripts
What "initscripts" are you referring to? Are you not booting with systemd?
My btrfs raid1 has worked fine with no btrfs hook since 2012.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
yafeng wrote:But if you install archlinux in a multi-device btrfs volume
System still does not boot, until you also modify initscriptsWhat "initscripts" are you referring to? Are you not booting with systemd?
My btrfs raid1 has worked fine with no btrfs hook since 2012.
I do not know if you have not updated to the latest, about three days ago, installed to RAID1 can boot, but since yesterday, you can not boot from the RAID1, or you can upgrade at your system or test in vmware.
Three days ago, I discussed the btrfs group RAID1 / RAID10 problem with a friend, at that time the installation is successful, the problem was not solved the problem of btrfs auto degraded, yesterday I tried to write a script to solve this problem, but the unexpected discovery after installation has been unable to boot
systemd does not exist in the initrd,Except you include the systemd' hook in mkinitcpio.conf
In the initrd, there are some init scripts,this contains detect and mount the file system.
Offline
I do not know if you have not updated to the latest
Latest what? I usually run on mainline kernel (currently 3.18.0-rc4), but I've just checked the Arch kernel (3.17.2-1) and that works fine here too. I usually use the latest integration branch of btrfs-progs too (currently integration-20141113), but this shouldn't make any difference on the boot process, as the only btrfs-related files in my initramfs are:
$ lsinitcpio /boot/initramfs-linux-mainline.img|grep btrfs
./usr/lib/udev/rules.d/64-btrfs.rules
./usr/lib/modules/3.18.0-rc4-mainline/kernel/btrfs.ko
$ lsinitcpio /boot/initramfs-linux.img|grep btrfs
./usr/lib/udev/rules.d/64-btrfs.rules
./usr/lib/modules/3.17.2-1-ARCH/kernel/btrfs.ko
at that time the installation is successful, the problem was not solved the problem of btrfs auto degraded
So is the problem that you have a degraded btrfs RAID?
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Offline
Please change your images to links.
Hmm, I can reproduce this if I remove btrfs from my modules array in my mkinitcpio.conf. It seems that the btrfs module isn't being loaded before udev is triggered, so the array isn't being populated.
Try this: remove the btrfs hook, add btrfs to your modules array in mkinitcpio.conf, then rebuild your initramfs and see if you can boot.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Try this: remove the btrfs hook, add btrfs to your modules array in mkinitcpio.conf, then rebuild your initramfs and see if you can boot.
The system can boot successfully
It seems that the btrfs module isn't being loaded before udev is triggered, so the array isn't being populated.
I think so
But just a few days ago, the system is not this problem
Offline
There has just been an update to the systemd family of packages (which includes udev), so perhaps something has changed regarding the timing of udev events. In a failed boot, I just need to run "# modprobe btrfs && udevadm trigger", and then I can mound my filesystem as normal.
If it worked before, then I think you should open a bug against the systemd and mkinitcpio packages.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
So is the problem that you have a degraded btrfs RAID?
This is another problem.
If your RAID1 damaged (HDD damaged or removed, replace the hard drive), the btrfs arry will also appear unable to mount, and the system can not boot.
According to wiki said,we must mount it in degraded mode
mount /dev/sda /new_root -o ${rootflag},degraded
Of course, you can modify the grub command line,and add degraded parameters.
However, this is somewhat inconvenient, especially remote to operate a computer (NAS or server).
So I hope it can automatically degraded,When a problem occurs Array.
mkinitcpio-btrfs from AUR packages contain this feature
But on my system this package is not working properly (perhapsI do not know how to use)
So I wrote a hook for initcpio, only automatic degraded, this script:
Offline
I can confirm this bug, i have a RAID1 setup with the btrfs hook enabled, and get the same error as yafeng, the "open /dev/btrfs-control" error in his screenshot. Luckily i was running the update when i was at the machine, usually i am remote.
I restored to a snapshot i took just before the update, and will have a search to see if a bug report was created.
Offline
Try this: remove the btrfs hook, add btrfs to your modules array in mkinitcpio.conf, then rebuild your initramfs and see if you can boot.
I also ran into the problem on a multi-device btrfs RAID1 system. The above fixed it.
Shouldn't an announcement be made about this or something? I bet quite a few people run multi-device btrfs systems on Arch.
Offline
I believe my problem is the exact same thing: https://bbs.archlinux.org/viewtopic.php?id=189987 I will try the suggestion of adding btrfs to mkinitcpio.conf and rebuilding initramfs.
Is this going to be fixed in the future? I have had this Arch system running for three months, and I never had to do this, before.
Tim
Offline
I believe my problem is the exact same thing: https://bbs.archlinux.org/viewtopic.php?id=189987 I will try the suggestion of adding btrfs to mkinitcpio.conf and rebuilding initramfs.
Is this going to be fixed in the future? I have had this Arch system running for three months, and I never had to do this, before.
Tim
I had a quick look, but I couldn't find a bug report. Yafeng, did you open one? If so, can you post a link please.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
me too. a day worth of work finally brought me here. please make an official announcement. thank you...
Offline
+1 for official announcement. Took me a whole night without sleep
Last edited by frederik (2014-11-22 12:40:11)
Offline