Re: RAM drive

From: Miquel van Smoorenburg
Date: Tue Jan 11 2005 - 02:41:20 EST


In article <20050111014406.18739.qmail@xxxxxxxxxxxxxxxxxxxxxxx>,
Phy Prabab <phyprabab@xxxxxxxxx> wrote:
>I need some assistance with creating a RAM disk of 8G
>and mounting it. I am using 2.6.10 with this
>proceedure:
>
>(ramdisk support enabled)
>dd bs=512 if=/dev/zero of=/dev/ram0 count=16384000
>mkfs.ext2 -m0 /dev/ram0 8192000
>mount -t ext2 /dev/ram0 /ramdisk0
>mount: wrong fs type, bad option, bad superblock on
>/dev/ram0,
> or too many mounted file systems
>
>I am not sure what the issue is. It worked on the
>2.4.x series.

I seem to remember that you must explicitly set the blocksize
to 1024 or 4096 when creating the filesystem. Eg mkfs.ext2 -b1024
or mkfs.ext2 -b4096 (don't remember which one exactly).

But with 2.6, why not use tmpfs ? Mount -t tmpfs -o size=8192000000 /ramdisk0

Mike.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/