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
asked 19 days ago372 views
2 Answers
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
EXPERT
Steve_M
answered 19 days ago
  • 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
answered 19 days ago
profile picture
EXPERT
Kallu
reviewed 19 days ago
  • I have already added the disk in the fstab file. The issue occurs randomly once or twice a week.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions