Package: xfsdump
Version: 3.1.6+nmu2+b1
Severity: normal
Dear Maintainer,
The xfsrestore man page states:
"
An additional media file is placed at the end of each dump stream. This media
file contains the inventory information for the cur‐
rent dump session. If the online inventory files in
/var/lib/xfsdump/inventory are missing information for the current dump ses‐
sion, then the inventory information in the media file is automatically
added to the files in /var/lib/xfsdump/inventory. If you
wish to incorporate the inventory information from the media file without
restoring any data, you may do so using the -t option:
# xfsrestore -t -f /dev/tape
This is useful to rebuild the inventory database if it is ever lost or
corrupted.
"
However, I am observing that xfsrestore does not add this missing inventory
information.
To reproduce
1) dump an XFS filesystem and note how new inventory information appears in
/var/lib/xfs‐dump/inventory
For example (using a 50MiB loop device to demonstrate)
# ls /var/lib/xfsdump/inventory
Note the inventory files.
# dd if=/dev/zero of=/tmp/dump_test.img bs=$((1024*1024)) count=50
# mkfs.xfs /tmp/dump_test.img
# mount /tmp/dump_test.img /mnt -o loop
# xfsdump -F -L0 -f /tmp/dump_test.dump /mnt
# umount /mnt
# ls -l /var/lib/xfsdump/inventory
Note how the xfsdump will have created an inventory file
2) remove inventory file from /var/lib/xfs‐dump/inventory
rm previously noted file.
3) list contents of dump file
# xfsrestore -t -f /tmp/dump_test.dump
4) Observe xfsrestore has not recreated the missing inventory information (file
deleted in 2)
This behaviour is inconsistent with the man page which indicates that
xfsrestore can be used to rebuild the inventory database if it is ever lost or
corrupted.
I noticed this with xfsrestore 3.1.6 (on a Debian 9.12 host), then I git cloned
xfsdump-dev, built from source and observed the same behaviour in xfsrestore
3.1.9.
-- System Information:
Debian Release: 9.12
APT prefers oldstable
APT policy: (500, 'oldstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-12-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages xfsdump depends on:
ii libattr1 1:2.4.47-2+b2
ii libc62.24-11+deb9u4
ii libncurses5 6.0+20161126-1+deb9u2
ii libtinfo56.0+20161126-1+deb9u2
ii libuuid1 2.29.2-1+deb9u1
ii xfsprogs 4.9.0+nmu1
xfsdump recommends no packages.
Versions of packages xfsdump suggests:
ii acl2.2.52-3+b1
ii attr 1:2.4.47-2+b2
pn quota
-- no debconf information