I've just tried putting usr in a subvol. Installation proceeds normally, no errors, but I'm dropped to a dracut prompt which indicates mount of /usr failed. dmesg follows: [ 14.025215] systemd[1]: Starting dracut initqueue hook... [ 14.077890] Btrfs loaded [ 14.129987] device label fedora_f18v devid 1 transid 31 /dev/sda1 [ 14.313607] device label fedora_f18v devid 1 transid 31 /dev/sda1 [ 14.446523] systemd[1]: Started Show Plymouth Boot Screen. [[1;32m OK [[ 14.533662] btrfs: disk space caching is enabled 0m] Started Show Plymouth Boot Screen. [ 14.534404] systemd[1]: Started Dispatch Password Requests to Console Directory Watch. [ 14.534886] systemd[1]: Starting Forward Password Requests to Plymouth Directory Watch. [ 14.535001] systemd[1]: Started Forward Password Requests to Plymouth Directory Watch. [ 14.535067] systemd[1]: Starting Basic System. [[1;32m OK ] Reached target Basic System.[ 15.053733] systemd[1]: Reached target Basic System. [ 15.094806] device label fedora_f18v devid 1 transid 31 /dev/sda1 [ 15.251736] btrfs: disk space caching is enabled [ 15.430129] systemd[1]: Started dracut initqueue hook. [ 15.574280] systemd[1]: Starting dracut pre-pivot and cleanup hook... [ 15.735181] device label fedora_f18v devid 1 transid 31 /dev/sda1 [ 15.876950] btrfs: 'root' is not a valid subvolume dracut-pre-pivot[228]: Warning: Mounting /usr to /sysroot/usr failed dracut-pre-pivot[228]: Warning: *** Dropping you to a shell; the system will continue dracut-pre-pivot[228]: Warning: *** when you leave the shell. dracut-pre-pivot[228]: Warning: [[1;32m OK ] Started Show Plymouth Boot Screen. [[1;32m OK ] Reached target Basic System. dracut-pre-pivot[228]: Warning: Mounting /usr to /sysroot/usr failed dracut-pre-pivot[228]: Warning: *** Dropping you to a shell; the system will continue dracut-pre-pivot[228]: Warning: *** when you leave the shell. dracut-pre-pivot[228]: Warning: [ 16.314849] systemd[1]: Starting Emergency Shell… After a bit of snooping I found the dracut fstab suspicious: dracut:/# cat /etc/fstab /dev/disk/by-uuid/64383cfe-c31d-4d25-97c4-4e6b7e788b26 /sysroot btrfs subvol=root,ro 0 /dev/disk/by-uuid/64383cfe-c31d-4d25-97c4-4e6b7e788b26 /sysroot/usr btrfs subvol=usr,subvol=root,ro 1 2 Two mount options, mounting two subvols to the same mount point? Seems problematic. But even when I try what I think is correct from a dracut prompt: dracut:/# mount -o subvol=usr /dev/sda1 /sysroot/usr [ 1153.468711] device label fedora_f18v devid 1 transid 31 /dev/sda1 mount: /dev/sda1 is already mounted or /sysroot/usr busy /dev/sda1 is already mounted on /sysroot The only sda device mounted at this time is the root subvol to /sysroot. So the additional question is if dracut maybe has a problem with multiple physical devices being mounted more than once, which is what happens when mounting multiple subvols? This is dracut-024-17.git20121220.fc18. Seems like maybe two bugs? Chris Murphy
> I''ve just tried putting usr in a subvol. Installation proceeds normally, no errors, but I''m dropped to a dracut prompt which indicates mount of /usr failed. dmesg follows: > > > [ 14.025215] systemd[1]: Starting dracut initqueue hook... > [ 14.077890] Btrfs loaded > [ 14.129987] device label fedora_f18v devid 1 transid 31 /dev/sda1 > [ 14.313607] device label fedora_f18v devid 1 transid 31 /dev/sda1 > [ 14.446523] systemd[1]: Started Show Plymouth Boot Screen. > [[1;32m OK [[ 14.533662] btrfs: disk space caching is enabled > 0m] Started Show Plymouth Boot Screen. > [ 14.534404] systemd[1]: Started Dispatch Password Requests to Console Directory Watch. > [ 14.534886] systemd[1]: Starting Forward Password Requests to Plymouth Directory Watch. > [ 14.535001] systemd[1]: Started Forward Password Requests to Plymouth Directory Watch. > [ 14.535067] systemd[1]: Starting Basic System. > [[1;32m OK ] Reached target Basic System.[ 15.053733] systemd[1]: Reached target Basic System. > [ 15.094806] device label fedora_f18v devid 1 transid 31 /dev/sda1 > [ 15.251736] btrfs: disk space caching is enabled > [ 15.430129] systemd[1]: Started dracut initqueue hook. > [ 15.574280] systemd[1]: Starting dracut pre-pivot and cleanup hook... > [ 15.735181] device label fedora_f18v devid 1 transid 31 /dev/sda1 > [ 15.876950] btrfs: ''root'' is not a valid subvolume > dracut-pre-pivot[228]: Warning: Mounting /usr to /sysroot/usr failed > dracut-pre-pivot[228]: Warning: *** Dropping you to a shell; the system will continue > dracut-pre-pivot[228]: Warning: *** when you leave the shell. > dracut-pre-pivot[228]: Warning: > [[1;32m OK ] Started Show Plymouth Boot Screen. > [[1;32m OK ] Reached target Basic System. > dracut-pre-pivot[228]: Warning: Mounting /usr to /sysroot/usr failed > dracut-pre-pivot[228]: Warning: *** Dropping you to a shell; the system will continue > dracut-pre-pivot[228]: Warning: *** when you leave the shell. > dracut-pre-pivot[228]: Warning: > [ 16.314849] systemd[1]: Starting Emergency Shell… > > > After a bit of snooping I found the dracut fstab suspicious: > > > dracut:/# cat /etc/fstab > /dev/disk/by-uuid/64383cfe-c31d-4d25-97c4-4e6b7e788b26 /sysroot btrfs subvol=root,ro 0 > /dev/disk/by-uuid/64383cfe-c31d-4d25-97c4-4e6b7e788b26 /sysroot/usr btrfs subvol=usr,subvol=root,ro 1 2 > > > Two mount options, mounting two subvols to the same mount point? Seems problematic. But even when I try what I think is correct from a dracut prompt: > > > dracut:/# mount -o subvol=usr /dev/sda1 /sysroot/usr > mount: /dev/sda1 is already mounted or /sysroot/usr busy > /dev/sda1 is already mounted on /sysroot > > > The only sda device mounted at this time is the root subvol to /sysroot. So the additional question is if dracut maybe has a problem with multiple physical devices being mounted more than once, which is what happens when mounting multiple subvols? This is dracut-024-17.git20121220.fc18. > > Seems like maybe two bugs?> /dev/disk/by-uuid/64383cfe-c31d-4d25-97c4-4e6b7e788b26 /sysroot/usr btrfs subvol=usr,subvol=root,ro 1 2I''d say that the problem is definitely with this line having two subvolumes listed. Maybe you should boot from a live CD, mount your subvolid=1 and check out what subvolumes you really have in there. And then re-write fstab manually. If you have /sysroot subvolume, you can create /sysroot/usr as a child subvolume and you won''t even need then to specify /sysroot/usr in your fstab because it will be mounted automatically when the parent subvolume gets mounted. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Dec 27, 2012, at 6:13 PM, dima <dolenin@parallels.com> wrote:> > >> /dev/disk/by-uuid/64383cfe-c31d-4d25-97c4-4e6b7e788b26 /sysroot/usr btrfs subvol=usr,subvol=root,ro 1 2 > > I''d say that the problem is definitely with this line having two subvolumes listed. > Maybe you should boot from a live CD, mount your subvolid=1 and check out what subvolumes you really have in there. And then re-write fstab manually.When I mount subvolid=5 there are subvols root, boot, usr, var, home. And the /etc/fstab in root is: # # /etc/fstab # Created by anaconda on Thu Dec 27 15:21:03 2012 # # Accessible filesystems, by reference, are maintained under ''/dev/disk'' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # UUID=64383cfe-c31d-4d25-97c4-4e6b7e788b26 / btrfs subvol=root 1 1 UUID=64383cfe-c31d-4d25-97c4-4e6b7e788b26 /boot btrfs subvol=boot 1 2 UUID=64383cfe-c31d-4d25-97c4-4e6b7e788b26 /home btrfs subvol=home 1 2 UUID=64383cfe-c31d-4d25-97c4-4e6b7e788b26 /usr btrfs subvol=usr 1 2 UUID=64383cfe-c31d-4d25-97c4-4e6b7e788b26 /var btrfs subvol=var 1 2 It''s correct. Seems dracut is creating the wrong fstab for itself, but then also can''t mount it correctly manually from a shell command. When booted in rescue mode to a full system, not just a dracut shell, I can mount -o subvol=root to one mount point, and also mount -o subvol=usr to another mountpoint (within or outside the former mount point) without error.> If you have /sysroot subvolume, you can create /sysroot/usr as a child subvolume and you won''t even need then to specify /sysroot/usr in your fstab because it will be mounted automatically when the parent subvolume gets mounted.It''s a useful work around. I''d like to narrow down if the real problem is dracut and if it should eventually be fixed. Seems both need fixing. Chris Murphy-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12/28/2012 10:44 AM, Chris Murphy wrote:> > On Dec 27, 2012, at 6:13 PM, dima <dolenin@parallels.com> wrote: >> >> >>> /dev/disk/by-uuid/64383cfe-c31d-4d25-97c4-4e6b7e788b26 /sysroot/usr btrfs subvol=usr,subvol=root,ro 1 2 >> >> I''d say that the problem is definitely with this line having two subvolumes listed. >> Maybe you should boot from a live CD, mount your subvolid=1 and check out what subvolumes you really have in there. And then re-write fstab manually. > > When I mount subvolid=5 there are subvols root, boot, usr, var, home. And the /etc/fstab in root is: > > # > # /etc/fstab > # Created by anaconda on Thu Dec 27 15:21:03 2012 > # > # Accessible filesystems, by reference, are maintained under ''/dev/disk'' > # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info > # > UUID=64383cfe-c31d-4d25-97c4-4e6b7e788b26 / btrfs subvol=root 1 1 > UUID=64383cfe-c31d-4d25-97c4-4e6b7e788b26 /boot btrfs subvol=boot 1 2 > UUID=64383cfe-c31d-4d25-97c4-4e6b7e788b26 /home btrfs subvol=home 1 2 > UUID=64383cfe-c31d-4d25-97c4-4e6b7e788b26 /usr btrfs subvol=usr 1 2 > UUID=64383cfe-c31d-4d25-97c4-4e6b7e788b26 /var btrfs subvol=var 1 2 > > > It''s correct. > > Seems dracut is creating the wrong fstab for itself, but then also can''t mount it correctly manually from a shell command. When booted in rescue mode to a full system, not just a dracut shell, I can mount -o subvol=root to one mount point, and also mount -o subvol=usr to another mountpoint (within or outside the former mount point) without error.Then I guess all is fine with subvolumes and something is strange with the way fedora is handling those. Because it is the temporary ro mount that fails. The only thing I can recommend is to first create all needed subvolumes, then install the minimal OS manually from CLI and configure your grub and fstab by hand. Can''t really help with dracut troubleshooting..> > >> If you have /sysroot subvolume, you can create /sysroot/usr as a child subvolume and you won''t even need then to specify /sysroot/usr in your fstab because it will be mounted automatically when the parent subvolume gets mounted. > > It''s a useful work around. I''d like to narrow down if the real problem is dracut and if it should eventually be fixed. Seems both need fixing. > > > Chris Murphy-- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Dec 28, 2012, at 9:31 AM, dima <dolenin@parallels.com> wrote:> On 12/28/2012 10:44 AM, Chris Murphy wrote: >> >> Seems dracut is creating the wrong fstab for itself, but then also can''t mount it correctly manually from a shell command. When booted in rescue mode to a full system, not just a dracut shell, I can mount -o subvol=root to one mount point, and also mount -o subvol=usr to another mountpoint (within or outside the former mount point) without error. > > > Then I guess all is fine with subvolumes and something is strange with the way fedora is handling those. Because it is the temporary ro mount that fails. > The only thing I can recommend is to first create all needed subvolumes, then install the minimal OS manually from CLI and configure your grub and fstab by hand. > > Can''t really help with dracut troubleshooting..Right that''s fine. I''m just looking for a sanity check: that the dracut fstab that initiates the temporary ro mount is wrong, and then whether or not dracut should be expected to allow mounting the same /dev/ device multiple times, with different subvols, to different mount points. That first part I think is unique to Btrfs - the notion you can mount the same device multiple times. I don''t know that dracut tolerates this, or even if it should. I''m not so concerned about getting my particular system working correctly. I''m a bug magnet just trying to break stuff and hopefully file sane bug reports. The fall out of this is the user is allowed to install Fedora in this fashion, but reboot fails, so there is a bug, question is what. But it may be a question for dracut development. Chris Murphy-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html