Linux : ram disk
tmpfs | ramfs | ramdisk | |
---|---|---|---|
Write out of limitation | Error | keep writing | Error |
Fixed Size | Y | N | Y |
Uses Swap | Y | N | N |
Volatile Storage | Y | Y | Y |
format before use | N | N | Y |
以下為各種ram disk的相關指令
tmpfs
root@~# mkdir tmpfs root@~# mount -t tmpfs -o size=20m tmpfs tmpfs/
ramfs
root@~# mkdir ramfs root@~# mount -t ramfs -o size=20m ramfs tmpfs/
ramdisk
root@~# mkdir ramdisk root@~# mkfs.ext3 /dev/ram9 mke2fs 1.42.13 (17-May-2015) Discarding device blocks: done Creating filesystem with 65536 1k blocks and 16384 inodes Filesystem UUID: df58a293-4574-4e95-bde5-e60618eee94b Superblock backups stored on blocks: 8193, 24577, 40961, 57345 Allocating group tables: done Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done root@~# mount -t ext3 /dev/ram9 ramdisk/
留言
張貼留言