You are not logged in.
Pages: 1
Hi Archers,
I am trying to create a ramdisk but can't create ramdisk higher than 16MB. If I create a ramdisk smaller tham 16MB, everything is ok, but if I create higher, I got the following error:
mkfs -t ext4 /dev/ramcache 102400
mke2fs 1.41.14 (22-Dec-2010)
mkfs.ext4: Filesystem larger than apparent device size.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
25688 inodes, 102400 blocks
5120 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
13 block groups
8192 blocks per group, 8192 fragments per group
1976 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729
mkfs.ext4: Invalid argument while zeroing block 102336 at end of filesystem
Writing inode tables: done
Creating journal (4096 blocks): mkfs.ext4: Invalid argument
while trying to create journal
I have even re-compiled the kernel with followings but get the same problem
CONFIG_BLK_DEV_RAM=m
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=524288
Any Solution for this?
Cheers
Offline
I've never made a ramdisk that way, I always make an entry in fstab with the size:
tmpfs /tmp tmpfs noatime,nodev,size=1g,mode=1777 0 0
Note the size=1g option
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
I've never made a ramdisk that way, I always make an entry in fstab with the size:
tmpfs /tmp tmpfs noatime,nodev,size=1g,mode=1777 0 0
Note the size=1g option
I would like to create a Ramdis such as /dev/ram0 so that I can mount and unmount it without losing my data. with tmpfs, after unmount, all my data will be erased.
Cheers
Offline
I do not know what is your objetive, but at least there is a better thing to use as block device on ram that is managed via sysfs and is compressed: zram.
# modprobe zram
# echo $((512*2**20)) > /sys/block/zram0/disksize
# mkfs.ext4 /dev/zram0
# cat /sys/block/zram0/orig_data_size
217088
# cat /sys/block/zram0/compr_data_size
2859
Read the documentation for better details.
Offline
Pages: 1