This may be a silly question but can I not use devb-ram to create a ram disk that the filesystem can read/write to?
I invoked it as:
devb-ram ram capacity=600000 &
to create a roughly 300 Meg ram drive followed by the DINIT printout.
I now see entries in /dev for hd2 and df reports /dev/hd2 with the 600000 blocks and pidin reports that I now have 300 megs less ram available. So definitely devb-ram allocated the space.
However I can’t mount this drive nor can I ‘cd’ to it to create a directory and copy files there. So how exactly can one use this as a temp file storage (for example I want to copy a lot of files into RAM to save disk access during running)? Or is this not possible?
What do you mean when you say you can’t mount it? What was the command line you used to do it, and what was the error message you got? I am using devb-ram for a ram disk, too, and it is perfectly writeable.
Error I get is 'mount: can’t mount /ramdisk. Can’t access shared library
So I then tried:
mount -t qnx /dev/hd1 /ramdisk
Error I get is ‘mount: can’t mount /ramdisk. Resource busy’
So that’s that. I’m obviously doing something wrong on the devb-ram command line because it looks like it’s already being used somehow. But the doc’s are VERY sparse on how to use this to set it up as a temp file storage area which is weird because normally the doc’s have such nice examples of how to do something like that and I remember it was trivial to do in QNX4.
Thanks for pointing out what my fried brain missed as being so obvious.
That’s what happens when you use the mount command from memory. Weird that the error doesn’t really inform you that the problem is the filesystem type is invalid.
well the file type wasn’t invalid per se. You can specify any file type you want, mount asked the program responsible for that manager to upload a dll for that specify filesystem format, but just couldn’t find it (Can’t access shared library). That mean you can create your own filesystem (build a shared lib) and just mount it.
Hi guys. I have a follow-up question although this thread is fairly old… Hope someone will answer
I am using a system that has 290MB free RAM after boot-up, checked using pidin info
After I do “devb-ram ram capacity=4096” I am suddenly down to 260MB free mem (again checked using pidin info). I am a little confused about this, because if I’m reading “use devb-ram” correctly the devb-ram command I am using should allocate a 2MB ramdisk (and I can’t believe the ramdisk driver eats the missing 28MB).
If I try the same using capacity=102400 (should give me a ramdisk about 50MB large) my free mem is reduced by 108 MB.
Does anyone have any hints, or know what might be going on here?
You should also reduce the cache size. As strange as it seems devb-ram is based on the the same architecture as the other devb-* driver and is making use of a cache.
Do you know if anything will bite me if I use blk cache=0? I’d rather not waste the 1 Meg on target if I can. I tried it briefly on the host computer, it seems to work fine.
FYI: devb-ram starts using 0 cache, I am able to mount it and copy heaps of files to and from it. So at least it does not do anything ugly right away when it’s set to use 0 cache. But I’ll take your advice and set the cache to 64K just to be safe.