Usb backup not ejecting usb properly and rsnapshot question

    • OMV 3.x
    • Resolved
    • Usb backup not ejecting usb properly and rsnapshot question

      • I'm using usb backup for the first time and having one issue, I tried to look in the forum for similar threads, but didn't find them.
      The issue is the plugin didn't seem to eject the usb hard disk after the backup is done, as it should do from what I understood.
      Here is the message I've got as soon as I insert the usb hard disk wait and the unplug.

      Source Code

      1. [ 1501.037635] sd 9:0:0:0: [sdd] No Caching mode page found
      2. [ 1501.037692] sd 9:0:0:0: [sdd] Assuming drive cache: write through
      3. [ 1545.734680] usb usb2-port4: cannot disable (err = -32)
      I don't see the hard disk mounted in the webgui, but then why the error on line 3.?
      Also I would expect the hard drive's light to slowly blink as when the same disk is safe ejected on windows (cofirmation of hard disk ejected properly) but it never happens, it stays with a fixed light (like when the hard disk is doing nothing not reading\writing just stays plugged in waiting)

      I don't know if depends on the kind of format anyway the external hard disks are formatted in fat32 (I need them to be plug and play in windows machine) and are usb 3.0.

      Everything seems to work fine, the files are backed up fine, the only thing is this error msg on dmesg, does it mean it doesn't eject the hard disk properly or should I ignore them? I would like not to corrupt the disks saving backups

      • Also I have a question about Rsnapshot plugin, I installed and configured it, but it seems it works only if I select the job created and click on Run on the webgui, I was expecting it to work on its own, do I need to create a systemd service or a cron\anacron job to autostart automatically daily?
      in /etc/cron.d is present the seguent openmediavault-rsnapshot:

      Source Code

      1. # Create cron file
      2. # This is the cron file for openmediavault-rsnapshot.
      3. # The file /var/lib/openmediavault/cron.d/rsnapshot will mirror
      4. # the jobs that are configured in the plugin.
      5. # m h dom mon dow user command
      6. 5 * * * * root /var/lib/openmediavault/cron.d/rsnapshot hourly
      7. 30 3 * * * root /var/lib/openmediavault/cron.d/rsnapshot daily
      8. 0 3 * * 1 root /var/lib/openmediavault/cron.d/rsnapshot weekly
      9. 30 2 1 * * root /var/lib/openmediavault/cron.d/rsnapshot monthly
      10. 00 2 1 1 * root /var/lib/openmediavault/cron.d/rsnapshot yearly

      If not I misunderstanding, I would expect the snapshot run every 5 min hourly or every 30 min daily, but it doesn't seems so.

      and here is my rsnapshot plugin config:

      Source Code

      1. Retain hourly = 0
      2. Retain daily = 5
      3. Retain weekly = 4
      4. Retain monthly = 3
      5. Retain yearly = 0
      6. Rsync tries = 1

      Am I missing something here?

      The post was edited 4 times, last by Wek: fixed mistakes rsnapshot config added ().

    • Wek wrote:

      I would expect the snapshot run every 5 min hourly or every 30 min daily, but it doesn't seems so.
      No, that means it runs at 5 mins after the hour every hour. With your settings, it won't run hourly but will run daily.
      omv 4.1.13 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • I think I got it, right now it runs at 3:30 am every day, at 3:00 am on Monday of every week and at 2:30 am every 1st day of the month right?!

      The thing that I can't understand is how do I have to set it to have let's say at least 2 backups one at 6 in the morning and one at 6 in the evening of every day and retain them?

      Moreover I don't understand if I leave it at the first config so :

      Source Code

      1. # Create cron file
      2. # This is the cron file for openmediavault-rsnapshot.
      3. # The file /var/lib/openmediavault/cron.d/rsnapshot will mirror
      4. # the jobs that are configured in the plugin.
      5. # m h dom mon dow user command
      6. 5 * * * * root /var/lib/openmediavault/cron.d/rsnapshot hourly
      7. 30 3 * * * root /var/lib/openmediavault/cron.d/rsnapshot daily
      8. 0 3 * * 1 root /var/lib/openmediavault/cron.d/rsnapshot weekly
      9. 30 2 1 * * root /var/lib/openmediavault/cron.d/rsnapshot monthly
      10. 00 2 1 1 * root /var/lib/openmediavault/cron.d/rsnapshot yearly

      It doesn't make any sense to have Retain daily = 5 like it is now, because it will basically make snapshot once a day...so you'll end up with just 1 back day and not 6

      I guess I'm totally misunderstanding how the plugin work right?

      @ryecoaaron could you help me out understand it better?

      The post was edited 2 times, last by Wek: fixed table ().

    • Wek wrote:

      think I got it, right now it runs at 3:30 am every day, at 3:00 am on Monday of every week and at 2:30 am every 1st day of the month right?!
      yep

      Wek wrote:

      The thing that I can't understand is how do I have to set it to have let's say at least 2 backups one at 6 in the morning and one at 6 in the evening of every day and retain them?
      I think you are trying to control too much. Just increase the number of hourly backups. If you don't have lots of files changing, the additional backups won't use hardly any space.

      Wek wrote:

      Moreover I don't understand if I leave it at the first config so :
      Stop worrying about the cron files.

      Wek wrote:

      It doesn't make any sense to have Retain daily = 5 like it is now, because it will basically make snapshot once a day...so you'll end up with just 1 back day and not 6
      daily = 5 will keep five daily backups. On the sixth day, it will remove the first. You will always have five days. The daily backups do not affect the hourly or weekly or monthly backups.
      omv 4.1.13 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • NOW everything is clear! set! thank you a thousand @ryecoaaron really appreciate, especially the suggestion to not worry about :°D it is the best suggestion ever :D

      I need just to understand why the disk with usb backup is unmounted properly at least on the webgui is says so, but the hard disk stays with a fixed light and as soon as I detached it I got that annoying usb warning and I'm ready to deploy.

      You has been very informative thanks
    • Ok, I think I'm getting closer to understand the usb backup error, I think is not an error of usb not mounted\ejected by the plugin, I tried to mount it manually and unplug it without unmount and I've got the real error

      Source Code

      1. [ 1531.361428] FAT-fs (sdd1): unable to read boot sector to mark fs as dirty
      as expected.
      So I guess this one instead:

      Source Code

      1. [ 1531.185592] usb usb3-port3: cannot disable (err = -32)
      is related to the server usb hub not properly manage the power to usbs, I guess I can ignore it, I will try to dig it a little bit more, but I can't find any info with google, just a bunch of issues related with usb ports, but that was already clear :D