#3124 PR merged: Take AUTOEXCLUDE_PATH into account in layout doc

Labels: enhancement, documentation, fixed / solved / done

pcahyna opened issue at 2024-01-08 18:18:

Relax-and-Recover (ReaR) Pull Request Template

Please fill in the following items before submitting a new pull request:

Pull Request Details:
  • Type: Bug Fix

  • Impact: Low

  • Reference to related issue (URL):
    Triggred by PR #2261. Found while working on #2997.

  • How was this pull request tested?

pvcreate /dev/vdc
vgcreate testvg /dev/vdc
lvcreate -L 1G testvg -n testlv 
mkfs.xfs /dev/testvg/testlv
lvcreate -L 1G testvg -n testlv2
mkfs.xfs /dev/testvg/testlv2
mkdir /media/testfs
mkdir /media/testfs/testfs2
mount /dev/testvg/testlv /media/testfs
mount /dev/testvg/testlv2 /media/testfs/testfs2

Observe that everything related to the storage created above is commented out in disklayout.conf:

# Disk /dev/vdc
# Format: disk <devname> <size(bytes)> <partition label type>
#disk /dev/vdc 10737418240 unknown
# Partitions on /dev/vdc
# Format: part <device> <partition size(bytes)> <partition start(bytes)> <partition type|name> <flags> /dev/<partition>
# Format for LVM PVs
# lvmdev <volume_group> <device> [<uuid>] [<size(bytes)>]
#lvmdev /dev/testvg /dev/vdc noCtfr-i5N5-y03V-lw4W-0axd-TAk0-KqWlG4 10733223936
# Format for LVM VGs
# lvmgrp <volume_group> <extentsize> [<size(extents)>] [<size(bytes)>]
#lvmgrp /dev/testvg 4096 2559 10481664
# Format for LVM LVs
# lvmvol <volume_group> <name> <size(bytes)> <layout> [key:value ...]
#lvmvol /dev/testvg testlv 1073741824b linear 
#lvmvol /dev/testvg testlv2 1073741824b linear 
# Filesystems (only ext2,ext3,ext4,vfat,xfs,reiserfs,btrfs are supported).
# Format: fs <device> <mountpoint> <fstype> [uuid=<uuid>] [label=<label>] [<attributes>]
#fs /dev/mapper/testvg-testlv /media/testfs xfs uuid=7809e5c6-8012-43e2-a1c6-3cdc3d4cfc0e label=  options=rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota
#fs /dev/mapper/testvg-testlv2 /media/testfs/testfs2 xfs uuid=2bf30849-24f8-4438-bd20-61b53ccd738d label=  options=rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota
  • Description of the changes in this pull request:

Since PR #2261, /media is included in the default AUTOEXCLUDE_PATH. This means that a filesystem mounted on a directory like /media/backup will not be included in the layout. This makes the example invalid, as it describes how a filesystem mounted under /media/backup will be included in the layout and what manual steps are needed to exclude it.

To preserve the validity of the example, change all paths in the example from /media/backup to /backup.

Take this opportunity to also describe the AUTOEXCLUDE_PATH variable among other autoexclusions.

pcahyna commented at 2024-01-08 19:29:

After moving one mount under /home, the filesystems, disk, VG and LVs are not excluded anymore:

# Format: part <device> <partition size(bytes)> <partition start(bytes)> <partition type|name> <flags> /dev/<partition>
# Disk /dev/vdc
# Format: disk <devname> <size(bytes)> <partition label type>
disk /dev/vdc 10737418240 unknown
# Partitions on /dev/vdc
# Format: part <device> <partition size(bytes)> <partition start(bytes)> <partition type|name> <flags> /dev/<partition>
# Format for LVM PVs
# lvmdev <volume_group> <device> [<uuid>] [<size(bytes)>]
lvmdev /dev/testvg /dev/vdc noCtfr-i5N5-y03V-lw4W-0axd-TAk0-KqWlG4 10733223936
# Format for LVM VGs
# lvmgrp <volume_group> <extentsize> [<size(extents)>] [<size(bytes)>]
lvmgrp /dev/testvg 4096 2559 10481664
# Format for LVM LVs
# lvmvol <volume_group> <name> <size(bytes)> <layout> [key:value ...]
lvmvol /dev/testvg testlv 1073741824b linear 
lvmvol /dev/testvg testlv2 1073741824b linear 
# Filesystems (only ext2,ext3,ext4,vfat,xfs,reiserfs,btrfs are supported).
# Format: fs <device> <mountpoint> <fstype> [uuid=<uuid>] [label=<label>] [<attributes>]
#fs /dev/mapper/testvg-testlv /media/testfs xfs uuid=7809e5c6-8012-43e2-a1c6-3cdc3d4cfc0e label=  options=rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota
fs /dev/mapper/testvg-testlv2 /home/testfs xfs uuid=2bf30849-24f8-4438-bd20-61b53ccd738d label=  options=rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota

I have not tried to mount it under /backup, should be analogous though.


[Export of Github issue for rear/rear.]