Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take AUTOEXCLUDE_PATH into account in layout doc #3124

Merged
merged 1 commit into from Jan 9, 2024

Conversation

pcahyna
Copy link
Member

@pcahyna pcahyna commented Jan 8, 2024

Relax-and-Recover (ReaR) Pull Request Template

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

Pull Request Details:
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
Copy link
Member Author

pcahyna commented Jan 8, 2024

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.

@pcahyna pcahyna self-assigned this Jan 8, 2024
@pcahyna pcahyna requested a review from a team January 8, 2024 19:43
@@ -131,6 +131,17 @@ multipath disks. Typically, they are part of the SAN disaster recovery
strategy. However, there can be cases where you want to recover them. The
information is retained in +disklayout.conf+.

Some filesystems are excluded from the layout file by default if they
are mounted under a certain path. This behavior is controlled by the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a native English speaker
but I am wondering
if "mounted under a certain path"
or "mounted below a certain path"
is correct English and what makes it more clear
that AUTOEXCLUDE_PATH+=( /mymountpoint )
does not exclude what is mounted diectly at /mymountpoint
but what is mounted at a directory below /mymountpoint ?
Perhaps "mounted underneath a certain path"
could make that obvious?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about "if their mountpoints are located under certain directories" ? This should make clear that the mountpoints are different entities than the "certain directories".

Copy link
Member

@jsmeix jsmeix Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regardless of the particular English wording
the explicit description

Note that if one of the paths is itself a mountpoint,
the filesystem is not excluded. So, if /media is a
mounted filesystem, it will not be excluded, but
if we mount the /dev/mapper/backup-backup filesystem
on /media/backup, it will get excluded, as the mountpoint
is under /media.

makes it very clear for everybody how it behaves.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsmeix I have changed the text according to my suggestion above, and I plan to merge the PR soon today.

Copy link
Member

@jsmeix jsmeix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pcahyna
thank you for updating and improving our documentation!

@jsmeix jsmeix added enhancement Adaptions and new features documentation labels Jan 9, 2024
@jsmeix jsmeix added this to the ReaR v2.8 milestone Jan 9, 2024
Since PR rear#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 pcahyna merged commit 7c6d59c into rear:master Jan 9, 2024
2 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants