标签:style color strong sp on c linux ef size
通过挂载的方式在原有目录或新建目录改造如:
[root@luozhonghua /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_luozhonghua-lv_root
21G 4.1G 16G 21% /
tmpfs 4.0K 4.0K 0 100% /dev/shm
/dev/sda1 485M 32M 428M 7% /boot
tmpfs 4.0K 4.0K 0 100% /dev/shm
修改:
[root@luozhonghua /]# mkdir /mnt/ram
[root@luozhonghua /]# mount -t tmpfs -o size=1024m tmpfs /mnt/ram
[root@luozhonghua /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_luozhonghua-lv_root
21G 4.1G 16G 21% /
tmpfs 4.0K 4.0K 0 100% /dev/shm
/dev/sda1 485M 32M 428M 7% /boot
tmpfs 4.0K 4.0K 0 100% /dev/shm
tmpfs 1.0G 0 1.0G 0% /mnt/ram
注意:以上都是临时的,一旦重启linux就还原了,因此永久性的修改原配置如下:
[root@luozhonghua ~]# vi /etc/fstab
tmpfs /dev/shm tmpfs defaults,size=20G 0 0
标签:style color strong sp on c linux ef size
原文地址:http://blog.csdn.net/weitao1234/article/details/39438737