[SOLVED] RAMDisk Full

Introduce yourself to us and other members here, or share your own product reviews, suggestions, and tips and tricks of using QNAP products.
User avatar
ehj
Starting out
Posts: 10
Joined: Sat Feb 23, 2013 5:08 pm
Location: Rijswijk ZH
Contact:

Re: [SOLVED] RAMDisk Full

Post by ehj »

Twonky App does not create symlinks to shares as not required at all - it's using the shared folder definitions, and defaults to the Multimedia share, using the symlinks already in place.
Hmmm... probably system changed overnight.
The symlinks are created with the /etc/init.d/twonkymedia6.sh run.
Mine is having /etc/init.d/twonkymedia.sh

Code: Select all

[/etc/init.d] # ls -al ./twonky*
-rwxr-xr-x    1 admin    administ     11020 Jun 24 09:48 ./twonkymedia.sh*
Here it is not a link and in there is no file visible taking space but the daemons are consuming temp space for whatever they do that will never fit and bloats the ramdisk. When i kill the daemons space is freed and the only point of the folder is not that it is taking space but that it is recreated all the time. Giving only the clue that there is are twonky - daemons that are willing to use it.
I think you will also run into this problem after you try to configure the mirroring setup once (through the app's webtool) .

I don' t have twonky enabled and don't want it enabled so it should never start and create whatsoever i don't want now.

@ pakoistinen
I also removed all apps including the apps that go with the os before i did my first post here and that did not help much.
It should be clean except for everything running for years now but the state is unusable now.

I will start over with factory reset.

Bey, thanks for the info so far.
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: [SOLVED] RAMDisk Full

Post by schumaku »

Agreed, we wont get back in control of your system. To get a clean system: Wipe the HDD partition tables, re-install the system from scratch, re-configure it, and restore backup.
User avatar
pakoistinen
Know my way around
Posts: 149
Joined: Sat May 24, 2008 12:38 pm

Re: [SOLVED] RAMDisk Full

Post by pakoistinen »

Yep.
Make a good backup of your data first :)
TS-421 with QTS 4: 4 hdds: 2 x 1,5TB raid1 and 2 x 2TB raid1 arrays.
TS-209: 2 hdds: 2 x 750GB raid1 array.
Mail pasi at turvallisuus dot org
User avatar
ehj
Starting out
Posts: 10
Joined: Sat Feb 23, 2013 5:08 pm
Location: Rijswijk ZH
Contact:

Re: [SOLVED] RAMDisk Full

Post by ehj »

Thanks for the concern. The 27gb that is worth saving is on a stick.

One extra thing that i want on it is a way to share digital tv/dvd recordings. But maybe it's better to have a cronjob to fetch the files from the receivers and make them available as streams. I need to figure out how to stream without disturbing functionality. I have had full hd recordings on the system that streamed very well to humax, pc and iphone (vlc).

Here some extra info about Twonky ! http://www.shockcinemamagazine.com/twonky.html
User avatar
pakoistinen
Know my way around
Posts: 149
Joined: Sat May 24, 2008 12:38 pm

Re: [SOLVED] RAMDisk Full

Post by pakoistinen »

Twonky :D lol

Btw. I'm now four days without ramdisk full errors. The cause was the download station on my case. I might start enabling services one by one while testing their stability.
TS-421 with QTS 4: 4 hdds: 2 x 1,5TB raid1 and 2 x 2TB raid1 arrays.
TS-209: 2 hdds: 2 x 750GB raid1 array.
Mail pasi at turvallisuus dot org
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: [SOLVED] RAMDisk Full

Post by schumaku »

Hey, know what ... we're coming near to .... Twonky!

One possible cause ... now I've managed to see this /share/twonkymedia structure in the pure RAM disk:


[~] # ls -ls /share/twonkymedia/
1 drwxr-xr-x 3 admin administ 1024 Nov 8 08:20 music/
1 drwxr-xr-x 3 admin administ 1024 Nov 8 08:20 pictures/
1 drwxr-xr-x 3 admin administ 1024 Nov 8 08:20 videos/
[~] # ls -ls /share/twonkymedia/music/
1 drwxr-xr-x 4 admin administ 1024 Nov 8 08:20 TwonkyMedia/
[~] # ls -ls /share/twonkymedia/music/TwonkyMedia/
1 drwxr-xr-x 2 admin administ 1024 Nov 8 08:20 mirrored/
1 drwxr-xr-x 2 admin administ 1024 Nov 8 08:20 uploaded/
...

What-if somebody does upload (afaik it's hidden I the Twonky Web UI, and should be disabled in DLNA), or has configured Twonky to mirror a other DLNA tree does not have to be explained.

Potentially this happens after a crash or OOM of the Twonky processes:

[396086.151654] Out of memory: Kill process 14972 (twonkyserver) score 671 or sacrifice child
[396086.151678] Killed process 14972 (twonkyserver) total-vm:773900kB, anon-rss:303256kB, file-rss:716kB

That's four days, 14 hours if wally brain is right. And I've discovered this around 13:10 local, counting time back: The Twonky OOM happened short before 08:20 ... so any kind of automatic watchdog restarting Twonky does something wrong, the symlinks go fubar - thee is what it should look like:

[~] # ls -ls /share/ | grep twonky
0 lrwxrwxrwx 1 admin administ 32 Nov 8 13:17 twonky -> /share/MD0_DATA/.@twonkymedia.db/
0 lrwxrwxrwx 1 admin administ 32 Nov 8 13:17 twonkymedia -> /share/MD0_DATA/.@twonkymedia.db/
User avatar
pakoistinen
Know my way around
Posts: 149
Joined: Sat May 24, 2008 12:38 pm

Re: [SOLVED] RAMDisk Full

Post by pakoistinen »

A-ha! :) Thanks for the lead.

Hmm.

It seems to me that quite many problems with ramdisk are caused by something writing into /share/ folder directly. Would it be feasible to figure out some kind of a protection mechanism that would prevent that from occurring? Or if it occurs, the mechanism would react quicly to revert any damage from occurring. Can you think of anything?
TS-421 with QTS 4: 4 hdds: 2 x 1,5TB raid1 and 2 x 2TB raid1 arrays.
TS-209: 2 hdds: 2 x 750GB raid1 array.
Mail pasi at turvallisuus dot org
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: [SOLVED] RAMDisk Full

Post by schumaku »

pakoistinen wrote:Can you think of anything?
Alarm ACE ... similar to OpenVMS :?
User avatar
pakoistinen
Know my way around
Posts: 149
Joined: Sat May 24, 2008 12:38 pm

Re: [SOLVED] RAMDisk Full

Post by pakoistinen »

hmm! IPKG doesn't seem to contain any ACL related packages. (as in setfacl or getfacl)
But. There is a QNAP acl_cmd binary right on the system:

Code: Select all

[~] # acl_cmd -h    
Usage: acl_cmd [OPTION]... 
Print ACL Command.

	-h, --help		Display this help and exit.
	-s, --share		share name.
	-a, --add		the user name who will be added to control list.
	-d, --del		the user name who will be removed from control list.
	-S, --security		the security of added user, W, R or I (W=read/write, R=read only, I=deny).
I wonder if this binary could be used to enforce /share/ as read-only for everyone including admin/root while letting it's subfolders be writable? Would this protect from data leakage in /share/?

And if so: could we identify a list of likely locations with leaks and build a script that prevents system from writing leaked stuff to those places? hmm.
TS-421 with QTS 4: 4 hdds: 2 x 1,5TB raid1 and 2 x 2TB raid1 arrays.
TS-209: 2 hdds: 2 x 750GB raid1 array.
Mail pasi at turvallisuus dot org
westhaddon
New here
Posts: 6
Joined: Thu Mar 21, 2013 12:11 am

Re: [SOLVED] RAMDisk Full

Post by westhaddon »

Hi, this says it has been solved?
I Have gone through thread but can figure it out, sorry! :-(

Can anyone put a summary of problem and how to resolve please?

FYI
I had a similar problem when I my TS-469 Pro firmware upgraded to 4.0.4
It was finally resolved by David at QNAPP who downgraded the firmware to 4.0.3.
Since then things have been stable again.
User avatar
forkless
Experience counts
Posts: 1907
Joined: Mon Nov 23, 2009 6:52 am
Location: The Netherlands

Re: [SOLVED] RAMDisk Full

Post by forkless »

There is no single cause to this problem, first try to find out what is causing the error message (ie. what process is filling the /tmp folder). There are plenty of example threads already outlining how to troubleshoot this.
User avatar
pakoistinen
Know my way around
Posts: 149
Joined: Sat May 24, 2008 12:38 pm

Re: [SOLVED] RAMDisk Full

Post by pakoistinen »

My problem with the filling RAMdisk was caused obviously by the default download station.
As soon as I stopped using it and disabled the service the problem never occurred again. In fact, I stopped using most of the default services from Qnap and disabled them. In fact, some external ones seem to be quite all right and don't cause any instability on my system (IPKG, Twonkymedia, Crashplan &c.)

My perception is that the cause of problems is the Qnap firmware design. It is designed so that several processes may write simultaneously to and from the same config files. In an error where simultaneous writes occur, an error condition is caused. The Qnap services are configured to write data to "legacy" locations like "Qmultimedia" (others too) if they can't find a configuration file. That Qmultimedia-location points to the root file system. -> a full ram disk occurs sporadically.

If you think about this behavior it is clear that no single service is the fault. It is the design of the system configurations (config files) and how their integrity is safeguarded.

A reboot cleans up the evidence... :lol:
TS-421 with QTS 4: 4 hdds: 2 x 1,5TB raid1 and 2 x 2TB raid1 arrays.
TS-209: 2 hdds: 2 x 750GB raid1 array.
Mail pasi at turvallisuus dot org
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: [SOLVED] RAMDisk Full

Post by pwilson »

pakoistinen wrote:hmm! IPKG doesn't seem to contain any ACL related packages. (as in setfacl or getfacl)
But. There is a QNAP acl_cmd binary right on the system:

Code: Select all

[~] # acl_cmd -h    
Usage: acl_cmd [OPTION]... 
Print ACL Command.

	-h, --help		Display this help and exit.
	-s, --share		share name.
	-a, --add		the user name who will be added to control list.
	-d, --del		the user name who will be removed from control list.
	-S, --security		the security of added user, W, R or I (W=read/write, R=read only, I=deny).
I wonder if this binary could be used to enforce /share/ as read-only for everyone including admin/root while letting it's subfolders be writable? Would this protect from data leakage in /share/?

And if so: could we identify a list of likely locations with leaks and build a script that prevents system from writing leaked stuff to those places? hmm.
No IPKG is required for those two.....

Code: Select all

which getfacl
/usr/bin/getfacl
which setfacl
/usr/bin/setfacl
Both should already be on the $PATH, so you can execute them without explicitly specifying the entire path to the executables.

Code: Select all

getfacl -v
getfacl 2.2.49
setfacl -v
setfacl 2.2.49
getfacl --help
getfacl 2.2.49 -- get file access control lists
Usage: getfacl [-aceEsRLPtpndvh] file ...
  -a,  --access           display the file access control list only
  -d, --default           display the default access control list only
  -c, --omit-header       do not display the comment header
  -e, --all-effective     print all effective rights
  -E, --no-effective      print no effective rights
  -s, --skip-base         skip files that only have the base entries
  -R, --recursive         recurse into subdirectories
  -L, --logical           logical walk, follow symbolic links
  -P, --physical          physical walk, do not follow symbolic links
  -t, --tabular           use tabular output format
  -n, --numeric           print numeric user/group identifiers
  -p, --absolute-names    don't strip leading '/' in pathnames
  -v, --version           print version and exit
  -h, --help              this help text
Hope this helps.....

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
danobrooks
New here
Posts: 3
Joined: Tue Jan 31, 2012 9:17 pm

Re: [SOLVED] RAMDisk Full

Post by danobrooks »

Thank you for the comment regarding backup jobs, setup a number of jobs during migration, and even though these were set to run once still caused an issue. Removing these seems to have fixed the issue for me.

Cheers,
Dan
yourstruly5o1
New here
Posts: 7
Joined: Wed Jul 16, 2014 8:49 am

Re: [SOLVED] RAMDisk Full

Post by yourstruly5o1 »

Hello,

I am too having this issue which may have been caused by a faulty firmware upgrade install of 4.1.0.

When I logon to the NAS , I get many of the following errors:
The system is unable to save your settings (file = [/var/qnapddns.conf], section = [Port Forward Internal Port], field = [Web Server/Multimedia Station], value = [80]) due to insufficient ramdisk space. If restarting the server does not solve the problem please contact support for further assistance.

When I goto Control Panel -> Storage Manager, none of my hard drives are appearing, it's all blank! When i go view my Apps, it is also blank as well! But for some reason, when I'm on my laptop, I'm able to access my files stored on the hard drives. I currently have a RAID0 setup where the two drives mirror each other. Under Control Panel, i'm also trying to disable all services but when I click apply the system reverts back to the original selection.

The system status LED is blinking constantly blinking red and i'm not sure what to do here to resolve this issue?

I've tried upgrading the firmware again and it seemed to install fine.
Locked

Return to “Users' Corner”