NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
ljcorreia
Sep 21, 2015Aspirant
Shares lost
Hi, I own a ready ReadyNas Duo (RND2110v2) for nearly 6 years. The NAS has lost all shares, but all files are there and accessible through SSH (WinSCP). In order to understand if this may...
- Sep 22, 2015
You have a full OS partition (/dev/hdc1)
Can you check to see how much space is used in /var/logs
ljcorreia
Sep 22, 2015Aspirant
Hi,
ok, How about now?
Text Output Command 1:
/c$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hdc1 1.9G 2.0G 224k 100% /
tmpfs 16k 0 16k 0% /USB
/dev/c/c 1.8T 752G 1.0T 41% /c
/c/WebDav 1.8T 752G 1.0T 41% /home/ftp/WebDav
/c/backup 1.8T 752G 1.0T 41% /home/ftp/backup
/c/media 1.8T 752G 1.0T 41% /home/ftp/media
Text Output Command 2:
/c$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/hdc1 128000 16158 111842 13% /
tmpfs 7073 1 7072 1% /USB
/dev/c/c 61014016 663422 60350594 2% /c
/c/WebDav 61014016 663422 60350594 2% /home/ftp/WebDav
/c/backup 61014016 663422 60350594 2% /home/ftp/backup
/c/media 61014016 663422 60350594 2% /home/ftp/media
Thanks
Leo
StephenB
Sep 22, 2015Guru - Experienced User
You have a full OS partition (/dev/hdc1)
Can you check to see how much space is used in /var/logs
- ljcorreiaSep 22, 2015Aspirant
Hi,
Yeah, I noticed that when I executed the df command you asked me to. But I have no idea what partition is that.
There is no logs folder under var, but there is a folder called log. Is that the one you are referring to?
I may need your help on this. My unix/linux skills are rusted, which is a soft way to say I completely forgot everything I once knew. I've executed the following command:
/var$ du -h log
32k log/cups
du: cannot change to directory `log/exim': Permission denied
du: cannot change to directory `log/samba/cores': Permission denied
16k log/frontview/backup
1.2G log/frontview
16k log/ksymoops
16k log/ntpstats
160k log/samba
16k log/ddns
16k log/squeezecenter
1.4G logDoes this shows what you need to find out about this partition?
Thanks
Leo
- StephenBSep 22, 2015Guru - Experienced User
So the big space use is in /var/log/frontview.
What's needed is to trim down at least the biggest logs. If you still have Frontview access, just clear all the logs from the web ui (Backup logs). DON'T try to download them.
You can also clear each one manually from SSH. Assuming you are in the same folder as the log file, just enter
echo -n > filename.log
Likely one or two logs are using all the space, you can leave the rest alone.
Normally the OS partition should be about 20% full - so there might be some more work after you clean up the logs. Are you running ReadyDLNA?
ljcorreia wrote:
Hi,
Would you kindly explain the difference of the parameters -i and -h for the df command?
With -h the /dev/hdc1 partition use% is displayed as 100% and with -i the IUse% is shown as 13%. This is a bit confusing.
df -i shows the number of free inodes in the filesystem. Inodes are where metadata (file descriptors, etc) are stored. If you run out, then the file system is essentially full even if there is space for data.
Usually there are plenty of inodes (and that is your situation). But it is useful to check.
df -h shows the space usage (-h makes it "human readable" - displayed in MB/GB).
Also, I don't know if this information contributes, but I once had 1T hard-drives on the nas, but I have upgraded them to 2TB drives as you can see on the Size column.
Sometimes that is relevant, but not in your case. All v1 NAS have a 2 GB OS partition on each disk. That doesn't expand when you upgrade the drives, and in some cases it gets full.
The disks are setup as RAID 1. I'm working on making a copy of all data before attempt any change you may suggest because I cannot afford loosing any of the data there.
Always a good idea. When the dust settles you probably should put a regular backup plan in place.
- ljcorreiaSep 22, 2015Aspirant
Hi,
Thanks once again. Very helpful.
I still have access to the Frontview. It's interesting that on there web ui it does not show any log. Unless I'm looking at the wrong place?
So, don't worry about me downloading them from the ui, but I confess I would like to keep a copy at least of the access.log and error.log (to check them later) which are actually the largest ones. I can imagine the reasons why you asked me to not try to download them, but I wonder if it is ok if I try to download them through SSH? Will it still be an issue?
/var/log/frontview$ du -h access.log
1.2M access.log
/var/log/frontview$ du -h error.log
1.2G error.logLook at the error.log! Massive! When the 'dust settles' as you said, I would like to check the errors and definitelly keep a regular backup (I may get some advice about this later, but lets focus on the issue for the moment).
Thanks so much for the explanations of the commands' parameters and for guidance on a 'clever' way to reset the log files. Very useful.
In answer to your question about ready ReadyDLNA, yes, I do have DLNA active and I use to stream to TV, although it's been a while that I have not used that. If there are cache files of the streaming to be dumped, where would they be?
Thanks
Leo
- StephenBSep 22, 2015Guru - Experienced User
Access.log is only ~ 1MB, so just leave that alone. You definitely need to clear error.log - thats where all the space is going.
But you can try copying it to the data share first if you want. For instance
cp error.log /c/backup/
Then use the log clearing command I posted earlier
echo -n > error.log
That should leave you with an error.log size of 0 bytes, and the OS partition should be about 40% full. After that I'd reboot, and confirm that it is still at ~40% after the reboot..
On ReadyDLNA - its database is also stored on the OS partition. If you want to keep it enabled, there is an add-on that you should install which will move its database to the data volume. Let's circle back to that later, after you free up some desparately needed space.
- ljcorreiaSep 22, 2015Aspirant
Brilliant, done!
/var/log/frontview$ cp error.log /c/backup/
I checked and it successfully copied the file.
I've then executed:
/var/log/frontview$ echo -n > error.log
Which returned a Permission Denied error, but I've successfully deleted from the WinSCP guid. Then I've executed the above echo command again.
I've checked and I am still able to access the Frontend ui, so I'll go for a restart, but the only considerations I make at this point is that the ssh is logged as 'admin' user and not root, so the echo command will make that user the owner, even though it has the same permissions. I can't tell now that this won't cause any issue. WinSCP let me change the Owner and the Group (has a dropdown for that), but any attempt to change it to root user and group returns Permission denied.
Should I do anything about it? Or just leave it as admin owner?
Edited: (or maybe, it just occurred to me that I could just delete that file and see if the frontend will create it automatically when needed; upon the occurence of an error)
Thanks
Leo
- ljcorreiaSep 22, 2015Aspirant
Very good news after the restart!
Btw, the restart did not work from the frontview. I had to hold-press the power button in order to restart the nas.
/var$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hdc1 1.9G 611M 1.3G 31% /
tmpfs 16k 0 16k 0% /USB
/dev/c/c 1.8T 753G 1.0T 41% /c
/c/WebDav 1.8T 753G 1.0T 41% /home/ftp/WebDav
/c/backup 1.8T 753G 1.0T 41% /home/ftp/backup
/c/media 1.8T 753G 1.0T 41% /home/ftp/media
/var$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/hdc1 128000 12127 115873 10% /
tmpfs 7073 1 7072 1% /USB
/dev/c/c 61014016 663424 60350592 2% /c
/c/WebDav 61014016 663424 60350592 2% /home/ftp/WebDav
/c/backup 61014016 663424 60350592 2% /home/ftp/backup
/c/media 61014016 663424 60350592 2% /home/ftp/mediaI'm really surprised space was the root of these problems. The shares are back:
Thank you so much!
I'm surprised I never got an notification e-mail about the system not have enough space. Should I have received such warning or not?
Edited: (ok, I've checked and the e-mail notifications and it is also working as long as I enable less secure apps on Google, which is not ideal).
If I may, can I touch on the points we left on the way?
1. Is it a problem that error.log is now owned by admin?
2. How to proceed to have the ReadyDLNA pointing to data storage instead of system partition as you said?
3.Can you advise me on how to setup the backup, if you have a guide for this? My idea is to have it backed up to my pc as I have a RAID of drives available. Can it be done that way and keep the files in sync?
Thanks
Leo
- StephenBSep 22, 2015Guru - Experienced User
ljcorreia wrote:
Very good news after the restart!
Yes. The NAS can end up essentially bricked when the OS partition gets too full. I'm happy I could help.
I'm surprised I never got an notification e-mail about the system not have enough space. Should I have received such warning or not?
You get warnings on data volume fullness, but not for OS partition. I think OS6 now has a warning for this, but they haven't retrofitted it.
Edited: (ok, I've checked and the e-mail notifications and it is also working as long as I enable less secure apps on Google, which is not ideal).
If you research the "less secure apps" thing, you'll find its not quite as bad as it sounds. It's not really about how secure the app is, it's more about what it is allowed to know. The apps are less secure simply because they know your email account name and password. There are newer methods in place (OAuth) where the app has its own credential, and doesn't know your email password. It can't reveal what it doesn't know...
1. Is it a problem that error.log is now owned by admin?
I don't think so. Maybe mdgm or someone from Netgear support can tell us. You can change the ownership with chown.
2. How to proceed to have the ReadyDLNA pointing to data storage instead of system partition as you said?
Skywalker posted an add-on some time ago here: https://community.netgear.com/t5/Using-your-ReadyNAS/ReadyDLNA-OS-Partition-Usage/td-p/829383/page/2 A direct download link is http://www.readynas.com/download/addons/4.1/Toggle_ReadyDLNA_CacheDir_1.0.bin.
You simply install it to move the cache/database. It is a "toggle" so installing it again will actually uninstall it.
After you install it, you should probably reboot and check the OS space once again.
3.Can you advise me on how to setup the backup, if you have a guide for this? My idea is to have it backed up to my pc as I have a RAID of drives available. Can it be done that way and keep the files in sync?
I have done this (in fact the scripts are still running), but never created a guide. I have dedicated backup drives installed in my two desktop PCs that copy from the NAS, using RoboCopy (a built-in Windows tool). I can PM you a sample script if you are interested. They are windows batch files (can be run from the command line). In my case, I linked it into Acronis TrueImage backup (which backs up my PC to the NAS). When that completes, the post-process step runs the script to back up NAS shares to the dedicated drives. These are not RAID in my case, and the script has to know what shares get backed up to what drives.
There's a small executable also (one I wrote) that helps generate meaningful timestamps for logging.
There are other ways also (frontview backup jobs can write to your PC if it is on).
My approach now is to back up to other NAS, but I'll keep the PC backups going until the drives fail (or the PCs are replaced).
- ljcorreiaSep 22, 2015Aspirant
Hi StephenB,
Great! It seems to be all working fine now. Thanks once again.
1. mdgm-ntgr, if you can tell me, I'd appreciate. Thanks. chown is probably what WinSCP uses behind the scenes, but I did try with chown on terminal too, with no success. It is probably not an issue as I can see the log already growing. Actually, I guess this is the most important step, to prevent this to happening again, try to eliminate at least some of the issues that is being logged. To start with, I can see tens of lines with the following error:
Spoiler[Tue Sep 22 21:14:42 2015] [error] [client 127.0.0.1] File does not exist: /frontview/ui/resource/html/presenceAnyone knows anything about this? what if I just create that file or folder, even if it is empty?
There are other issues in the log, but the others do not appear so frequently, so I am not too worried about them for now.
2. All have a look into moving the ReadyDLNA db. Thanks a lot for sending the links.
3. Cool, that's handy. Yes, can you send me a sample of the scripts, please? It's much appreciated.
Thanks
Leo
- StephenBSep 22, 2015Guru - Experienced User
Give me a day or so on the scripts - if it takes longer, PM me.
My real job is a bit busy at the moment :smileywink:
- mdgm-ntgrSep 23, 2015NETGEAR Employee Retired
1. It is owned by root, by default. So you might wish to do
# chown root:root /var/log/frontview/error.log
- StephenBSep 23, 2015Guru - Experienced User
mdgm - any thoughts on what the OP should do about these errors:
[Tue Sep 22 21:14:42 2015] [error] [client 127.0.0.1] File does not exist: /frontview/ui/resource/html/presence
Overinstall of the firmware perhaps?
- ljcorreiaSep 24, 2015Aspirant
Hi mdgm-ntgr,
Thanks for your reply.
I did try to execute the command you send. I've tried before too, but it returns the message:
SpoilerSpoiler---------------------------
Error
---------------------------
Command 'chown root:root /var/log/frontview/error.log'
failed with return code 1 and error message
chown: changing ownership of `/var/log/frontview/error.log': Operation not permitted.
---------------------------
OK Help
---------------------------It doesn't not allow from the WinSCP gui too, and it is probably because it executes the same command behind the scenes.
Any alternative to this?
In regards to the errors that are filling up the logs, would you kindly shed some light, please?
Thanks
Leo
- mdgm-ntgrSep 24, 2015NETGEAR Employee Retired
You would need to login as the root user to execute that command.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!