You are not logged in.

#1 2015-05-15 00:41:48

nbd
Member
Registered: 2014-08-04
Posts: 389

[SOLVED]How to mount /usr on a separate btrfs partition?

I want to mount /usr directory on a separate drive with btrfs partition. Manually it's mounted OK, but it fails to mount automatically during boot process. I followed instructions in wiki for Mkinitcpio and did the following:

1. mkinitcpio -A shutdown,fsck,usr

2. mkinitcpio -p linux

3. Added to /etc/fstab :

LABEL="stor"   /usr	     btrfs	     ro,noauto,subvol=arch_usr	0	0

During boot errors regarding 'Remount Root' are reported and systemctl status reports the following:

systemctl status systemd-remount-fs.service
● systemd-remount-fs.service - Remount Root and Kernel File Systems
   Loaded: loaded (/usr/lib/systemd/system/systemd-remount-fs.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2015-05-15 03:22:35 MSK; 1min 21s ago
     Docs: man:systemd-remount-fs.service(8)
           http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
  Process: 143 ExecStart=/usr/lib/systemd/systemd-remount-fs (code=exited, status=1/FAILURE)
 Main PID: 143 (code=exited, status=1/FAILURE)

May 15 03:22:35 localhost systemd[1]: Starting Remount Root and Kernel File Systems...
May 15 03:22:35 localhost systemd-remount-fs[143]: mount: /usr not mounted or bad option
May 15 03:22:35 localhost systemd-remount-fs[143]: In some cases useful info is found in syslog - try
May 15 03:22:35 localhost systemd-remount-fs[143]: dmesg | tail or so.
May 15 03:22:35 localhost systemd-remount-fs[143]: /bin/mount for /usr exited with exit status 32.
May 15 03:22:35 localhost systemd[1]: systemd-remount-fs.service: main process exited, code=exited, status=1/FAILURE
May 15 03:22:35 localhost systemd[1]: Failed to start Remount Root and Kernel File Systems.
May 15 03:22:35 localhost systemd[1]: Unit systemd-remount-fs.service entered failed state.
May 15 03:22:35 localhost systemd[1]: systemd-remount-fs.service failed.

I wonder can this fail happen because 'arch_usr' btrfs subvolume, which is mounted to /usr, is not a primary btfrfs partition, but a subvolume?

EDIT: (Additional info) : the original /usr directory on root partition still remains in place and from btrfs the exact mirror copy is mounted.

EDIT 2: As it turned out, for mounting /usr on btrfs it's needed to add 'btrfs' mkinitcpio hook in addition to the aforementioned hooks.

Last edited by nbd (2015-05-15 18:12:24)


bing different

Offline

Board footer

Powered by FluxBB