Re: [Vchanger-users] 'update slots' missing?!
Brought to you by:
jaybus2
|
From: Steven A. F. <ste...@gm...> - 2022-08-29 15:40:17
|
On 8/29/22 04:07 AM, Marco Gaiarin wrote: > Mandi! Josh Fisher > In chel di` si favelave... > >> Check the following: > > Good point. But... > > root@vipve2:~# ps aux | grep bacula-[s]d > bacula 31927 0.0 0.0 316868 4864 ? Ssl Jul15 43:11 /usr/sbin/bacula-sd -fP -c /etc/bacula/bacula-sd.conf > > root@vipve2:~# id bacula > uid=110(bacula) gid=117(bacula) groups=117(bacula),26(tape) > > root@vipve2:~# ls -la /etc/bacula/bconsole.conf > -rw-r----- 1 root bacula 271 Jul 15 16:06 /etc/bacula/bconsole.conf > > So 'bacula-sd' run as 'bacula' user, that is member of the 'bacula' > group, that have read permissin on bconsole config file. > But (i've catched it!) in logs i got: > > Aug 29 09:36:16: [8987]: filesystem ea70e0c4-8076-4448-9b7e-4bb268a56c18 has udev assigned device /dev/sdc1 > Aug 29 09:36:16: [8987]: filesystem ea70e0c4-8076-4448-9b7e-4bb268a56c18 (device /dev/sdc1) mounted at /mnt/vchanger/ea70e0c4-8076-4448-9b7e-4bb268a56c18 > Aug 29 09:36:16: [8987]: magazine 0 has 10 volumes on /mnt/vchanger/ea70e0c4-8076-4448-9b7e-4bb268a56c18 > Aug 29 09:36:16: [8987]: update slots needed. magazine 0 has 10 volumes, previously had 0 > Aug 29 09:36:16: [8987]: magazine 1 is not mounted > Aug 29 09:36:16: [8987]: magazine 2 is not mounted > Aug 29 09:36:16: [8987]: 10 volumes on magazine 0 assigned slots 1-10 > Aug 29 09:36:16: [8987]: saved state of magazine 0 > Aug 29 09:36:16: [8987]: saved dynamic configuration (max used slot: 10) > Aug 29 09:36:16: [8987]: drive 0 previously unloaded > Aug 29 09:36:16: [8987]: ==== preforming REFRESH command > Aug 29 09:36:16: [8987]: running '/usr/sbin/bconsole -n -u 30' > Aug 29 09:36:16: [8987]: popen: child stdin uses pipe (4 -> 5) > Aug 29 09:36:16: [8987]: popen: child stdout uses pipe (6 -> 7) > Aug 29 09:36:16: [8987]: popen: forking now > Aug 29 09:36:16: [8987]: popen: parent closing pipe ends 4,7,-1 used by child > Aug 29 09:36:16: [8987]: popen: parent writes child's stdin to 5 > Aug 29 09:36:16: [8987]: popen: parent reads child's stdout from 6 > Aug 29 09:36:16: [8987]: popen: parent returning pid=8988 of child > Aug 29 09:36:16: [8987]: sending bconsole command 'update slots storage="VIPVE2RDX" drive="0"' > Aug 29 09:36:16: [8988]: popen: child closing pipe ends 5,6,-1 used by parent > Aug 29 09:36:16: [8988]: popen: child will read stdin from 4 > Aug 29 09:36:16: [8988]: popen: child will write stdout to 7 > Aug 29 09:36:16: [8988]: popen: child executing '/usr/sbin/bconsole' > Aug 29 09:36:16: [8987]: bconsole: exited with rc=1 > Aug 29 09:36:16: [8987]: WARNING! 'update slots' needed in bconsole > Aug 29 09:36:16: [8987]: bconsole update slots command success > > Could be that, by debian policy, service account mostly have invalid > shells? If you look at /etc/password, you will see that the shell is set to "nologin", so you are correct that there is no shell for the bacula account. $ grep bacula /etc/passwd bacula:x:133:133:Bacula Backup System:/var/spool/bacula:/sbin/nologin On my vchanger system, the config file permissions are set to: # ls -la /etc/bacula total 64 drwxr-xr-x 2 root root 4096 Aug 27 12:25 ./ drwxr-xr-x. 237 root root 16384 Aug 29 11:27 ../ -rw-r----- 1 bacula bacula 20451 Aug 27 11:18 bacula-dir.conf -rw-r----- 1 root root 1104 May 17 13:25 bacula-fd.conf -rw-r----- 1 bacula tape 3127 May 17 13:28 bacula-sd.conf -rw-r----- 1 root root 712 Jul 2 11:01 bacula-tray-monitor.conf -rw-r----- 1 bacula tape 280 Jul 2 11:00 bat.conf -rw-r----- 1 bacula tape 278 Jul 2 10:59 bconsole.conf -rw-r----- 1 root bacula 429 Sep 26 2021 query.sql Here are the user and group for the various bacula processes: $ ps -fe | grep bacula root 1983 1 0 Aug25 ? 00:18:54 /usr/sbin/bacula-fd -f -c /etc/bacula/bacula-fd.conf -u root -g root bacula 1984 1 1 Aug25 ? 01:11:26 /usr/sbin/bacula-sd -f -c /etc/bacula/bacula-sd.conf -u bacula -g tape bacula 341948 1 0 Aug27 ? 00:00:02 /usr/sbin/bacula-dir -f -c /etc/bacula/bacula-dir.conf -u bacula -g bacula Are your permissions similar? Steve > > eg: > > root@vipve2:~# echo 'update slots storage="VIPVE2RDX" drive="0"' | su bacula -c '/usr/sbin/bconsole -n -u 30' > This account is currently not available. > > root@vipve2:~# echo 'update slots storage="VIPVE2RDX" drive="0"' | su bacula -s /bin/sh -c '/usr/sbin/bconsole -n -u 30' > Connecting to Director bacula.lnf.it:9101 > 1000 OK: 103 lnfbacula-dir Version: 9.4.2 (04 February 2019) > Enter a period to cancel a command. > update slots storage="VIPVE2RDX" drive="0" > Automatically selected Catalog: BaculaLNF > Using Catalog "BaculaLNF" > Connecting to Storage daemon VIPVE2RDX at vipve2.vi.lnf.it:9103 ... > 3306 Issuing autochanger "slots" command. > Device "RDXAutochanger" has 10 slots. > Connecting to Storage daemon VIPVE2RDX at vipve2.vi.lnf.it:9103 ... > 3306 Issuing autochanger "list" command. > Catalog record for Volume "VIPVE2RDX_0000_0000" updated to reference slot 1. > Catalog record for Volume "VIPVE2RDX_0000_0001" updated to reference slot 2. > Catalog record for Volume "VIPVE2RDX_0000_0002" updated to reference slot 3. > Catalog record for Volume "VIPVE2RDX_0000_0003" updated to reference slot 4. > Catalog record for Volume "VIPVE2RDX_0000_0004" updated to reference slot 5. > Catalog record for Volume "VIPVE2RDX_0000_0005" updated to reference slot 6. > Catalog record for Volume "VIPVE2RDX_0000_0006" updated to reference slot 7. > Catalog record for Volume "VIPVE2RDX_0000_0007" updated to reference slot 8. > Catalog record for Volume "VIPVE2RDX_0000_0008" updated to reference slot 9. > Catalog record for Volume "VIPVE2RDX_0000_0009" updated to reference slot 10. > > Note that seems there's no permission problem. > > > > _______________________________________________ > Vchanger-users mailing list > Vch...@li... > https://lists.sourceforge.net/lists/listinfo/vchanger-users |