精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>电脑技术>>● FreeBSD>>系统设置>>软件安装与设置>>Re:freeBSD能用RAMDISK吗?

主题:Re:freeBSD能用RAMDISK吗?
发信人: ebiss()
整理人: zhcharles(2003-04-05 23:52:07), 站内信件
FreeBSD 和 Linux下: 
md 等同 ramdisk 
mfs 等同 tmpfs 

# man 4 md 

To specify the default maximum size of malloc(9) backed disks: 
options MD_NSECT=20000 # 10M 

The default maximum size of a md disk backed by malloc(9) is 
20,000 sectors of 512 bytes each. 
This can be changed with the kernel option MD_NSECT. 

EXAMPLES 
To mount a malloc(9) backed md device on /tmp: 

if [ -e /dev/md0 -a -e /dev/md0c ]; then 
disklabel -r -w md0 auto && 
newfs /dev/md0c && 
mount /dev/md0c /tmp && 
chmod 1777 /tmp 
fi 

SEE ALSO 
disklabel(5), disklabel(8), fdisk(8), loader(8), newfs(8), vmstat(8)

[关闭][返回]