%20%E3%81%AB%E5%86%8D%E3%83%9E%E3%82%A6%E3%83%B3%E3%83%88%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93%E3%81%A7%E3%81%97%E3%81%9F.png)
/tmp
Ubuntu サーバー (14.04) の RAM にマウントしようとしています:
echo "tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0" | tee -a /etc/fstab
この行は問題ないようで、 に追加され/etc/fstab
、システムの再起動後に/tmp
期待どおりにマウントされます。
しかし、この変更をオンザフライで(システムを再起動せずに)適用しようとすると、次のようになります。
mount -o remount /tmp
次のエラーが発生します:マウントされていないか、オプションが間違っています
なにが問題ですか?
答え1
マンページからmount
:
remount Attempt to remount an already-mounted filesystem. This is commonly used to change the mount flags for a filesystem, especially to make a readonly filesystem writeable. It does not change device or mount point.
/tmp
を試行したときに がまだマウントされていないためmount -o remount /tmp
、失敗します。 がまだマウントされていないときに を動作させるには、mount /tmp
代わりに を実行する必要があります。