直接修改原本的目录暂时没找到办法,但可以通过挂载的方式在原有目录或新建目录改造
如:
[[email protected] /]# 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
修改:
[[email protected] /]# mkdir /mnt/ram
[[email protected] /]# mount -t tmpfs -o size=1024m tmpfs /mnt/ram
[[email protected] /]# 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