FS#32875 - usr hook doesn't mount ZFS filesystem
Attached to Project:
Arch Linux
Opened by Con Tassios (ct) - Tuesday, 27 November 2012, 03:04 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 28 November 2012, 16:48 GMT
Opened by Con Tassios (ct) - Tuesday, 27 November 2012, 03:04 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 28 November 2012, 16:48 GMT
|
Details
Description:
The usr hook, from mkinitcpio package, does not specify the filesystem type (-t option) when mounting the /usr filesystem. This is sufficient for most file system types as they are already recognised by mount/util-linux, but ZFS is not recognised. # mount OS/usr /usr mount: you must specify the filesystem type Please consider some additions to the script, to determine the fstype of the /usr filesystem and mount it with -t option Something like this - $fstype=$(findmnt -snero fstype --tab-file="$realtab" /usr) mount -t "$fstype" "$usr_source" /new_root/usr -o "$mountopts" Additional info: * package version(s) * config and/or log files etc. Steps to reproduce: |
This task depends upon
Closed by Dave Reisner (falconindy)
Wednesday, 28 November 2012, 16:48 GMT
Reason for closing: Won't fix
Additional comments about closing: See closing comments.
Wednesday, 28 November 2012, 16:48 GMT
Reason for closing: Won't fix
Additional comments about closing: See closing comments.
Does blkid detect the filesystem properly? Does 'zfs' appear in /proc/filesystems?
zfs is listed in /proc/filesystems.
LIBMOUNT_DEBUG=0xffff mount /dev/whatever /new_root/usr
# LIBMOUNT_DEBUG=0xffff mount OS/usr1 /mnt
libmount: debug mask set to 0xffff.
16085: libmount: CXT: [0x1124060]: ----> allocate
16085: libmount: UTILS: mtab: /etc/mtab
16085: libmount: UTILS: /etc/mtab: irregular/non-writable
16085: libmount: UTILS: utab: /run/mount/utab
16085: libmount: CXT: [0x1124060]: mount: preparing
16085: libmount: CXT: [0x1124060]: use default optmode
16085: libmount: CXT: [0x1124060]: OPTSMODE: ignore=0, append=0, prepend=1, replace=0, force=0, fstab=1, mtab=1
16085: libmount: CXT: [0x1124060]: fstab not required -- skip
16085: libmount: CXT: [0x1124060]: merging mount flags
16085: libmount: CXT: [0x1124060]: final flags: VFS=00000000 user=00000000
16085: libmount: CXT: [0x1124060]: mount: evaluating permissions
16085: libmount: CXT: [0x1124060]: mount: fixing optstr
16085: libmount: CXT: [0x1124060]: mount: fixing vfs optstr
16085: libmount: CXT: applying 0x00000000 flags to '(null)'
16085: libmount: CXT: new optstr 'rw'
16085: libmount: CXT: [0x1124060]: mount: fixing user optstr
16085: libmount: CXT: applying 0x00000000 flags to '(null)'
16085: libmount: CXT: new optstr '(null)'
16085: libmount: CXT: [0x1124060]: fixed options [rc=0]: vfs: 'rw' fs: '(null)' user: '(null)', optstr: 'rw'
16085: libmount: CXT: [0x1124060]: preparing source path
16085: libmount: CXT: [0x1124060]: srcpath 'OS/usr1'
16085: libmount: CACHE: [0x1124290]: alloc
16085: libmount: CACHE: [0x1124290]: add entry [ 1] (path): OS/usr1: OS/usr1
16085: libmount: CXT: [0x1124060]: final srcpath 'OS/usr1'
16085: libmount: CXT: [0x1124060]: preparing target path
16085: libmount: CACHE: [0x1124290]: add entry [ 2] (path): /mnt: /mnt
16085: libmount: CXT: [0x1124060]: final target '/mnt'
16085: libmount: CXT: [0x1124060]: FS type: (null)
16085: libmount: CXT: [0x1124060]: prepare update
16085: libmount: UPDATE: [0x1124f10]: allocate
16085: libmount: UPDATE: [0x1124f10]: resetting FS [fs=0x0x1124150, target=(null), flags=0x00000000]
16085: libmount: UPDATE: [0x1124f10]: FS template:
16085: libmount: UPDATE: ------ fs: 0x1124150
source: OS/usr1
target: /mnt
fstype: (null)
optstr: rw
VFS-optstr: rw
16085: libmount: UPDATE: prepare utab entry
16085: libmount: UPDATE: utab entry unnecessary (no options)
16085: libmount: CXT: [0x1124060]: mount: do mount
16085: libmount: CXT: [0x1124060]: trying to mount by filesystems lists
mount: you must specify the filesystem type
16085: libmount: CXT: [0x1124060]: <---- reset [status=0] ---->
16085: libmount: CACHE: [0x1124290]: free
16085: libmount: UPDATE: [0x1124f10]: free
16085: libmount: CXT: [0x1124060]: <---- free
Well shit. I guess I have to fix this in the usr hook.
edit: and mount(8) confirms that /proc/filesystems should be read if /etc/filesystems doesn't exist. Wohoo.
edit edit: Hmmm, so mount from latest util-linux git will indeed read /proc/filesystems, but it only tries filesystems which aren't marked as nodev (which zfs and 9p probably are). So, the u-l fix doesn't even save me.