EC2 Instance Linux data disk mounting lost after stop and start of instance

0

We have attached a data disk to our EC2 Linux instance. When we fully stop and then start the instance, some days, the mounting is lost. To resolve the issue, we reboot the instance to fix it.

Has anyone else faced such an issue?

Sarthak
已提问 1 个月前389 查看次数
2 回答
0

Just want to double-check, this is an EBS volume that's been added and not EFS? And it's just attached to this single host, it's not using EBS Multi-Attach?

When we fully stop and then start the instance, some days, the mounting is lost. To resolve the issue, we reboot the instance to fix it.

The fact that a reboot fixes it suggests that the /etc/fstab entry is fine (otherwise it would never mount).

Does a reboot always fix it?

And when you go through the process (I presume from the AWS Console) of stop instance and then start instance, how frequently does the disk fail to mount?

profile picture
专家
Steve_M
已回答 1 个月前
  • Yes, the fstab entry is present.

    Yes, a reboot always fixes the issue.

    The disk fails to mount randomly once or twice a week.

  • What causes the instance to need to be started so regularly? I'm wondering if it's a forced stop or a crash or something else like that, that could mean the filesystem is in an inconsistent state next time the host is booted.

    When you say that a reboot always fixes it, is that a controlled reboot, like reboot or shutdown -r now or similar from the command line? So, different from the scenario of a forced stop or crash.

    Is it a particularly big filesystem? What filesystem type is it, e.g. xfs or ext4 etc.?

    Which flavour of Linux is the instance running? If it uses systemd then the filesystem will have its own unit, it will be in systemctl list-units | grep mount

    Next time the mount fails, what is the output of sudo systemctl status xyz.mount -l

  • Hi Steve, Below are answers to your questions:-

    1. What causes the instance to need to be started so regularly? Ans. These are the dev environment instances that start every day in business hours using AWS CLI commands.

    2. When you say that a reboot always fixes it, is that a controlled reboot, like reboot or shutdown -r now or similar from the command line? Ans. We take the normal reboot from the AWS console or from the AWS CLI command - sudo reboot now.

    3. Is it a particularly big filesystem? What filesystem type is it, e.g., xfs or ext4, etc.? Ans. No, it is not a big filesystem. It's just an additional EBS volume of 32 or 64 GB. The filesystem type is ext4

    4. Which flavor of Linux is the instance running? Ans. Linux Ubuntu 22.04 LTS

0

Hi

You need to add the mount point in fstab file, The mounting might not be configured properly in the /etc/fstab file, which is used to define how and where partitions should be mounted.

Here is the configuraation instructions to follow https://docs.aws.amazon.com/ebs/latest/userguide/ebs-using-volumes.html

profile picture
专家
GK
已回答 1 个月前
profile picture
专家
Kallu
已审核 1 个月前
  • I have already added the disk in the fstab file. The issue occurs randomly once or twice a week.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则