我可以透過執行以下三行以 ec2-user 身分手動重新掛載 /home:
$ cd /
$ exec sudo -i
# mount -a
如何在 Ansible 中執行此操作而無需重新啟動?
編輯:/home 位於單獨的磁碟區。盒子上沒有其他用戶。刪除cd /
了 /home 的使用。它exec sudo -i
殺死了使用 /home 的 ec2-user 進程,並讓我以 root 身分登入。現在我可以毫無問題地卸載並安裝回家。
我可以透過執行以下三行以 ec2-user 身分手動重新掛載 /home:
$ cd /
$ exec sudo -i
# mount -a
如何在 Ansible 中執行此操作而無需重新啟動?
編輯:/home 位於單獨的磁碟區。盒子上沒有其他用戶。刪除cd /
了 /home 的使用。它exec sudo -i
殺死了使用 /home 的 ec2-user 進程,並讓我以 root 身分登入。現在我可以毫無問題地卸載並安裝回家。