Beiträge von mcgyver83
-
-
Hi,
I'm using remote mount plugin to access a smb share exposed by my router with an external usb hdd.I have also 2 usb hdd attached to my raspberry pi2 running omv 4.
So I have:
- local usb drive- backup usb drive
- remote share
Using remote mount, I have a folder in /srv/2301d0e4-a1b6-41ff-9a44-37dd37feebcb that is the exposed share.
In this folder (and subfolder) all files/folder are root:root
I'm executing a rsync script to mirror some folders on the backup usb drive and after from the backup to the remote share folder.
When I run rsync to mirror to backup usb drive all is fine.I'm running this command:
Codersync -avz --delete --progress --log-file='/home/pi/test.log' /home/pi/local_drive/test_rsync /home/pi/backup_drive
And I have these logs
Code
Alles anzeigenFirst run to mirror on backup usb drive 2020/03/19 22:14:26 [16000] building file list 2020/03/19 22:14:26 [16000] cd+++++++++ test_rsync/ 2020/03/19 22:14:26 [16000] cd+++++++++ test_rsync/prova/ 2020/03/19 22:14:26 [16000] >f+++++++++ test_rsync/prova/my_10mb_file 2020/03/19 22:14:26 [16000] >f+++++++++ test_rsync/prova/pippo.txt 2020/03/19 22:14:26 [16000] >f+++++++++ test_rsync/prova/pluto.log 2020/03/19 22:14:26 [16000] sent 10,488,623 bytes received 85 bytes 20,977,416.00 bytes/sec 2020/03/19 22:14:26 [16000] total size is 10,485,760 speedup is 1.00 Second run is "empty" due the fact that I just mirrored the folder with the first run 2020/03/19 22:19:05 [18138] building file list 2020/03/19 22:19:05 [18138] sent 180 bytes received 18 bytes 396.00 bytes/sec 2020/03/19 22:19:05 [18138] total size is 10,485,760 speedup is 52,958.38
All fine, the first run sent 10Mbyte, the second run 0.
If I run the same command against remote mount share
Codesudo rsync -av --delete --progress --log-file='/home/pi/test.log' /home/pi/local_drive/test_rsync /srv/2301d0e4-a1b6-41ff-9a44-37dd37feebcb/rsync
I end with these logs:
Code
Alles anzeigenFirst run to mirror on remote drive 2020/03/19 22:23:32 [20077] building file list 2020/03/19 22:23:33 [20077] cd+++++++++ test_rsync/ 2020/03/19 22:23:33 [20077] cd+++++++++ test_rsync/prova/ 2020/03/19 22:23:33 [20077] >f+++++++++ test_rsync/prova/my_10mb_file 2020/03/19 22:23:33 [20077] >f+++++++++ test_rsync/prova/pippo.txt 2020/03/19 22:23:33 [20077] >f+++++++++ test_rsync/prova/pluto.log 2020/03/19 22:23:36 [20077] sent 10,488,623 bytes received 85 bytes 2,330,824.00 bytes/sec 2020/03/19 22:23:36 [20077] total size is 10,485,760 speedup is 1.00 Second run 2020/03/19 22:24:42 [20527] building file list 2020/03/19 22:24:42 [20527] .d...pog... test_rsync/ 2020/03/19 22:24:42 [20527] .d..tpog... test_rsync/prova/ 2020/03/19 22:24:42 [20527] >f..tpog... test_rsync/prova/my_10mb_file 2020/03/19 22:24:44 [20527] sent 10,488,551 bytes received 53 bytes 4,195,441.60 bytes/sec 2020/03/19 22:24:44 [20527] total size is 10,485,760 speedup is 1.00
As you can see in the above log rsync still transfer 10Mb of data despite of I already mirrored the folders.
Any hints? -
Many thanks.
Was easier than I thought.
Thanks -
Hi all, I added some custom rsync jobs and script that log in /var/log folder.
How can I add also these logs files to rolling log file configuration?
I mean somewhere there is configured a max size for log and I can see that they are automatically rolled -
Hi, again on this topic
How can I setup log rotation and retention for all logs in /var/log folder? -
Hi, I wrote a simple bash script that checks my ip, verify if it is the same of the one written in a .txt file, if yes exits otherwise it update the ip address in the .txt file and sends me an email.
What happen is that I receive the mail and others 2 email from OMV with subject "Mail Delivery Status Report" and body
CodeThis is the mail system at host raspberrypi.localdomain. Enclosed is the mail delivery report that you requested.
Why?
How could I avoid to receive delivery status report? -
Currently I changed the command to run a script stored in the router hdd via full path (so if router isn't connected no command execution).
Do you see any advantages in your approach (cd into folder and then run the script)?
-
I removed the backup folder that shouldn't be on the sdcard.
I checked rsync script but I'm not addressing directly anything in /srv/
I have to check remote shared folder setting -
I mounted the microSD card on a live linux using virtualBox.
This is DiskUsage reportBut Gparted says
Update:
probably I got it./srv folder is full of file, 25GB...
Now I have to understand why. I have a usb drive plugged into the router and each night a made an rsync backup to it.
I'm using /srv/xxxx path as destination for rsync and if the drive isn't available due router issue it is writing into the sd card -
Sorry to come back with the same problem but I still have a full mmcblk02p file system
Code
Alles anzeigensudo du -d1 -h -x / | sort -h 4.0K /config 4.0K /export 4.0K /media 4.0K /mnt 4.0K /plex_transcode 4.0K /selinux 8.0K /sharedfolders 16K /lost+found 20K /srv 9.0M /bin 9.4M /etc 11M /sbin 32M /opt 53M /root 178M /lib 778M /home 1.6G /usr 2.2G /var 4.7G /
I have root (/) usage for 4,7GB but OMV says 29 ?
-
Great.
works fine now!Many many many thanks
I tried a bunch of times to study rsyslog configuration but is really hard
-
Sorry, you're right.
I'm looking for router hostname in the webGui...
Could I use the ip address? -
-
I changed conf files addig 10_ and 20_ but this is what happens when I log into router webGui
Code
Alles anzeigen==> /var/log/router.log <== Dec 28 18:30:01 raspberrypi CRON[13375]: (root) CMD (for i in `pgrep "ftpd|nfsiod|smbd|afpd|cnid"` ; do ionice -c1 -p $i ; done >/dev/null 2>&1) Dec 28 18:30:02 raspberrypi CRON[13371]: pam_unix(cron:session): session closed for user root Message from syslogd@gateway at Dec 28 18:30:02 ... kernel: [SysLog]: [Admin login] from source 192.168.0.13, ==> /var/log/user.log <== Dec 28 18:30:01 gateway kernel: [SysLog]: [Admin login] from source 192.168.0.13, Dec 28 18:30:01 gateway syslog: [Admin login] from source 192.168.0.13, ==> /var/log/syslog <== Dec 28 18:30:01 gateway kernel: [SysLog]: [Admin login] from source 192.168.0.13, Dec 28 18:30:01 gateway syslog: [Admin login] from source 192.168.0.13, ==> /var/log/messages <== Dec 28 18:30:01 gateway syslog: [Admin login] from source 192.168.0.13, Message from syslogd@gateway at Dec 28 18:30:03 ... kernel: [SysLog]: [Admin login] from source 192.168.0.13, ==> /var/log/user.log <== Dec 28 18:30:02 gateway kernel: [SysLog]: [Admin login] from source 192.168.0.13, Dec 28 18:30:02 gateway syslog: [Admin login] from source 192.168.0.13, ==> /var/log/syslog <== Dec 28 18:30:02 gateway kernel: [SysLog]: [Admin login] from source 192.168.0.13, Dec 28 18:30:02 gateway syslog: [Admin login] from source 192.168.0.13, ==> /var/log/messages <== Dec 28 18:30:02 gateway syslog: [Admin login] from source 192.168.0.13, Message from syslogd@gateway at Dec 28 18:30:11 ... kernel: [SysLog]: [DHCP IP: (192.168.0.51)] to MAC address AA:BB:CC:2E:97:E3, ==> /var/log/user.log <== Dec 28 18:30:10 gateway kernel: [SysLog]: [DHCP IP: (192.168.0.51)] to MAC address AA:BB:CC:2E:97:E3, ==> /var/log/syslog <== Dec 28 18:30:10 gateway kernel: [SysLog]: [DHCP IP: (192.168.0.51)] to MAC address AA:BB:CC:2E:97:E3, ==> /var/log/router.log <== Dec 28 18:30:12 raspberrypi monit[1339]: Device /srv/abcdef7feebcb not found in /etc/mtab Dec 28 18:30:12 raspberrypi monit[1339]: 'mountpoint_srv_abcdfeea44-37dd37feebcb' status failed (1) -- mountpoint: /srv/asdsadffff-9a44-37dd37feebcb: Not a directory Message from syslogd@gateway at Dec 28 18:30:13 ... kernel: [SysLog]: [DHCP IP: (192.168.0.52)] to MAC address AA:BB:CC:2E:98:EB, ==> /var/log/user.log <== Dec 28 18:30:12 gateway kernel: [SysLog]: [DHCP IP: (192.168.0.52)] to MAC address AA:BB:CC:2E:98:EB, ==> /var/log/syslog <== Dec 28 18:30:12 gateway kernel: [SysLog]: [DHCP IP: (192.168.0.52)] to MAC address AA:BB:CC:2E:98:EB,
As you can see the router message is written in more filesAnd in router.log I have lines not coming from router
Code
Alles anzeigen==> /var/log/router.log <== Dec 28 18:31:44 raspberrypi monit[1339]: Device /srv/2301d0e4-a1b6-41ff-9a44-37dd37feebcb not found in /etc/mtab Dec 28 18:31:44 raspberrypi monit[1339]: 'mountpoint_srv_2301d0e4-a1b6-41ff-9a44-37dd37feebcb' status failed (1) -- mountpoint: /srv/2301d0e4-a1b6-41ff-9a44-37dd37feebcb: Not a directory Dec 28 18:32:01 raspberrypi CRON[14191]: pam_unix(cron:session): session opened for user root by (uid=0) Dec 28 18:32:01 raspberrypi CRON[14195]: (root) CMD (for i in `pgrep "ftpd|nfsiod|smbd|afpd|cnid"` ; do ionice -c1 -p $i ; done >/dev/null 2>&1) Dec 28 18:32:01 raspberrypi CRON[14191]: pam_unix(cron:session): session closed for user root Dec 28 18:32:14 raspberrypi monit[1339]: Device /srv/2301d0e4-a1b6-41ff-9a44-37dd37feebcb not found in /etc/mtab Dec 28 18:32:14 raspberrypi monit[1339]: 'mountpoint_srv_2301d0e4-a1b6-41ff-9a44-37dd37feebcb' status failed (1) -- mountpoint: /srv/2301d0e4-a1b6-41ff-9a44-37dd37feebcb: Not a directory Dec 28 18:32:45 raspberrypi monit[1339]: Device /srv/2301d0e4-a1b6-41ff-9a44-37dd37feebcb not found in /etc/mtab Dec 28 18:32:45 raspberrypi monit[1339]: 'mountpoint_srv_2301d0e4-a1b6-41ff-9a44-37dd37feebcb' status failed (1) -- mountpoint: /srv/2301d0e4-a1b6-41ff-9a44-37dd37feebcb: Not a directory Dec 28 18:33:01 raspberrypi CRON[14539]: pam_unix(cron:session): session opened for user root by (uid=0) Dec 28 18:33:01 raspberrypi CRON[14543]: (root) CMD (for i in `pgrep "ftpd|nfsiod|smbd|afpd|cnid"` ; do ionice -c1 -p $i ; done >/dev/null 2>&1) Dec 28 18:33:01 raspberrypi CRON[14539]: pam_unix(cron:session): session closed for user root
-
is the correct path, right?
With these 2 settings now I have these lines in router.log
CodeDec 28 16:24:01 raspberrypi CRON[387]: pam_unix(cron:session): session opened for user root by (uid=0) Dec 28 16:24:01 raspberrypi CRON[392]: (root) CMD (for i in `pgrep "ftpd|nfsiod|smbd|afpd|cnid"` ; do ionice -c1 -p $i ; done >/dev/null 2>&1) Dec 28 16:24:01 raspberrypi CRON[387]: pam_unix(cron:session): session closed for user root Dec 28 16:24:28 raspberrypi sshd[481]: Accepted publickey for pi from 192.168.0.13 port 54127 ssh2: RSA SHA256:CJSxNfqs71QD0lRZzN9S11Kg66l7Q8huW5OOr0EBxFE Dec 28 16:24:28 raspberrypi sshd[481]: pam_unix(sshd:session): session opened for user pi by (uid=0) Dec 28 16:24:28 raspberrypi systemd-logind[810]: New session c8 of user pi. Dec 28 16:24:28 raspberrypi systemd[1]: Started Session c8 of user pi.
My desire is to have router log lines only in router.log file but now I have others log lines in router.log
-
Great!!! thanks!
How can I put these messages in a log file named router.log?
-
Hi, I'm running omv 4 on a raspberry. My router can send log to syslog server.
Checking logs in router gui is not so comfortable so I'm thinking of sending log to OMV instance to analyse them easily.Do I need some config on omv? Or just set "Send to this Syslog server IP address" in the router admin page?
-
Hi,
I'm running OMV on a raspberry pi.
I tested an image of RecalBox and I'm looking for how to have OMV and RecalBox in dual boot.
Any hints? -
Hi all, I'm running OMV in a raspberry pi B for a couple of years.
I find out this line in syslog file:Codesystemd[1]: Failed to activate swap /var/swap. systemd[1]: Dependency failed for Swap. systemd[1]: swap.target: Job swap.target/start failed with result 'dependency'. systemd[1]: var-swap.swap: Unit entered failed state.
and after some lines
Codesystemd[1]: Starting Initializes zram swaping... init-zram-swapping[849]: Setting up swapspace version 1, size = 121.2 MiB (127098880 bytes) init-zram-swapping[849]: no label, UUID=f55f41cc-df07-4cfa-8ede-4524c6559dc3
and startup ends with this:Codesudo swapon -s Filename Type Size Used Priority /dev/zram0 partition 124120 0 5 /dev/zram1 partition 124120 0 5 /dev/zram2 partition 124120 0 5 /dev/zram3 partition 124120 0 5
Is all fine?
At the end I have swap file with zram never used, does OMV manage swap stuff or can I configure zram and swap myself? -
Quite old thread but still relevant: I'm searching how to tune MONIT params.I mean I want to relax thresholds for system load, where can I find these settings?
OMV 4.1.22-1