-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 18 June 2003 03:04 pm, Robert P. J. Day wrote:
[...]
>   from what i've read, i can create a number of ram disks
> corresponding to /dev/ram[012345...], by doing the following:
>
>   # dd if=/dev/zero of=/dev/ram0 bs=1024 count=16
>
> for a tiny ram disk of 16k (supposedly).  so what actually
> happens?
>
>   if i try to create an ext2 filesystem on it:
>
>   # mke2fs /dev/ram0
>
> it works, but it's obvious that it's 4M in size -- the
> default.  i didn't *ask* for the default size, i was hoping
> i could pick the size myself.  but i get 4M anyway.

That's the thing about defaults, you don't have to ask. ;)

You can specify how large to make the file system, though.
The smallest I've been able to actually create is 64k. 

Anything smaller results in:
# /sbin/mkfs -t ext2 -m 0 /dev/ram1 48
mke2fs 1.27 (8-Mar-2002)
/dev/ram1: Not enough space to build proposed filesystem while setting up 
superblock


# dd if=/dev/zero of=/dev/ram1 bs=1024 count=64
# /sbin/mkfs -t ext2 -m 0 /dev/ram1 64
# mount /dev/ram1 /tmp/ramdisk/
# df /tmp/ramdisk/
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/ram1                   57        13        44  23% /tmp/ramdisk

> 2) once i create a ram disk, is there an indicator that tells
>    me that such a thing exists?  i mean, "free" will show me
>    that there's less free space, but that's about it.  is there
>    maybe an entry under /proc keeping track of ram disks?
>    you know ... maybe /proc/list_of_ram_disks?? :-)
>
> 3) once i create one (even if i'm still stuck with 4M), how
>    can i manually release it?  and again, is there a way to
>    verify the return of that ram disk space to the OS?

Not sure on either, to be honest.

- -- 
- -Michael

pgp key:  http://www.tuxfan.homeip.net:8080/gpgkey.txt
Red Hat Linux 7.{2,3}|8.0 in 8M of RAM: http://www.rule-project.org/
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+8Snjn/07WoAb/SsRAnSUAKCPDxVqb/xqCXlPVNv3FVo+XyQl2QCePXXH
hUz0znmZ8CmaPAzf5myRWZI=
=peiF
-----END PGP SIGNATURE-----


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to