[systemd-devel] /home Fails to Mount During Boot

Kay Sievers kay at vrfy.org
Sat Jul 27 18:28:59 PDT 2013


On Sun, Jul 28, 2013 at 1:34 AM, Garry T. Williams <gtwilliams at gmail.com> wrote:
> On 7-28-13 01:14:55 Tom Gundersen wrote:
>> On Sun, Jul 28, 2013 at 12:13 AM, Garry T. Williams
>> <gtwilliams at gmail.com> wrote:
>> > /etc/fstab:
>> >
>> >     /dev/sda4 /home btrfs noatime 0 0
>> >
>> > The /home file system is a raid1 btrfs across two identical drive
>> > partitions, sda4 and sdb4.
>>
>> I believe you want to use UUID, rather than the name of one of your
>> devices (see "lsblk -f").
>
> Thanks.  That seems to have done it.  (It has been intermittent until
> this kernel.)  I've had that entry in fstab for a long time --
> probably two years.  That's about when I first tried btrfs on /home.
>
> Is the use of /dev/sd* in the fstab racey in some way?

Btrfs multi-device volumes need all be known to the kernel before
mount can succeed.

Which one of the device is given to mount does not matter, they all
result in the same volume to be mounted.

If you reference one of the volumes directly in fstab, the other
needed volume needs to be already known to the kernel or it will fail.
So yes, it is racy, it depends on discovery order.

Using the volume's UUID will make systemd check if the volume is ready
for mount, and only after all devices are known to the kernel, the
kernel will signify ready and we attempt to mount.

Kay


More information about the systemd-devel mailing list