- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Recycle bin fills up my ReadyNAS
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
}
}