mirror_SD tries to umount -q with q being an unavailable option

I recently helped to create a backup on an older openHABian install (raspi 3b+, openhabian1.6.x/buster, all updates installed - including openhabian-config [stable]patchday-20210119-1121(1c01b34)).

At the end of the process of mirroring the SD card, i got some messages:

2022-02-01_13:57:21_CET [openHABian] Checking for root privileges... OK
2022-02-01_13:57:22_CET [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2022-02-01_13:57:22_CET [openHABian] openHABian configuration tool version: [stable]patchday-20210119-1121(1c01b34)
2022-02-01_13:57:22_CET [openHABian] Checking for changes in origin branch stable... OK
2022-02-01_13:57:25_CET [openHABian] Switching to branch stable... OK
2022-02-01_13:57:33_CET [openHABian] Setting up automated SD mirroring and backup... OK
Failed to stop storage.mount: Unit storage.mount not loaded.
Checking that no-one is using this disk right now ... OK

Disk /dev/sda: 29,8 GiB, 32010928128 bytes, 62521344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xcadecd3d

Old situation:

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1         8192   532479   524288  256M  c W95 FAT32 (LBA)
/dev/sda2       532480 62521343 61988864 29,6G 83 Linux

>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Created a new DOS disklabel with disk identifier 0x07a44229.
/dev/sda1: Created a new partition 1 of type 'W95 FAT32 (LBA)' and of size 41,8 MiB.
Partition #1 contains a vfat signature.
/dev/sda2: Created a new partition 2 of type 'Linux' and of size 29,2 GiB.
/dev/sda3: Created a new partition 3 of type 'Linux' and of size 589 MiB.
/dev/sda4: Done.

New situation:

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1           8192    93802    85611 41,8M  c W95 FAT32 (LBA)
/dev/sda2          98304 61315071 61216768 29,2G 83 Linux
/dev/sda3       61315072 62521343  1206272  589M 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Taking a raw partition copy, be prepared this may take long such as 20-30 minutes for a 16 GB SD card
umount: UngĂĽltige Option -- q

Usage:
 umount [-hV]
 umount -a [options]
 umount [options] <source> | <directory>

Unmount filesystems.

Options:
 -a, --all               unmount all filesystems
 -A, --all-targets       unmount all mountpoints for the given device in the
                           current namespace
 -c, --no-canonicalize   don't canonicalize paths
 -d, --detach-loop       if mounted loop device, also free this loop device
     --fake              dry run; skip the umount(2) syscall
 -f, --force             force unmount (in case of an unreachable NFS system)
 -i, --internal-only     don't call the umount.<type> helpers
 -n, --no-mtab           don't write to /etc/mtab
 -l, --lazy              detach the filesystem now, clean up things later
 -O, --test-opts <list>  limit the set of filesystems (use with -a)
 -R, --recursive         recursively unmount a target with all its children
 -r, --read-only         in case unmounting fails, try to remount read-only
 -t, --types <list>      limit the set of filesystem types
 -v, --verbose           say what is being done

 -h, --help     display this help and exit
 -V, --version  output version information and exit

For more details see umount(8).
umount: UngĂĽltige Option -- q

Usage:
 umount [-hV]
 umount -a [options]
 umount [options] <source> | <directory>

Unmount filesystems.

Options:
 -a, --all               unmount all filesystems
 -A, --all-targets       unmount all mountpoints for the given device in the
                           current namespace
 -c, --no-canonicalize   don't canonicalize paths
 -d, --detach-loop       if mounted loop device, also free this loop device
     --fake              dry run; skip the umount(2) syscall
 -f, --force             force unmount (in case of an unreachable NFS system)
 -i, --internal-only     don't call the umount.<type> helpers
 -n, --no-mtab           don't write to /etc/mtab
 -l, --lazy              detach the filesystem now, clean up things later
 -O, --test-opts <list>  limit the set of filesystems (use with -a)
 -R, --recursive         recursively unmount a target with all its children
 -r, --read-only         in case unmounting fails, try to remount read-only
 -t, --types <list>      limit the set of filesystem types
 -v, --verbose           say what is being done

 -h, --help     display this help and exit
 -V, --version  output version information and exit

For more details see umount(8).
OK
OK

(Parts of) the SD Card is still mounted:

mount
...
/dev/sda3 on /storage type ext4 (rw,relatime)
...

Some investigation brought me to /opt/openhabian/funtions/backup.bash. Searching for “umount” gives some lines like
umount -q <something>
Looking up some manuals, i did not find an optional -q for umount. Even the man-pages for bullseye do not show -q.
I then took a look on github into the current code of backup.bash. It still uses “umount -q”.

The new SD-card is fine anyway.

As allways: this may be my fault. Maybe somebody want’s to check, what’s real.

I am on buster and it supports -q option.
That is also shown on the manual page: umount(8) — mount — Debian buster — Debian Manpages
Bullseye manual page also shows that option: umount(8) — mount — Debian bullseye — Debian Manpages

You are totally right about the man pages. Dunno what made me ignore the line.

The local manpage of the system we talk about does not show “-q” as option, though.

But looking at /etc/os-release brought the amazing solution:

openhabian@openHABianPi:/etc $ cat os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"

Sorry for wasting your time. I had been quite shure i red “buster” before.

1 Like