Ever since I upgraded to 15.10, fdisk -l reports 16 ram disks (/dev/ram0 ... /dev/ram15).
I'm a bit unsure what those are needed for. Is it safe to delete them? If not, how can I get rid of that fdisk output?
|
|
||||
|
|
|
This is perfectly normal on Linux systems. It's kind of a preparatory action for the case that the RAM disks should be required. Each of them has a size of 64 MiB, a very low value. If necessary, the size will be increased automatically. Why suddenly 16 RAM disks are available in Wily, can be explained only with difficulty. I have tested the default RAM disks on:
|
|||||||||||||||||
|
|
No idea why fdisk is suddenly reporting /dev/ram. You can however tell fdisk to only report specific devices.
Will list real drives. Alternatively you could also use parted and lsblk. Parted output for one drive here.
Corresponding lsblk output
|
|||||
|
|
I know this thread is old, but I came across it only recently.
After installing Slackware 14.2 I got the same 16 RAM disks in the output of
Maybe this helps some others... |
|||||
|
|
The post by Johannes is correct. The ram-disks have been in the kernel for a long time, it is the behavior of fdisk that changed. Instead of patching fdisk, I wrote a simple perl script (5 lines of code, 6 comment lines) to handle the issue. I put it into
As of April 2017, the ram disks no longer appear by default with the current Ubuntu kernel, so this issue is resolved. See: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1593293 |
||||
|
|
|
This behaviour is governed by kernel options that you can only change by recompiling a custom kernel. You can change the size of the ram* devices using a GRUB parameter ramdisk_size but not the count. This is useless, because even if you have lots of memory every ramdisk will increase to whatever size you set. So for instance if you want an 8GB ramdisk--which I do, see below--you'll get 16x 8GB instances. I don't know whether this is harmless if you don't use most of them, but I'm reluctant to brick my system if it isn't. I want to use a 8GB /dev/ram device to mirror with an 8GB hard disk partition for the specific purpose of putting a hot disk area on it. My application will automatically write the blocks out to regular storage based on the free space, so it doesn't matter that it's small. With write-behind under mdadm,this should have the effect of making writes blazing fast if they are bursty, with the HDD side of the mirror catching up when things are quieter to provide at least some data protection. I have used this setup with Solaris, but it doesn't seem to be possible with Linux as it comes out of the box. Since RAM is orders of magnitude faster than SSD, this should be a win, but I can't try it. As others have noticed, if you build a RAID1 with tmpfs, it won't reassemble at boot because the step that initialises tmpfs is far too late in the boot process--at mountall. Your mds are well and truly built by then, so it fails, and you have to rebuild it manually. OTOH /dev/ram* devices would be perfect for this--if you could configure them. They are the very first thing that gets set up, and ram0 is the initial / filesystem. |
|||||||||
|