#3029 Issue closed: ReaR should issue an error message and exit if USB_DEVICE_FILESYSTEM is invalid

Labels: enhancement, cleanup, fixed / solved / done

casantos opened issue at 2023-07-24 01:15:

  • ReaR version ("/usr/sbin/rear -V"): 2.7

  • If your ReaR version is not the current version, explain why you can't upgrade:

  • OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"): Red Hat Enterprise Linux 8.8 (Ootpa)

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):

BACKUP=NETFS
BACKUP_PROG_COMPRESS_OPTIONS=( )
BACKUP_PROG_COMPRESS_SUFFIX=
BACKUP_URL=usb:///dev/disk/by-label/REAR-000
MODULES=()
OUTPUT=USB
USB_BOOTLOADER=grub
USB_DEVICE_FILESYSTEM=xfs
USB_DEVICE_PARTED_LABEL=gpt
USB_UEFI_PART_SIZE=2048
SECURE_BOOT_BOOTLOADER=/boot/efi/EFI/redhat/shimx64.efi
  • Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR): PC

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device): x86_64

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot): UEFI, GRUB

  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe): VirtIO

  • Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT"):

# lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT
NAME                           KNAME     PKNAME    TRAN   TYPE FSTYPE      LABEL                     SIZE MOUNTPOINT
/dev/sda                       /dev/sda            sata   disk                                         4G 
|-/dev/sda1                    /dev/sda1 /dev/sda         part vfat                                   50M /boot/efi
|-/dev/sda2                    /dev/sda2 /dev/sda         part xfs                                   500M /boot
`-/dev/sda3                    /dev/sda3 /dev/sda         part LVM2_member                           3.5G 
  |-/dev/mapper/vg_system-root /dev/dm-0 /dev/sda3        lvm  xfs                                    16G /
  |-/dev/mapper/vg_system-swap /dev/dm-1 /dev/sda3        lvm  swap                                    4G [SWAP]
  |-/dev/mapper/vg_system-home /dev/dm-2 /dev/sda3        lvm  xfs                                     4G /home
  `-/dev/mapper/vg_system-var  /dev/dm-3 /dev/sda3        lvm  xfs                                   7.4G /var
/dev/sdb                       /dev/sdb            sata   disk                                         4G 
`-/dev/sdb1                    /dev/sdb1 /dev/sdb         part LVM2_member                             4G 
  `-/dev/mapper/vg_system-root /dev/dm-0 /dev/sdb1        lvm  xfs                                    16G /
/dev/sdc                       /dev/sdc            sata   disk                                         4G 
`-/dev/sdc1                    /dev/sdc1 /dev/sdc         part LVM2_member                             4G 
  `-/dev/mapper/vg_system-root /dev/dm-0 /dev/sdc1        lvm  xfs                                    16G /
/dev/sdd                       /dev/sdd            sata   disk                                         4G 
`-/dev/sdd1                    /dev/sdd1 /dev/sdd         part LVM2_member                             4G 
  `-/dev/mapper/vg_system-root /dev/dm-0 /dev/sdd1        lvm  xfs                                    16G /
/dev/sde                       /dev/sde            sata   disk                                         4G 
`-/dev/sde1                    /dev/sde1 /dev/sde         part LVM2_member                             4G 
  `-/dev/mapper/vg_system-root /dev/dm-0 /dev/sde1        lvm  xfs                                    16G /
/dev/sdf                       /dev/sdf            sata   disk                                         4G 
`-/dev/sdf1                    /dev/sdf1 /dev/sdf         part LVM2_member                             4G 
  `-/dev/mapper/vg_system-swap /dev/dm-1 /dev/sdf1        lvm  swap                                    4G [SWAP]
/dev/sdg                       /dev/sdg            sata   disk                                         4G 
`-/dev/sdg1                    /dev/sdg1 /dev/sdg         part LVM2_member                             4G 
  `-/dev/mapper/vg_system-home /dev/dm-2 /dev/sdg1        lvm  xfs                                     4G /home
/dev/sdh                       /dev/sdh            sata   disk                                         4G 
`-/dev/sdh1                    /dev/sdh1 /dev/sdh         part LVM2_member                             4G 
  `-/dev/mapper/vg_system-var  /dev/dm-3 /dev/sdh1        lvm  xfs                                   7.4G /var
/dev/sdi                       /dev/sdi            usb    disk                                        32G 
|-/dev/sdi1                    /dev/sdi1 /dev/sdi         part vfat        REAR-EFI                    2G 
`-/dev/sdi2                    /dev/sdi2 /dev/sdi         part xfs         REAR-000                   30G 
/dev/sr0                       /dev/sr0            sata   rom  iso9660     RHEL-8-7-0-BaseOS-x86_64 11.3G
  • Description of the issue (ideally so that others can reproduce it):

ReaR should issue an error message and exit if USB_DEVICE_FILESYSTEM is invalid, instead of setting it to "ext3". It's safer to fail due to configuation errors than to ignore/fix them silently.

  • Workaround, if any:

Add a test in usr/share/rear/format/USB/default/200_check_usb_layout.sh

  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):

pcahyna commented at 2023-07-25 11:01:

Why is USB_DEVICE_FILESYSTEM=xfs invalid?

pcahyna commented at 2023-07-25 11:04:

Ah, I see now https://github.com/rear/rear/pull/3030#issuecomment-1649472994

jsmeix commented at 2023-07-27 11:24:

With https://github.com/rear/rear/pull/3030 merged
this issue is solved.


[Export of Github issue for rear/rear.]