bonienl

Community Developer
  • Posts

    10233
  • Joined

  • Last visited

  • Days Won

    65

Everything posted by bonienl

  1. Sure you can. Below a weekly example for 16 drives (the reason it is split over several weeks is because a complete scan/verification per disk is done). Running 4 disks concurrently is about the max my processor can do, yours may be different. #!/bin/bash bunker=/boot/custom/bin/bunker log=/boot/custom/hash var=/proc/mdcmd day=$(date +%Y%m%d) array=$(grep -Po '^mdState=\K\S+' $var) rsync=$(grep -Po '^mdResync=\K\S+' $var) mkdir -p $log # Weekly verification of different group of disks (monthly rotation) if [[ $array == STARTED && $rsync -eq 0 ]]; then case $(($([color=red]date +%U[/color])%4)) in 0) for i in 1 2 3 4 ; do $bunker -v -n -q -l -f $log/disk$i.$day.bad.txt /mnt/disk$i & done ;; 1) for i in 5 6 7 8 ; do $bunker -v -n -q -l -f $log/disk$i.$day.bad.txt /mnt/disk$i & done ;; 2) for i in 9 10 11 12 ; do $bunker -v -n -q -l -f $log/disk$i.$day.bad.txt /mnt/disk$i & done ;; 3) for i in 13 14 15 16 ; do $bunker -v -n -q -l -f $log/disk$i.$day.bad.txt /mnt/disk$i & done ;; esac fi
  2. For the brave users ... You can adjust the script bunker-daily to check for files changed in the last hour and copy it to /etc/cron.hourly (might change the name to bunker-hourly). $bunker -A [color=red]-D 1h[/color] -q -l -f $log/disk$i.$day.new.txt /mnt/disk$i $bunker -U [color=red]-D 1h[/color] -q -l -n -f $log/disk$i.$day.bad.txt /mnt/disk$i
  3. I have created two scripts for daily and monthly processing. These might be useful for you, but you need to adapt them to your needs, see the red sections. Make sure you are running the latest version of bunker. Update: adjusted bunker-daily to use command -U -D 1 (which speeds up execution by limiting to files changed in the last day) bunker-daily is copied to folder /etc/cron.daily and checks for new additions, reports about errors for changed files and keeps the export file up to date. #!/bin/bash [color=red]bunker=/boot/custom/bin/bunker[/color] [color=red]log=/boot/custom/hash[/color] var=/proc/mdcmd day=$(date +%Y%m%d) array=$(grep -Po '^mdState=\K\S+' $var) rsync=$(grep -Po '^mdResync=\K\S+' $var) mkdir -p $log # Daily check on new files, report errors and create export file if [[ $array == STARTED && $rsync -eq 0 ]]; then for i in [color=red]1 2 3 4 5 6 7 8 9 10[/color] ; do $bunker -A -D 1 -q -l -f $log/disk$i.$day.new.txt /mnt/disk$i $bunker -U -D 1 -q -l -n -f $log/disk$i.$day.bad.txt /mnt/disk$i if [[ -s $log/disk$i.export.txt ]]; then if [[ -s $log/disk$i.$day.new.txt || -s $log/disk$i.$day.bad.txt ]]; then mv $log/disk$i.export.txt $log/disk$i.$day.txt $bunker -e -q -l -f $log/disk$i.export.txt /mnt/disk$i fi else $bunker -e -q -l -f $log/disk$i.export.txt /mnt/disk$i fi done fi bunker-monthly is copied to folder /etc/cron.monthly and verifies a group of disks on file corruption. #!/bin/bash [color=red]bunker=/boot/custom/bin/bunker[/color] [color=red]log=/boot/custom/hash[/color] var=/proc/mdcmd day=$(date +%Y%m%d) array=$(grep -Po '^mdState=\K\S+' $var) rsync=$(grep -Po '^mdResync=\K\S+' $var) mkdir -p $log # Monthly verification of different group of disks (quarterly rotation) if [[ $array == STARTED && $rsync -eq 0 ]]; then case $(($(date +%m)%4)) in 0) for i in [color=red]1 2[/color] ; do $bunker -v -n -q -l -f $log/disk$i.$day.bad.txt /mnt/disk$i & done ;; 1) for i in [color=red]3 4 5[/color] ; do $bunker -v -n -q -l -f $log/disk$i.$day.bad.txt /mnt/disk$i & done ;; 2) for i in [color=red]6 7 8[/color] ; do $bunker -v -n -q -l -f $log/disk$i.$day.bad.txt /mnt/disk$i & done ;; 3) for i in [color=red]9 10[/color] ; do $bunker -v -n -q -l -f $log/disk$i.$day.bad.txt /mnt/disk$i & done ;; esac fi bunker-daily.txt bunker-monthly.txt
  4. Addendum: you can use the command -e (export) to create a file explicitely. bunker -e -f /boot/logs/bunker/new.disk3.$(date +%Y%m%d) /mnt/disk3
  5. I released version 1.10 which has a small correction that may prevent this bug (can't really reproduce myself) and also in v1.10 is a more comprehensive reporting, telling the execution duration and average hashing speed after the task is finished.
  6. All versions prior to 1.7 did write the same extended attributes, and no change in coding for that part. From version 1.7 onwards the new extended attribute filedate is added, though coding-wise the same approach is still done. Personally I lost a bit faith in RFS under v6 and moved all to XFS, so far I am quite pleased with the result.
  7. It should state "Reallocated sectors + number" There is a small bug that sometimes the number isn't displayed, this will be corrected in an upcoming version.
  8. I must admit that I am surprised that Limetech have never gotten around to including syslinux in the basic build so that it COULD be done from within unRAID itself. Don't you have a chicken-and-egg problem here ? How to run the utility from unRAID if it isn't able to start in the first place ...
  9. I had similar issues when using ReiserFS as the file system, once in a while the writing of the extended attributes causes a hang up. Since moving to XFS I never had this problem anymore.
  10. If I remove -f /boot/logs/bunker/new.disk3.$(date +%Y%m%d) then it runs. ALSO: I typed this and got this message: bunker -a -l /mnt/disk3 && bunker -U -l /mnt/disk3 You've found two bugs, I have corrected them and will issue version 1.9 with bug fixes. Thanks.
  11. That sounds like a much better option than me riggin something up. Although i will say I did manage to figure out the command I probably need is "notifiy smpt-init" so I was getting somewhere! But it makes more sense for it to be built-in. Do you think it would be possible for the email to print the log in the body of the email? That way you could just read the email and find the file without having to look through logs. Ok, new version 1.8 of bunker is available (see OT). This version has the new option -n (notify) which let bunker send notifications when file corruption is detected. File corruption is sent as an "alert" message, so make sure you have configured the correct recipients (browser, email or agents) to receive the alert. Only emails will have a message body detailing the corrupted file names, therefore I would advice to select at least email as a recipient.
  12. I can make that an option in bunker to send notifications when corruption is detected.
  13. I am sorry to say, but the title of your topic is very misleading. It is not an upgrade problem but a configuration problem. Have you tried to upgrade in the standard way first ?
  14. I would have thought it should read 1 corruption It means the modified time of the file has been adjusted.
  15. When you use the -v command in this case, it should report a corruption -> file content has changed, but file timestamp stays the same.
  16. The difference happens when using the -U command. This command compares the file modification date against the scandate in the extended attributes. When using the -v command the scandate is never updated, it stays as was made by the -a command, while the -V command updates the scandate to the date and time when the verification was done. Though in your case - when loosing the extended attributes and recreating them - it doesn't make a difference !
  17. I agree it does sound like the extended attributes are getting wiped, I am opening the files with MS Word 2010 and then clicking save when I exit the file. I suppose you have mapped the share as a disk under windows, but I am afraid that Windows applications are not aware of extended attributes (read: destroy them) when working this way.
  18. Can you try and rename "3D Movies" to "Movies 3D" (the difference: the name doesn't start with a digit)
  19. How do you edit and save the file, it sounds like the extended attributes are wiped ...
  20. 1. Daily update - ok, I do the same 2. Depending on how often you change/update files, you may want to make the bunker -U execution also daily. 3. bunker -V is the better choice here (this will update the scandate). Since this command will verify ALL files on the disk, it is better to run this at lower frequency, perhaps once a week or month. Two tips: - If you are going to put this in a cron job then adding the options -q (quiet) -l (logging) is helpful - In the cron job you can start several instances of bunker, e.g. for each disk, and let them run concurrently by pushing the command to the background (&) bunker -a -q -l /mnt/disk1 & bunker -a -q -l /mnt/disk2 &
  21. I've found a nail ... and started polishing it Updated version of bunker now also stores the last modified time of a file in the extended attributes. This allows bunker to determine whether a hash mismatch occured due to file corruption or due to file content modification. To make use of this feature it is necessary that existing attribute information gets the new filedate attribute added. The easiest way is to use the new command -t (touch), e.g. bunker -t /mnt/disk1 bunker -t /mnt/disk2 ... bunker -t /mnt/disk9 Once the new filedate attribute is added, you may need to make new export files, e.g. bunker -e -f /boot/hash/disk1.txt /mnt/disk1 bunker -e -f /boot/hash/disk2.txt /mnt/disk2 ... bunker -e -f /boot/hash/disk9.txt /mnt/disk9 Using the -a (add) command will now automatically include the new attribute bunker -a /mnt/disk1 Updating and checking of files can follow two strategies, e.g 1. A complete check+update of all files on disk 1 bunker -u -f /boot/hash/disk1.errors.txt /mnt/disk1 2. A partial check+update of files on disk 1 only newer than last scandate bunker -U -f /boot/hash/disk1.errors.txt /mnt/disk1 Please see the OT for downloading of the new version. At this moment in time there is no GUI available, but who knows perhaps one day that nail becomes goldplated...
  22. The guide still contains useful information Have you tried going to the Plugins tab and doing a "Check for Updates". I think I remember that option being available in beta 15 for updating the OS via the GUI. If not then copying across bzroot/bzimage should work. You can definitely upgrade from version v6b15 to v6.0.1 by using the built-in upgrade feature, as explained by itimpi.