/run/media/bill/PROJECTS/System_maintenance/Linux/ramdisk notes.txt www.BillHowell.ca 05Dec2019 initial *********** 05Dec2019 set up ramdisk +-----+ https://kerneltalks.com/linux/how-to-create-ram-disk-in-linux/ How to create RAM disk? RAM disk can be created in simple two steps. One is to create directory on which it should be mounted and second step is to mount it on that directory using specific FS type. Make sure you have enough free RAM on system so that portion of it can be used in RAM disk. You can check it using free command. Lets create directory /mnt/ram_disk and mount RAM disk on it. Shell # mkdir /mnt/ram_disk # mount -t tmpfs -o size=1024m new_ram_disk /mnt/ram_disk In above mount command, -t should be followed by tmpfs or ramfs type. For ramfs, size is starting size of RAM disk since ramfs has limitless size. Size followed by name of the disk (of your choice ex. new_ram_disk). You can verify if its mounted properly using df command. Shell # df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda1 5.8G 2.9G 2.7G 53% / tmpfs 498M 0 498M 0% /dev/shm new_ram_disk 1.0G 0 1.0G 0% /mnt/ram_disk You can see newly created tmpfs of 1GB size is mounted on /mnt/ram_disk (highlighted above). You can add below entry in /etc/fstab as well to persist it over reboots as well. But keep in mind that data within RAM disk flushes for each reboot since its backed memory is volatile. I did : $ sudo mkdir /mnt/ramdisk $ sudo mount -t tmpfs -o size=5120m ramdisk /mnt/ramdisk $ sudo df -h >> seems to work, but is this on the hard drive? +-----+ https://www.suse.com/support/kb/doc/?id=7012396 Resolution The RAM Disk is created when the "brd" module is loaded (brd=block ram disk) modprobe brd This has three parameters. If no parameters are used you get the defaults. rd_nr : Maximum number of brd devices rd_size : Size of each RAM disk in kbytes. max_part : Maximum number of partitions per RAM disk For example if you want one 1GB RAM Disk that can have two partitions you would use: modprobe brd rd_size=1024000 max_part=2 rd_nr=1 The RAM Disk will then be in /dev/ram* You can then partition it as needed up to the max number of partitions. Then put a file system on it and mount it and your ready to use your RAM Disk. >> for me : $ sudo modprobe brd rd_size=5120000 max_part=2 rd_nr=1 >> didn't work # enddoc