× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Recycle bin fills up my ReadyNAS

electro2000
Follower

Recycle bin fills up my ReadyNAS

 

I identified that my ReadyNAS NV+ was not properly handling Recycle Bin automatic expiration/delete.

(see earlier post hxxps://community.netgear.com/t5/Using-your-ReadyNAS/Recycle-bin-fills-up-my-ReadyNAS/td-p/792771/page/2)

 

I dig down to the root of the problem: the cleanup cron script was not able to delete large files as the Perl version running on ReadyNAS OS 4.1.x (arm) is not compiled with the "USE_LARGE_FILES" option and therefore the perl unlink() fail on deleting large files.

To solve this, using SSH root plugin (see warranty warnings in the plugin doc before doing so), I modified the following lines in /etc/cron.daily/clean_recycle_bins :

# replace this:

      foreach my $time (reverse sort keys %files)
      {
        $total_size = ($total_size + $files{$time}{size});
        if( $total_size > $byte_limit )
        {
          unlink("$files{$time}{name}");
          print "Unlinked File:$files{$time}{name}\n" if($debug);
        }
      }
# by this:

      foreach my $time (reverse sort keys %files)
      {
        $total_size = ($total_size + $files{$time}{size});
        if( $total_size > $byte_limit )
        {
          # unlink("$files{$time}{name}"); # Replaced with rm, no large file support in this Perl "Could not unlink : Value too large for defined data type"
          system("rm -f '$files{$time}{name}'");
          print "Unlinked File:$files{$time}{name}\n" if($debug);
        }
      }

Model: ReadyNASRND4410|ReadyNAS NV+ 4TB (4 X 1TB)
Message 1 of 1
Top Contributors
Discussion stats
  • 0 replies
  • 375 views
  • 0 kudos
  • 1 in conversation
Announcements