devb-ram question

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?


Did you mount it?

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.

Mario, Thunderblade

I tried to mount but was unsuccessful.

Here’s what I did:


/dev/hd0t79 39053952 5417803 33636149 14% /
/dev/hd0t12 39050976 7262496 31788480 19% /fs/hd0-dos/
/dev/fd0 2880 2880 0 100%
/dev/cd0 0 0 0 100% (/fs/cd0/)
/dev/hd0 78125000 78125000 0 100%

devb-ram ram capacity=4000 &

/dev/hd0t79 39053952 5417804 33636148 14% /
/dev/hd0t12 39050976 7262496 31788480 19% /fs/hd0-dos/
/dev/hd1 3999 3999 0 100% /dev/hd1t77
/dev/hd1 4000 4000 0 100%
/dev/fd0 2880 2880 0 100%
/dev/cd0 0 0 0 100% (/fs/cd0/)
/dev/hd0 78125000 78125000 0 100%

So I see the /dev/hd1 created.

So I try to mount it:

mount -t qnx /dev/hd1t77 /ramdisk

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.


The problem the mount request type. There is no such thing as qnx file system it’s qnx4 file system.

Use mount -t qnx4 /dev/hd1t77 /ramdisk
mount /dev/hd1t77 /ramdisk ( as -t qnx4 is the default)


Thanks for pointing out what my fried brain missed as being so obvious. :frowning:

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 :slight_smile:

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?

Best regards,

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.

Pass option “blk cache=1m” (1 megabyte) to devb-ram. By default it eats 15% of free memory.

Thank you guys! That did the trick nicely.

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.

Don’t think you can use 0, a minimum is required like 64K or something like that.

Thanks again.

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.

Best regards