- Más nuevo
- Más votos
- Más comentarios
Hey Lionel!
Just thought I would update this thread with the solution. I managed to reproduce your issue by launching a fresh instance from the same AMI as yours ami-05851072 and adding the following mount instruction in /etc/fstab :
$ echo "/dev/xvdf1 /tmp ext4 rw 0 2" >> /etc/fstab
$ reboot
The commands above is supposed to mount /dev/xvdf1 on the directory "/tmp" when the system boots. My instance managed to boot with the root partition mounted as Read-Only just as you experienced. Turns out there is a bug in cloud images of RedHat 7.0 that causes the root partition to be mounted as Read-Only when a device is mounted on the directory /tmp. The most annoying thing about this bug is that since it causes the root filesystem to be mounted as Read-Only, the system will not able to log any details we could use to identify this issue. This explains why it's hard to diagnose this issue from the system log files. Anyways, it seems this was resolved in RedHat 7.2 but you can use the following command to fix this bug on your system:
$ sudo systemctl unmask tmp.mount && sudo systemctl enable tmp.mount
Verify that tmp.mount unit is enabled by running this command:
$ sudo systemctl list-unit-files tmp.mount
UNIT FILE STATE
tmp.mount enabled <===== as you can see "tmp.mount" is now enabled.
Reboot your system to see if this resolved the issue:
$ sudo reboot
The command above allows /tmp on tmpfs to be mounted by default. Mounting of /tmp on tmpfs is disabled by default on ALL cloud images to discourage people from bind mounting tmp which is considered bad practice in cloud environments. However, there seems to be a bug in systemd on RedHat 7.0 that causes the root filesystem to be mounted as RO if tmp.mount is disabled AND there is a mount instruction for /tmp in /etc/fstab. You can follow this bug on this site [1] for more information about it.
References
[1] Red Hat Bugzilla – Bug 1243494 - https://bugzilla.redhat.com/show_bug.cgi?id=1243494
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace un año