#2878 PR merged: Exclusions for Veritas

Labels: enhancement, fixed / solved / done

fadamo opened issue at 2022-10-06 10:42:

Added 2 exclusions to avoid errors when Veritas sw is installed

Pull Request Details:
  • Type: Enhancement

  • Impact: Normal

  • Reference to related issue (URL):

  • How was this pull request tested?
    On our servers

  • Brief description of the changes in this pull request:
    Excluded 2 special paths under /dev

jsmeix commented at 2022-10-06 11:26:

@fadamo
I know nothing about Veritas and I guess most others also don't
so we need some explanatory background information
what errors happen when "Veritas sw" is installed and
why they are avoided by excluding dev/vx and dev/dmpconfig
(I have no idea what dev/vx and dev/dmpconfig do).

See the comments in default.conf at COPY_AS_IS_EXCLUDE
that at least briefly tell why something is excluded
by default so other users can see and understand
what each of the exclusions is about and why it is there,
cf. "Code must be easy to understand (answer the WHY)" in
https://github.com/rear/rear/wiki/Coding-Style

I searched the ReaR code and documentation for Veritas
and found only

usr/share/rear/conf/default.conf:
# BACKUP=NBU (Symantec/Veritas NetBackup)

doc/user-guide/10-integrating-external-backup.adoc:
    default.conf:# BACKUP=NBU stuff (Symantec/Veritas NetBackup)

Is the "Veritas sw" you mention in your
https://github.com/rear/rear/pull/2878#issue-1399331342
that "Symantec/Veritas NetBackup"
or is "Veritas sw" some different software?

When "Veritas sw" is "Symantec/Veritas NetBackup"
then I think those exclusions should be better implemented
not as general exclusion but as specific exclusion
only when BACKUP=NBU is used - i.e. in COPY_AS_IS_EXCLUDE_NBU
which gets added to the generic COPY_AS_IS_EXCLUDE in
usr/share/rear/prep/NBU/default/400_prep_nbu.sh via

COPY_AS_IS_EXCLUDE+=( "${COPY_AS_IS_EXCLUDE_NBU[@]}" )

so the end result is the same but this way it is more clear
that those exclusions are not generic but belong to BACKUP=NBU.

fadamo commented at 2022-10-06 12:42:

Sorry, I was too concise.
With Veritas software I meant (in our case) Veritas File System and Veritas Cluster:

# rpm -qa | grep VRTS
VRTScps-7.4.1.0000-RHEL7.x86_64
VRTSllt-7.4.1.2800-RHEL7.x86_64
VRTSdbac-7.4.1.2800-RHEL7.x86_64
VRTSspt-7.4.1.000-RHEL7.noarch
VRTScavf-7.4.1.0000-GENERIC.x86_64
VRTSinformix-7.0.1.0-GENERIC.noarch
VRTSvxvm-7.4.1.2800-RHEL7.x86_64
VRTSvcsag-7.4.1.2800-RHEL7.x86_64
VRTSveki-7.4.1.0000-RHEL7.x86_64
VRTSgms-7.4.1.0000-RHEL7.x86_64
VRTSvxfen-7.4.1.2800-RHEL7.x86_64
VRTSsfmh-7.4.0.801-0.x86_64
VRTSpython-3.6.6.1-RHEL7.x86_64
VRTSdbed-7.4.1.0000-RHEL.x86_64
VRTSvxfs-7.4.1.2800-RHEL7.x86_64
VRTSamf-7.4.1.2800-RHEL7.x86_64
VRTSodm-7.4.1.2800-RHEL7.x86_64
VRTSacclib-7.0.3.0-GENERIC.noarch
VRTSvcswiz-7.4.1.0000-RHEL7.x86_64
VRTSvlic-4.01.74.005-RHEL7.x86_64
VRTSvcs-7.4.1.2800-RHEL7.x86_64
VRTSgab-7.4.1.2800-RHEL7.x86_64
VRTSsfcpi-7.4.1.2800-GENERIC.noarch
VRTSperl-5.26.1.1-RHEL7.x86_64
VRTSfsadv-7.4.1.0000-RHEL7.x86_64
VRTSvcsea-7.4.1.0000-RHEL7.x86_64
VRTSvbs-7.4.1.0000-GA_Linux.x86_64
VRTSaslapm-7.4.1.2800-RHEL7.x86_64
VRTSglm-7.4.1.2800-RHEL7.x86_64

Some modules gets loaded into the kernel:

# lsmod  | grep vx
vxfen                 385648  3
vxspec                 13261  14
vxio                 5472648  2 vxspec
vxdmp                 534773  23
vxcafs                135707  0
vxportal               13254  0
vxfs                 4332467  5 fdd,vxportal,vxcafs
veki                   19214  15 amf,gab,llt,vxfs,vxio,dmpaa,dmpap,vxdmp,vxfen,dmpalua,dmpjbod,vxportal,dmpsvc,vxspec

and generate some special nodes in /dev.
This special nodes are unreadble:

# rsync -aH /dev/ /tmp/test/
rsync: mknod "/tmp/test/dmpconfig" failed: Invalid argument (22)
rsync: mknod "/tmp/test/vx/dmpconfig" failed: Invalid argument (22)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1179) [sender=3.1.2]

jsmeix commented at 2022-10-06 12:49:

Ah!
As it seems RHEL specific software is involved,
I better also assign @pcahyna to this issue.

fadamo commented at 2022-10-06 12:49:

I found something to read:

https://access.redhat.com/solutions/3214491

jsmeix commented at 2022-10-06 12:54:

@fadamo
thank you for the link.

Only the initial parts are public readable up to

ReaR backup fails on Veritas Filesystem with Error:
"Failed to copy files and directories
 in COPY_AS_IS minus COPY_AS_IS_EXCLUDE"

Issue
    ReaR backup fails on Veritas filesystem.

# rear -d -D mkbackup
Relax-and-Recover 1.17.2 / Git
...
Copying files and directories
ERROR: Could not copy files and directories
...

.
.
.

Environment
    Red Hat Enterprise Linux (RHEL)
    Veritas Filesystem (VxFS)

Subscriber exclusive content
A Red Hat subscription provides unlimited access
to our knowledgebase, tools, and much more.
...
Log in for full access

but that is enough to see what the issue is.

fadamo commented at 2022-10-06 12:55:

Ah! As it seems RHEL specific software is involved, I better also assign @pcahyna to this issue.

vxdmp.ko is provided by Veritas, not by RH:

# rpm -qf /etc/vx/kernel/vxdmp.ko.3.10.0-1127.el7.x86_64
VRTSvxvm-7.4.1.2800-RHEL7.x86_64

# rpm -qi VRTSvxvm
Name        : VRTSvxvm
Version     : 7.4.1.2800
Release     : RHEL7
Architecture: x86_64
Install Date: Tue 02 Feb 2021 03:08:50 PM CET
Group       : Applications/System
Size        : 1512141433
License     : Veritas Proprietary
Signature   : RSA/SHA1, Wed 25 Nov 2020 06:43:07 PM CET, Key ID 4e84af75cc633953
Source RPM  : VRTSvxvm-7.4.1.2800-RHEL7.src.rpm
Build Date  : Mon 23 Nov 2020 10:00:16 AM CET
Build Host  : vxvmpunrhel7bld1.vxindia.veritas.com
Relocations : (not relocatable)
Packager    : enterprise_technical_support@veritas.com
Vendor      : Veritas Technologies LLC
URL         : www.veritas.com/support
Summary     : Veritas Volume Manager
Description :
Veritas Volume Manager for Linux

fadamo commented at 2022-10-06 12:58:

@fadamo thank you for the link.

Only the initial parts are public readable up to

Environment
    Red Hat Enterprise Linux (RHEL)
    Veritas Filesystem (VxFS)

Subscriber exclusive content
A Red Hat subscription provides unlimited access
to our knowledgebase, tools, and much more.
...
Log in for full access

but that is enough to see what the issue is.

RH_solution_3214491

jsmeix commented at 2022-10-06 13:04:

@fadamo
thank you even more for also posting the Red Hat solution!

I had assumed those RPMs are from Veritas and not from Red Hat
which is why I also assigned it to @pcahyna (in addition to me).

jsmeix commented at 2022-10-06 13:34:

On first glance the Red Hat solution looks unexpected

/dev/vx/* /dev/dmpconfig/* /dev/dmpconfig /dev/vx/dmpconfig

because it seems it does not match your exclusion list

dev/vx dev/dmpconfig

The problem is that the entries in COPY_AS_IS_EXCLUDE
are written into a copy_as_is_exclude_file that is used by

... tar ... -X $copy_as_is_exclude_file ...

in usr/share/rear/build/GNU/Linux/100_copy_as_is.sh
so the patterns in COPY_AS_IS_EXCLUDE are 'tar' patterns
which could behave a bit special (at least sometimes).

Perhaps dev/vx might accidentally exclude more than intended,
e.g. also things like home/lebedev/vxyz or similar
(I cannot keep 'tar' pattern matching behaviour in my mind)
cf. https://en.wikipedia.org/wiki/Evgeny_Lebedev
;-)

fadamo commented at 2022-10-06 13:52:

On first glance the Red Hat solution looks unexpected

/dev/vx/* /dev/dmpconfig/* /dev/dmpconfig /dev/vx/dmpconfig

because it seems it does not match your exclusion list

dev/vx dev/dmpconfig

The problem is that the entries in COPY_AS_IS_EXCLUDE are written into a copy_as_is_exclude_file that is used by

... tar ... -X $copy_as_is_exclude_file ...

in usr/share/rear/build/GNU/Linux/100_copy_as_is.sh so the patterns in COPY_AS_IS_EXCLUDE are 'tar' patterns which could behave a bit special (at least sometimes).

Perhaps dev/vx might accidentally exclude more than intended, e.g. also things like home/lebedev/vxyz or similar (I cannot keep 'tar' pattern matching behaviour in my mind) cf. https://en.wikipedia.org/wiki/Evgeny_Lebedev ;-)

yes, my exclusions are a bit different from RH ones because I found the RH solution only today.
Actually I'm using

COPY_AS_IS_EXCLUDE=(
"${COPY_AS_IS_EXCLUDE[@]}"
/dev/vx
/dev/dmpconfig
)

In my 1st comment I omitted the initial / because I have seen all the others exlcusions without it:

# grep COPY_AS_IS_EXCLUDE= /usr/share/rear/conf/default.conf
COPY_AS_IS_EXCLUDE=( dev/shm dev/shm/\* dev/oracleasm dev/mapper dev/.udev $VAR_DIR/output/\* )

but now I think we could and should keep it.
IMO you can use the exclusions suggested by RH, they should work properly.

github-actions commented at 2022-12-06 02:32:

Stale pull request message

github-actions commented at 2023-02-07 02:29:

Stale pull request message

schlomo commented at 2023-02-22 21:23:

@jsmeix about your concern of the pattern matching too much, I was also wondering why the exclude patterns don't start with / to be rooted at /. Especially relevant as stuff like $VAR_DIR is of course /var/... and starts from /.

If nobody has an idea why we should omit the leading / on those patterns I'd strongly suggest to require all default patterns to start from /

Otherwise of course we are happy to add useful defaults that won't harm anybody

schlomo commented at 2023-04-23 09:09:

Thanks a lot @fadamo for your contribution to make ReaR more useful for users with Veritas Cluster Filesystem


[Export of Github issue for rear/rear.]