sfu*_*ger 6 ubuntu mount fstab amazon-ec2
我的 /etc/fstab 中有这一行:
/mnt/tmp /tmp none bind,nobootwait
Run Code Online (Sandbox Code Playgroud)
然而,在 EC2 上,/mnt 可能会在重新启动期间丢失,导致由于不存在的 /mnt/tmp 而导致挂载失败。那么有没有办法显式创建这个目录?
您可以将以下几行放入 /etc/rc.local 文件中:
mkdir -p /mnt/tmp && mount --bind -o nobootwait /mnt/tmp /tmp
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
7264 次 |
最近记录: |