Skip to content

Instantly share code, notes, and snippets.

@kescobo
Last active January 13, 2021 15:00
Show Gist options
  • Save kescobo/ed52bc759a185d9be3a2f5e4609790d3 to your computer and use it in GitHub Desktop.
Save kescobo/ed52bc759a185d9be3a2f5e4609790d3 to your computer and use it in GitHub Desktop.
$ sudo LIBMOUNT_DEBUG=all mount /dev/sda2 /lovelace
148339: libmount: INIT: library debug mask: 0xffff
148339: libmount: INIT: library version: 2.34.0
148339: libmount: INIT: feature: selinux
148339: libmount: INIT: feature: smack
148339: libmount: INIT: feature: btrfs
148339: libmount: INIT: feature: namespaces
148339: libmount: INIT: feature: assert
148339: libmount: INIT: feature: debug
Available "LIBMOUNT_DEBUG=<name>[,...]|<mask>" debug masks:
all [0xffff] : info about all subsystems
cache [0x0004] : paths and tags cache
cxt [0x0200] : library context (handler)
diff [0x0400] : mountinfo changes tracking
fs [0x0040] : FS abstraction
help [0x0001] : this help
locks [0x0010] : mtab and utab locking
loop [0x2000] : loop devices routines
options [0x0008] : mount options parsing
tab [0x0020] : fstab, mtab, mountinfo routines
update [0x0080] : mtab, utab updates
utils [0x0100] : misc library utils
monitor [0x0800] : mount tables monitor
btrfs [0x1000] : btrfs specific routines
148339: libmount: CXT: [0x55c92d9f4a50]: ----> allocate
148339: libmount: CXT: [0x55c92d9f4a50]: mount: preparing
148339: libmount: CXT: [0x55c92d9f4a50]: use default optsmode
148339: libmount: CXT: [0x55c92d9f4a50]: OPTSMODE: ignore=0, append=0, prepend=1, replace=0, force=0, fstab=1, mtab=1
148339: libmount: CXT: [0x55c92d9f4a50]: fstab not required -- skip
148339: libmount: CXT: [0x55c92d9f4a50]: merging mount flags
148339: libmount: CXT: [0x55c92d9f4a50]: final flags: VFS=00000000 user=00000000
148339: libmount: CXT: [0x55c92d9f4a50]: mount: evaluating permissions
148339: libmount: CXT: [0x55c92d9f4a50]: mount: fixing optstr
148339: libmount: CXT: [0x55c92d9f4a50]: mount: fixing vfs optstr
148339: libmount: CXT: applying 0x00000000 flags to '(null)'
148339: libmount: CXT: new optstr 'rw'
148339: libmount: CXT: [0x55c92d9f4a50]: mount: fixing user optstr
148339: libmount: CXT: applying 0x00000000 flags to '(null)'
148339: libmount: CXT: new optstr '(null)'
148339: libmount: CXT: [0x55c92d9f4a50]: fixed options [rc=0]: vfs: 'rw' fs: '(null)' user: '(null)', optstr: 'rw'
148339: libmount: CXT: [0x55c92d9f4a50]: preparing source path
148339: libmount: CXT: [0x55c92d9f4a50]: srcpath '/dev/sda2'
148339: libmount: CACHE: [0x55c92d9f4cc0]: alloc
148339: libmount: CACHE: [0x55c92d9f4cc0]: canonicalize path /dev/sda2
148339: libmount: CACHE: [0x55c92d9f4cc0]: add entry [ 1] (path): /dev/sda2: /dev/sda2
148339: libmount: CXT: [0x55c92d9f4a50]: final srcpath '/dev/sda2'
148339: libmount: CXT: [0x55c92d9f4a50]: preparing target path
148339: libmount: CACHE: [0x55c92d9f4cc0]: canonicalize path /lovelace
148339: libmount: CACHE: [0x55c92d9f4cc0]: add entry [ 2] (path): /lovelace: /lovelace
148339: libmount: CXT: [0x55c92d9f4a50]: final target '/lovelace'
148339: libmount: CXT: [0x55c92d9f4a50]: preparing fstype
148339: libmount: CACHE: [0x55c92d9f4cc0]: get /dev/sda2 FS type
148339: libmount: CACHE: [0x55c92d9f4cc0]: tags for /dev/sda2 requested
148339: libmount: CACHE: [0x55c92d9f4cc0]: reading tags for: /dev/sda2
148339: libmount: CACHE: [0x55c92d9f4cc0]: add entry [ 3] (tag): /dev/sda2: LABEL
148339: libmount: CACHE: [0x55c92d9f4cc0]: add entry [ 4] (tag): /dev/sda2: UUID
148339: libmount: CACHE: [0x55c92d9f4cc0]: add entry [ 5] (tag): /dev/sda2: TYPE
148339: libmount: CACHE: [0x55c92d9f4cc0]: add entry [ 6] (tag): /dev/sda2: PARTUUID
148339: libmount: CACHE: [0x55c92d9f4cc0]: read 4 tags
148339: libmount: CXT: [0x55c92d9f4a50]: FS type: ext4 [rc=0]
148339: libmount: CXT: [0x55c92d9f4a50]: /sbin/mount.ext4 ... not found
148339: libmount: CXT: [0x55c92d9f4a50]: /sbin/fs.d/mount.ext4 ... not found
148339: libmount: CXT: [0x55c92d9f4a50]: /sbin/fs/mount.ext4 ... not found
148339: libmount: CXT: [0x55c92d9f4a50]: prepare update
148339: libmount: CXT: [0x55c92d9f4a50]: utab path initialized to: /run/mount/utab
148339: libmount: CXT: [0x55c92d9f4a50]: checking for writable tab files
148339: libmount: UTILS: utab: /run/mount/utab
148339: libmount: UTILS: try write /run/mount/utab dir: (null)
148339: libmount: UTILS: access OK
148339: libmount: UPDATE: [0x55c92d9fdb00]: allocate
148339: libmount: UPDATE: [0x55c92d9fdb00]: resetting FS [target=(null), flags=0x00000000]
148339: libmount: UPDATE: [0x55c92d9fdb00]: FS template:
148339: libmount: UPDATE: ------ fs:
source: /dev/sda2
target: /lovelace
fstype: ext4
optstr: rw
VFS-optstr: rw
148339: libmount: UPDATE: prepare utab entry
148339: libmount: UPDATE: utab entry unnecessary (no options)
148339: libmount: CXT: [0x55c92d9f4a50]: mount: do mount
148339: libmount: CXT: [0x55c92d9f4a50]: mount(2) [source=/dev/sda2, target=/lovelace, type=ext4, mountflags=0x00000000, mountdata=<none>]
148339: libmount: CXT: [0x55c92d9f4a50]: success
148339: libmount: CXT: [0x55c92d9f4a50]: don't update: no update prepared
148339: libmount: CXT: [0x55c92d9f4a50]: excode: rc=0 message=""
148339: libmount: CXT: [0x55c92d9f4a50]: <---- reset [status=1] ---->
148339: libmount: FS: [0x55c92d9f4b80]: free [refcount=0]
148339: libmount: CACHE: [0x55c92d9f4cc0]: free [refcount=0]
148339: libmount: UPDATE: [0x55c92d9fdb00]: free
148339: libmount: CXT: [0x55c92d9f4a50]: Setting (null) as target namespace
148339: libmount: CXT: [0x55c92d9f4a50]: <---- free
❯ sudo umount /Lovelace
❯ sudo LIBMOUNT_DEBUG=all mount /dev/sda2 /Lovelace
148392: libmount: INIT: library debug mask: 0xffff
148392: libmount: INIT: library version: 2.34.0
148392: libmount: INIT: feature: selinux
148392: libmount: INIT: feature: smack
148392: libmount: INIT: feature: btrfs
148392: libmount: INIT: feature: namespaces
148392: libmount: INIT: feature: assert
148392: libmount: INIT: feature: debug
Available "LIBMOUNT_DEBUG=<name>[,...]|<mask>" debug masks:
all [0xffff] : info about all subsystems
cache [0x0004] : paths and tags cache
cxt [0x0200] : library context (handler)
diff [0x0400] : mountinfo changes tracking
fs [0x0040] : FS abstraction
help [0x0001] : this help
locks [0x0010] : mtab and utab locking
loop [0x2000] : loop devices routines
options [0x0008] : mount options parsing
tab [0x0020] : fstab, mtab, mountinfo routines
update [0x0080] : mtab, utab updates
utils [0x0100] : misc library utils
monitor [0x0800] : mount tables monitor
btrfs [0x1000] : btrfs specific routines
148392: libmount: CXT: [0x564e0369fa50]: ----> allocate
148392: libmount: CXT: [0x564e0369fa50]: mount: preparing
148392: libmount: CXT: [0x564e0369fa50]: use default optsmode
148392: libmount: CXT: [0x564e0369fa50]: OPTSMODE: ignore=0, append=0, prepend=1, replace=0, force=0, fstab=1, mtab=1
148392: libmount: CXT: [0x564e0369fa50]: fstab not required -- skip
148392: libmount: CXT: [0x564e0369fa50]: merging mount flags
148392: libmount: CXT: [0x564e0369fa50]: final flags: VFS=00000000 user=00000000
148392: libmount: CXT: [0x564e0369fa50]: mount: evaluating permissions
148392: libmount: CXT: [0x564e0369fa50]: mount: fixing optstr
148392: libmount: CXT: [0x564e0369fa50]: mount: fixing vfs optstr
148392: libmount: CXT: applying 0x00000000 flags to '(null)'
148392: libmount: CXT: new optstr 'rw'
148392: libmount: CXT: [0x564e0369fa50]: mount: fixing user optstr
148392: libmount: CXT: applying 0x00000000 flags to '(null)'
148392: libmount: CXT: new optstr '(null)'
148392: libmount: CXT: [0x564e0369fa50]: fixed options [rc=0]: vfs: 'rw' fs: '(null)' user: '(null)', optstr: 'rw'
148392: libmount: CXT: [0x564e0369fa50]: preparing source path
148392: libmount: CXT: [0x564e0369fa50]: srcpath '/dev/sda2'
148392: libmount: CACHE: [0x564e0369fcc0]: alloc
148392: libmount: CACHE: [0x564e0369fcc0]: canonicalize path /dev/sda2
148392: libmount: CACHE: [0x564e0369fcc0]: add entry [ 1] (path): /dev/sda2: /dev/sda2
148392: libmount: CXT: [0x564e0369fa50]: final srcpath '/dev/sda2'
148392: libmount: CXT: [0x564e0369fa50]: preparing target path
148392: libmount: CACHE: [0x564e0369fcc0]: canonicalize path /Lovelace
148392: libmount: CACHE: [0x564e0369fcc0]: add entry [ 2] (path): /Lovelace: /Lovelace
148392: libmount: CXT: [0x564e0369fa50]: final target '/Lovelace'
148392: libmount: CXT: [0x564e0369fa50]: preparing fstype
148392: libmount: CACHE: [0x564e0369fcc0]: get /dev/sda2 FS type
148392: libmount: CACHE: [0x564e0369fcc0]: tags for /dev/sda2 requested
148392: libmount: CACHE: [0x564e0369fcc0]: reading tags for: /dev/sda2
148392: libmount: CACHE: [0x564e0369fcc0]: add entry [ 3] (tag): /dev/sda2: LABEL
148392: libmount: CACHE: [0x564e0369fcc0]: add entry [ 4] (tag): /dev/sda2: UUID
148392: libmount: CACHE: [0x564e0369fcc0]: add entry [ 5] (tag): /dev/sda2: TYPE
148392: libmount: CACHE: [0x564e0369fcc0]: add entry [ 6] (tag): /dev/sda2: PARTUUID
148392: libmount: CACHE: [0x564e0369fcc0]: read 4 tags
148392: libmount: CXT: [0x564e0369fa50]: FS type: ext4 [rc=0]
148392: libmount: CXT: [0x564e0369fa50]: /sbin/mount.ext4 ... not found
148392: libmount: CXT: [0x564e0369fa50]: /sbin/fs.d/mount.ext4 ... not found
148392: libmount: CXT: [0x564e0369fa50]: /sbin/fs/mount.ext4 ... not found
148392: libmount: CXT: [0x564e0369fa50]: prepare update
148392: libmount: CXT: [0x564e0369fa50]: utab path initialized to: /run/mount/utab
148392: libmount: CXT: [0x564e0369fa50]: checking for writable tab files
148392: libmount: UTILS: utab: /run/mount/utab
148392: libmount: UTILS: try write /run/mount/utab dir: (null)
148392: libmount: UTILS: access OK
148392: libmount: UPDATE: [0x564e036a8b00]: allocate
148392: libmount: UPDATE: [0x564e036a8b00]: resetting FS [target=(null), flags=0x00000000]
148392: libmount: UPDATE: [0x564e036a8b00]: FS template:
148392: libmount: UPDATE: ------ fs:
source: /dev/sda2
target: /Lovelace
fstype: ext4
optstr: rw
VFS-optstr: rw
148392: libmount: UPDATE: prepare utab entry
148392: libmount: UPDATE: utab entry unnecessary (no options)
148392: libmount: CXT: [0x564e0369fa50]: mount: do mount
148392: libmount: CXT: [0x564e0369fa50]: mount(2) [source=/dev/sda2, target=/Lovelace, type=ext4, mountflags=0x00000000, mountdata=<none>]
148392: libmount: CXT: [0x564e0369fa50]: success
148392: libmount: CXT: [0x564e0369fa50]: don't update: no update prepared
148392: libmount: CXT: [0x564e0369fa50]: excode: rc=0 message=""
148392: libmount: CXT: [0x564e0369fa50]: <---- reset [status=1] ---->
148392: libmount: FS: [0x564e0369fb80]: free [refcount=0]
148392: libmount: CACHE: [0x564e0369fcc0]: free [refcount=0]
148392: libmount: UPDATE: [0x564e036a8b00]: free
148392: libmount: CXT: [0x564e0369fa50]: Setting (null) as target namespace
148392: libmount: CXT: [0x564e0369fa50]: <---- free
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment