ramdisk:
(1)
mkdir /tmp/tmpfs1
mount -t tmpfs none /tmp/tmpfs1
dd if=/dev/zero of=/tmp/tmpfs1/img.bin bs=1M seek=99 count=1
losetup /dev/loop0 /tmp/tmpfs1/img.bin已掛載
losetup /dev/loop0 顯示掛載點
losetup -d /dev/loop0 解除掛載
(2)
# mknod -m 660 /dev/ram0 b 1 0
# chown root:disk /dev/ram0
# mkdir -p /mnt/ramdisk
# mount -t ramfs -o size=4M,maxsize=4M /dev/ram0 /mnt/ramdisk
Let’s mount /dev/ram0 to /mnt/ramdisk and specify the filesystem size to 4MB. The filesystem in use is ramfs. Take note that the maxsize parameter is of no use actually.
沒有留言:
張貼留言