<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:Consolas;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.CustRegChar
        {mso-style-name:"Cust_Reg Char";
        mso-style-link:Cust_Reg;
        font-family:"Calibri",sans-serif;}
p.CustReg, li.CustReg, div.CustReg
        {mso-style-name:Cust_Reg;
        mso-style-link:"Cust_Reg Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
span.CustComLnChar
        {mso-style-name:"Cust_Com_Ln Char";
        mso-style-link:Cust_Com_Ln;
        font-family:"Courier New";}
p.CustComLn, li.CustComLn, div.CustComLn
        {mso-style-name:Cust_Com_Ln;
        mso-style-link:"Cust_Com_Ln Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=CustReg>Dear Maintainer,<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>I am also trying to mount zfs datasets through fstab on Debian Jessie (in VirtualBox). It appear that mounting /usr through fstab results in systemd and systemd-remount-fs errors. <o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>It seem that the current bug report is related to my issue, so I am posting my information here. Can you kindly look into this matter. If I need to open a new bug report let me know.<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>I would also appreciate it if you can advise me on whether I can safely ignore this error and if there is a possible systemd fix in the works.<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>Thanks in advance.<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>I am booting through UEFI on GTP partitioned disks<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>Jessie installer build: 20141222-00:04<o:p></o:p></p><p class=CustReg>systemd version: 215-8<o:p></o:p></p><p class=CustReg>zfs on Linux version: 0.6.3<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>I have found that "/" and "/home" can be mounted through zfs mount or through fstab without errors (/var/log/daemon.log):<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustComLn>... zfs-mount[1150]: Importing ZFS pools.<o:p></o:p></p><p class=CustComLn>... zfs-mount[1150]: Mounting ZFS filessystems not yet mounted.<o:p></o:p></p><p class=CustComLn>... zfs-mount[1150]: Mounting volumes registered in fstab.<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>Mounting /var through zfs mount results in the following errors:<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustComLn>... zfs-mount[1176]: Importing ZFS pools<o:p></o:p></p><p class=CustComLn>... zfs-mount[1176]: Mounting ZFS filessystems not yet mountedcannot mount '/var': directory is not empty<o:p></o:p></p><p class=CustComLn>... zfs-mount[1176]: failed!<o:p></o:p></p><p class=CustComLn>... systemd[1]: zfs-mount.service: control process exited, code=exited status=1<o:p></o:p></p><p class=CustComLn>... systemd[1]: Failed to start LSB: Import and mount ZFS pools, filesystem and volumes.<o:p></o:p></p><p class=CustComLn>... systemd[1]: Unit zfs-mount.service entered failed state.<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>Even though the /var is not mounted properly, the /var directory will appear on boot up but is missing a lot of files. This is somewhat understandable with zfs currently refusing to mount over non-empty directories, which should hopefully be fixed in version 0.6.4 through the overlay feature.<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>https://github.com/zfsonlinux/zfs/issues/1827<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>Mounting /var through fstab yields:<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustComLn>... systemd[1]: var.mount: Directory /var to mount over is not empty, mounting anyway.<o:p></o:p></p><p class=CustComLn>... zfs-mount[1150]: Importing ZFS pools.<o:p></o:p></p><p class=CustComLn>... zfs-mount[1150]: Mounting ZFS filessystems not yet mounted.<o:p></o:p></p><p class=CustComLn>... zfs-mount[1150]: Mounting volumes registered in fstab.<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>On boot up the /var directory appear to be mounted correctly with all its files present. /boot acts the same as /var.<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>/usr acts a little differently. When mounting /usr though zfs mount, you would be lucky if the system boots up.<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>Mounting /usr though fstab in addition to /var and /usr yields:<o:p></o:p></p><p class=CustComLn><o:p> </o:p></p><p class=CustComLn>... systemd-remount-fs[571]: filesystem 'mpool/ROOT/deb/usr' can not be mounted due to error 22<o:p></o:p></p><p class=CustComLn>... systemd-remount-fs[571]: /bin/mount for /usr exited with exit status 1.<o:p></o:p></p><p class=CustComLn>... systemd[1]: systemd-remount-fs.service: main process exited, code=exited, status=1/FAILURE<o:p></o:p></p><p class=CustComLn>... systemd[1]: Failed to start Remount Root and Kernel File Systems.<o:p></o:p></p><p class=CustComLn>... systemd[1]: Unit systemd-remount-fs.service entered failed state.<o:p></o:p></p><p class=CustComLn>... systemd[1]: var.mount: Directory /var to mount over is not empty, mounting anyway.<o:p></o:p></p><p class=CustComLn>... systemd[1]: boot.mount: Directory /boot to mount over is not empty, mounting anyway.<o:p></o:p></p><p class=CustComLn>... zfs-mount[1158]: Importing ZFS pools.<o:p></o:p></p><p class=CustComLn>... zfs-mount[1158]: Mounting ZFS filessystems not yet mounted.<o:p></o:p></p><p class=CustComLn>... zfs-mount[1158]: Mounting volumes registered in fstab.<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>On boot up the following is listed:<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustComLn>[FAILED] Failed to start Remount Root and Kernal File Systems.<o:p></o:p></p><p class=CustComLn>see 'systemctl status systemd-remount-fs. service' for details.<o:p></o:p></p><p class=CustComLn>[  OK  ] Reached target Local File Systems (Pre).<o:p></o:p></p><p class=CustComLn>         Mounting /usr...<o:p></o:p></p><p class=CustComLn>         Mounting /var...<o:p></o:p></p><p class=CustComLn>         Mounting /boot...<o:p></o:p></p><p class=CustComLn>         Mounting /home...<o:p></o:p></p><p class=CustComLn>[  OK  ] Activated swap /dev/disk/by-uuid/...<o:p></o:p></p><p class=CustComLn>[  OK  ] Reached target Swap.<o:p></o:p></p><p class=CustComLn>[  OK  ] Mounted /var.<o:p></o:p></p><p class=CustComLn>         Starting Load/Save Random Seed...<o:p></o:p></p><p class=CustComLn>[  OK  ] Mounted /boot.<o:p></o:p></p><p class=CustComLn>[  OK  ] Mounted /usr.<o:p></o:p></p><p class=CustComLn>         Mounting /boot/efi...<o:p></o:p></p><p class=CustComLn>[  OK  ] Mounted /home<o:p></o:p></p><p class=CustComLn>[  OK  ] Started Load/Save Random Seed.<o:p></o:p></p><p class=CustComLn>[  OK  ] Mounted /boot/efi<o:p></o:p></p><p class=CustComLn><o:p> </o:p></p><p class=CustComLn><o:p> </o:p></p><p class=CustReg>Checking errors in systemd-remount-fs:<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustComLn># systemctl status systemd-remount-fs.service<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustComLn>Active: failed (Result: exit code) since Mon 2015-01-19 ...<o:p></o:p></p><p class=CustComLn><o:p> </o:p></p><p class=CustComLn>Process: 592 ExecStart=/lib/systemd/systemd-remount-fs (code=exited, status=1/FAILURE)<o:p></o:p></p><p class=CustComLn>Main PID: 592 (code=exited, status=1/FAILURE)<o:p></o:p></p><p class=CustComLn><o:p> </o:p></p><p class=CustComLn>... systemd-remount-fs[592]: filesystem 'mpool/ROOT/deb/usr' can not be mounted due to error 22<o:p></o:p></p><p class=CustComLn>... systemd[1]: systemd-remount-fs.service: main process exited, code=exited, status=1/FAILURE<o:p></o:p></p><p class=CustComLn>... systemd[1]: Failed to start Remount Root and Kernel File Systems.<o:p></o:p></p><p class=CustComLn>... systemd[1]: Unit systemd-remount-fs.service entered failed state.<o:p></o:p></p><p class=CustComLn><o:p> </o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>Entries in /etc/fstab:<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustComLn># if zfs set mountpoint=legacy for / and /home<o:p></o:p></p><p class=CustComLn>#<o:p></o:p></p><p class=CustComLn>mpool/ROOT/deb  <b>/  zfs  defaults,noatime,rw  0  0</b><o:p></o:p></p><p class=CustComLn>mpool/ROOT/deb/home  <b>/home  zfs  defaults,noatime,nodev,nosuid,noexec  0  0</b>  <o:p></o:p></p><p class=CustComLn>#<o:p></o:p></p><p class=CustComLn># zfs set mountpoint=legacy for /boot, /var, /usr<o:p></o:p></p><p class=CustComLn>#<o:p></o:p></p><p class=CustComLn>mpool/ROOT/deb/usr  <b>/usr  zfs  defaults,noatime,nodev,rw  0  0</b><o:p></o:p></p><p class=CustComLn>mpool/ROOT/deb/boot  <b>/boot  zfs  defaults,noatime  0  0</b><o:p></o:p></p><p class=CustComLn>mpool/ROOT/deb/var  <b>/var  zfs  defaults,noatime,nodev,nosuid,noexec  0  0</b><o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>For the most part partitioning requirements are setup following instructions for securing-debian-howto<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>4.10 Mounting partitions the right way<o:p></o:p></p><p class=CustReg>https://www.debian.org/doc/manuals/securing-debian-howto/ch4.en.html<o:p></o:p></p><p class=CustReg>and<o:p></o:p></p><p class=CustReg>http://changelog.complete.org/archives/9241-update-on-the-systemd-issue<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>The zpool is a mirrored pair (RAID 10) and was created with /dev/disk/by-id with the following options:<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>pool options:<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>ashift=12<o:p></o:p></p><p class=CustReg>autoexpand=on<o:p></o:p></p><p class=CustReg>autoreplace=on<o:p></o:p></p><p class=CustReg>feature@lz4_compress=enabled<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>dataset options:<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>atime=off<o:p></o:p></p><p class=CustReg>checksum=fletcher4<o:p></o:p></p><p class=CustReg>compression=lz4<o:p></o:p></p><p class=CustReg>xattr=sa<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=CustReg>Additional options set through /etc/fstab entries above.<o:p></o:p></p><p class=CustReg><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>