Score:1

Mount issue for EBS at EC2 instance

in flag

For historical reason we have 2 EBS drive for our application (which is an EC2 instance, using Amazon2 Linux), one needs to mount as

/data

And the other need to mount as

/data/inhouse

However, after we create a new build of the application, we found it is quite often that "/data/inhouse" cannot mount automatically but need to manually mount it. Not sure if there is any solution to that?

BTW below are the error log when start

xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Input/output error
meta-data=/dev/nvme1n1           isize=512    agcount=4, agsize=19660800 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1 spinodes=0
data     =                       bsize=4096   blocks=78643200, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=38400, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
Score:0
id flag
MLu

Looks like your 2nd drive is not formatted. By default only the first disk has a filesystrm on it, all other disks must be formatted (mkfs.xfs) before use. This can be done automatically in some startup script.

in flag
Thanks a lot, but in fact it is formatted, and it will work if I restart the host a few time. However, not sure how can I prevent the try restart
Score:0
id flag
MLu

You have to ensure the order in which the disks are mounted. First you must mount /data and only then /data/inhouse

Typically with /etc/fstab it can be quite random but you can enforce the order with requires-mounts-for fstab option.

Check out this article for more details: How to manage order of disk drives mounting

Hope that helps :)

in flag
Thanks a lot for getting back but look like AWS EBS vol use a difference way to mount, it is only "/" at my fstab. And yes, I exactly looking for something like "requires-mounts-for" for EBS config
MLu avatar
id flag
MLu
@CarfieldYim then your system is probably using [`systemd.mount`](https://www.freedesktop.org/software/systemd/man/systemd.mount.html) rather than fstab. The same article linked in my response talks about that too. For more info google something like *mounting disks with systemd* and come back if you have any issues with that.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.