sys job sends warnings for each DRBD device file
The sys job (/usr/share/backupninja/sys) will grab all device files but zram files
if [ "$partitions" == "yes" ]; then
if [ "$dosfdisk" == "yes" ]; then
devices=`LC_ALL=C $LSBLK --output NAME,TYPE --list --paths 2>/dev/null | grep "disk$" | grep -v '^/dev/zram' | /usr/bin/awk '{print $1}'`
In a machine where DRBD is used, there is a bunch of /dev/drbd* device files.
But, these devices files will never have any partition table, they only distribute a block device, which is where the partitions rest.
root@weloveriseup0:/# lsblk | grep -A1 "data-12345678990--1234--4567--9876--asdfghjkl.disk0_meta"
├─data-12345678990--1234--4567--9876--asdfghjkl.disk0_meta 253:5 0 128M 0 lvm
│ └─drbd0 147:0 0 246G 1 disk
--
├─data-12345678990--1234--4567--9876--asdfghjkl.disk0_meta 253:5 0 128M 0 lvm
│ └─drbd0 147:0 0 246G 1 disk
If feel like we should add an or in the grep -v part of the command that build the device list. For exemple
if [ "$partitions" == "yes" ]; then
if [ "$dosfdisk" == "yes" ]; then
devices=`LC_ALL=C $LSBLK --output NAME,TYPE --list --paths 2>/dev/null | grep "disk$" | grep -v '^/dev/zram\|^/dev/drbd' | /usr/bin/awk '{print $1}'````
Do you see any problem with this approach?
Edited by Hubert Pineault