0

I can manually remount /home as the ec2-user by executing these three lines:

$ cd /
$ exec sudo -i
# mount -a

How do I do this in Ansible without rebooting?

Edit: /home is on a separate volume. No other users are on the box. The cd / removes usage of /home. The exec sudo -i kills the ec2-user process, which was using /home, and leaves me logged in as root. Now I can unmount and mount home without problems.

wirelessben
  • 77
  • 2
  • 7
  • Why do you need to do this in the first place? Is the volume not configured to be mounted automatically? – Gerald Schneider Nov 18 '22 at 14:44
  • I need to move the data on the volume to a bigger volume. So I change the /etc/fstab and remount. And yes, it is configured to mount automatically in fstab. – wirelessben Nov 18 '22 at 14:46

0 Answers0