I've configured an OpsWorks stack and my layer is set up so that a 50 GB volume will be attached to each instance I launch.
A new EBS volume gets correctly created, attached and mounted to newly launched instances. Here's what I see immediately after the first boot:
[root@biscotti ec2-user]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 1.9G 5.9G 25% /
tmpfs 298M 0 298M 0% /dev/shm
/dev/xvdi 50G 33M 50G 1% /srv/www <---------
[root@biscotti ec2-user]# mount
/dev/xvda1 on / type ext4 (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/xvdi on /srv/www type xfs (rw,noatime) <---------
However, if I reboot the instance, the volume will not be automatically re-mounted:
[root@biscotti ec2-user]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 1.9G 5.9G 25% /
tmpfs 298M 0 298M 0% /dev/shm
[root@biscotti ec2-user]# mount
/dev/xvda1 on / type ext4 (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
If I type
sudo mount -a
everything will get back to normal:
[root@biscotti ec2-user]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 1.9G 5.9G 25% /
tmpfs 298M 0 298M 0% /dev/shm
/dev/xvdi 50G 33M 50G 1% /srv/www
[root@biscotti ec2-user]# mount
/dev/xvda1 on / type ext4 (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/xvdi on /srv/www type xfs (rw,noatime)
How do I get OpsWorks to re-mount the EBS volume automatically for me?
Thanks in advance.