vmware / photon

Minimal Linux container host
https://vmware.github.io/photon
Other
3.05k stars 697 forks source link

Veeam don't detect mlocate #1075

Open t3easy opened 3 years ago

t3easy commented 3 years ago

I have two photon 3 vms. Both with the same packages installed. Both with mlocate installed. One vm gets indexed by Veeam, the other always says "Failed to index guest file system. mlocate was not found." The only difference is the install date. The one I installed earlier works, the newer not. Any ideas what could be the problem that Veeam don't detect mlocate correctly?

bjornbouetsmith commented 3 years ago

Got the exact same issue - so any solution to this would be nice.

t3easy commented 3 years ago

I have not found one since I created the issue, sorry.

bjornbouetsmith commented 3 years ago

I have not found one since I created the issue, sorry.

Well it might not be photon os that is to blame - it could be veeam.

t3easy commented 3 years ago

Strange is, that one vm is indexed without any problems. All have the same packages in the same versions installed. Like I've written, the only difference is, the working vm was deployed with an older version of the ova some month earlier than the vms having problems.

ssahani commented 3 years ago

It seems like while installing the veem it try to figure out if mlocate is not installed or not. Probably reinstalling veem fix the issue.

bjornbouetsmith commented 3 years ago

It seems like while installing the veem it try to figure out if mlocate is not installed or not. Probably reinstalling veem fix the issue.

I doubt that - since how would you be able to add new VM's to backup if it only happened under installation of veeam?

t3easy commented 3 years ago

Veeam don't install any agent on the VMs. On Linux VMs it checks for mlocate, tar and gzip on every backup and index the filesystem for single file restore if it finds all required tools. https://helpcenter.veeam.com/docs/backup/em/em_preparing_for_linux_guest_file.html?ver=100 I don't know how it checks if the tools are installed.

t3easy commented 3 years ago

(I just deployed a 4.0 RC VM from the OVA with virtual hardware v13 (UEFI Secure Boot) today, installed the required tools and check tomorrow if Veeam can detect mlocate)

bjornbouetsmith commented 3 years ago

I don't know how it checks if the tools are installed.

Probably not in a very good way, since it fails to detect it consistently

ssahani commented 3 years ago

It seems like while installing the veem it try to figure out if mlocate is not installed or not. Probably reinstalling veem fix the issue.

I doubt that - since how would you be able to add new VM's to backup if it only happened under installation of veeam?

Any way it does not seem to me photon issue since command line works. You should raise a bz at veem.

t3easy commented 3 years ago

Same for Photon OS 4.0 RC. Veeam don't detect mlocate and the filesystem is not indexed. I'll open an issue at Veeam and report back here. Please let this issue open :)

t3easy commented 3 years ago

The veeam support reported back: They check with updatedb -V if mlocate is installed. But Photon OS minimal has findutils installed by default and that has the binary /usr/bin/updatedb

Extract from the log:

Zeile 9288: [16.02.2021 22:06:01] <61> Fehler bei updatedb: ungültige Option -V
Zeile 9289: [16.02.2021 22:06:01] <61> Fehler Usage: /usr/bin/updatedb [--findoptions='-option1 -option2...']
Zeile 9290: [16.02.2021 22:06:01] <61> Fehler [--localpaths='dir1 dir2...'] [--netpaths='dir1 dir2...']
Zeile 9291: [16.02.2021 22:06:01] <61> Fehler [--prunepaths='dir1 dir2...'] [--prunefs='fs1 fs2...']
Zeile 9292: [16.02.2021 22:06:01] <61> Fehler [--output=dbfile] [--netuser=user] [--localuser=user]
Zeile 9293: [16.02.2021 22:06:01] <61> Fehler [--old-format] [--dbformat] [--version] [--help]
Zeile 9294: [16.02.2021 22:06:01] <61> Fehler Fehlerbericht an <bug-findutils@gnu.org>.
t3easy commented 3 years ago

On Ubuntu for example, its handled like this:

in /usr/bin/

lrwxrwxrwx  1 root root           26 Jun  1  2016 updatedb -> /etc/alternatives/updatedb
-rwxr-xr-x  1 root root        43768 Nov 18  2014 updatedb.mlocate

in /etc/alternatives/

lrwxrwxrwx  1 root root   25 Jun  1  2016 updatedb -> /usr/bin/updatedb.mlocate

In Photon OS I now moved /usr/bin/updatedb to /usr/bin/updatedb.fileutils and symlinked /usr/bin/updatedb.mlocate to /usr/bin/updatedb.

running updatedb now throws an error:

updatedb: kann Gruppe `mlocate' nicht finden

Seems like the mlocate package don't create the mlocate group, so I had to add the group manually.

groupadd mlocate

Now indexing works fine. But this is not what I would expect to be necessary.

t3easy commented 3 years ago

(Still strange is, that one VM works without the steps mentioned above. This VM was installed earlier and is in the DMZ.)

ssahani commented 3 years ago
Zeile 9288: [16.02.2021 22:06:01] <61> Fehler bei updatedb: ungültige Option -V
Zeile 9289: [16.02.2021 22:06:01] <61> Fehler Usage: /usr/bin/updatedb [--findoptions='-option1 -option2...']
Zeile 9290: [16.02.2021 22:06:01] <61> Fehler [--localpaths='dir1 dir2...'] [--netpaths='dir1 dir2...']
Zeile 9291: [16.02.2021 22:06:01] <61> Fehler [--prunepaths='dir1 dir2...'] [--prunefs='fs1 fs2...']
Zeile 9292: [16.02.2021 22:06:01] <61> Fehler [--output=dbfile] [--netuser=user] [--localuser=user]
Zeile 9293: [16.02.2021 22:06:01] <61> Fehler [--old-format] [--dbformat] [--version] [--help]

It seems to me german. From the above logs translating Deutsch(german) -> english with updatedb: invalid option

❯ updatedb --help
Usage: /bin/updatedb [--findoptions='-option1 -option2...']
       [--localpaths='dir1 dir2...'] [--netpaths='dir1 dir2...']
       [--prunepaths='dir1 dir2...'] [--prunefs='fs1 fs2...']
       [--output=dbfile] [--netuser=user] [--localuser=user]
       [--dbformat] [--version] [--help]

It should be ❯ updatedb --version

updatedb: kann Gruppe `mlocate' nicht finden Seems like the mlocate package don't create the mlocate group, so I had to add the group manually.

I looked in the source code . I could not find what is mlocate group is used here. Fedora group added is slocate .

t3easy commented 3 years ago

Yes, sorry i installed german localization in Photon OS thats why the errors are in german, I'll translate them next time or change the locale before.

The updatedb.mlocate accepts the -V parameter and Veeam tests with this parameter if updatedb is a mlocate binary.

If you install mlocate and run updatedb.mlocate you'll get an error like "group mlocate not found".

t3easy commented 3 years ago

@bjornbouetsmith Did you test my workaround?

In Photon OS I now moved /usr/bin/updatedb to /usr/bin/updatedb.fileutils and symlinked /usr/bin/updatedb.mlocate to /usr/bin/updatedb.

running updatedb now throws an error:

updatedb: can not find group mlocate

Seems like the mlocate package don't create the mlocate group, so I had to add the group manually.

groupadd mlocate Now indexing works fine. But this is not what I would expect to be necessary.

elekgeek commented 3 years ago

Thank you @t3easy for pointing me out to this thread, I spent the last night trying to figure out what's going on, I opened a case with Veeam, no answers yet, but I read this thread carefully, and it seems that Veeam should be using updatedb.mlocate -V rather than locate -V.

I just moved mv /usr/bin/updatedb to /etc/alternatives and ln -s /usr/bin/updatedb.mlocate /usr/bin/updatedb so indexing works now :)

I will report this to Veeam people once they reply to my ticket.

Thanks!

t3easy commented 3 years ago

@elekgeek Already had an issue open at Veeam with no luck. Just got the answer: will forward info to developers...

elekgeek commented 3 years ago

@t3easy One of the things that puzzle me is that I have a lot of linux machines, never had issues indexing them, but vcenter has been always the PITA machine. I looked at these linux machines and mlocate is not even installed :) Try updatedb -V on other linux machines and it will for sure behave exactly the same as on PhotonOS, so why veeam is expecting mlocate on vCenter only!?

denser commented 2 years ago

I had same thing but after update Ubuntu 20.04 to 22.04. On 22.04 "mlocate not found", meanwhile

root@mysql3:~# updatedb --version
updatedb (plocate) 1.1.15
Copyright (C) 2007 Red Hat, Inc. All rights reserved.
This software is distributed under the GPL v.2.

This program is provided with NO WARRANTY, to the extent permitted by law.
root@mysql3:~# updatedb -V
updatedb (plocate) 1.1.15
Copyright (C) 2007 Red Hat, Inc. All rights reserved.
This software is distributed under the GPL v.2.

This program is provided with NO WARRANTY, to the extent permitted by law.

Most linux vm in Ubuntu 20.04 - indexing fine.

apt install locate

on 22.04... not even clue in logs or manuals.

strakerpj commented 1 year ago

From what I understand this issue is caused by mlocate being replaced with plocate and from other Veeam forum posts, it was confirmed that the Veeam code does a check for the mlocate version when testing index functionality. Because it has been renamed to plocate this check fails. Currently I have no indexing on v11 because of this and was really hoping v12 would fix it as it has been reported multiple times. Is Veeam able to confirm that v12 has addressed this issue?