#] #] ********************* #] "$d_SysMaint"'drives - disk & USB memory/ramdisk notes.txt' www.BillHowell.ca 05Dec2019 initial # view in text editor, using constant-width font (eg Liberation Mono 10pt), tabWidth = 3 48************************************************48 24************************24 # Table of Contents : # $ grep "^#]" "$d_PROJECTS"'Contacts/_Howell - email signature.txt' | sed 's|^#\] | |' >"$d_PROJECTS"'Contacts/_Howell - email signature, TableOfContents.txt' ************************** # +--+ #] [toRead, revisit]*[paper, email, vid,etc]s, use |*| anywhere in doc - pulls out line # $ grep "\(|\*|\)" "$d_PROJECTS"'Contacts/_Howell - email signature.txt' | sed 's|^#\] ||' 24************************24 08********08 #] ??Apr2025 08********08 #] ??Apr2025 08********08 #] ??Apr2025 08********08 #] ??Apr2025 08********08 #] ??Apr2025 08********08 #] ??Apr2025 08********08 #] ??Apr2025 08********08 #] 12Apr2025 no ramdisk after installing Linux Mint see 05Dec2019 below : I put this in .bashrc so ramdisk only creted once (this will likely fail, as it "sticks"?) check .bashrc $ 16h03m 12Apr25$ env | grep 'd_' | sort >> doesn't show ity of course 16h03m 12Apr25$ env | grep 'ram' | sort d_temp=/media/bill/ramdisk/ >> OK, but isn't created!? 16h22m 12Apr25$ if ! [ -d "$d_temp" ]; then sudo mount -t tmpfs -o size=5120m ramdisk /mnt/ramdisk; fi [sudo] password for bill: mount: /mnt/ramdisk: mount point does not exist. dmesg(1) may have more information after failed mount system call. ~ DO IT PROPERLY, as 05Dec2019 below, but put in /media/bill : $ sudo umount /mnt/ramdisk # to fix mistake $ sudo mkdir /media/bill/ramdisk $ sudo mount -t tmpfs -o size=5120m ramdisk /media/bill/ramdisk $ sudo df -h 08********08 #] 30Jul2020 video recording limits roughly 6 Gb/1 hr of recording - this would require much more than current ramdisk (2 Gb) from "/home/bill/.bashrc", Suse example : # for Suse # (04Jan2020 run only export line : I didn't need to set up the ramdisk, it was there from cold boot) : # 04Mar2020 >>properly mount ramdisk or scripts won't work if they use ramdisk # $ sudo mkdir /mnt/ramdisk # $ sudo mount -t tmpfs -o size=5120m ramdisk /mnt/ramdisk # $ sudo df -h # $ export d_home="/home/bill/" ; d_meda="/run/media/bill/" ; export d_temp="/mnt/ramdisk/" ; export d_travel="$d_meda""SAMSUNG_G4/" ; export d_SWAPPER="$d_home""SWAPPER/" ; export d_HOWELL_BASE="$d_home""HOWELL_BASE/" ; # Use SWAPPER USB drive 08********08 #] 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