wazuh / wazuh-cloudformation

Wazuh - Amazon AWS Cloudformation
https://wazuh.com
40 stars 22 forks source link

Some EBS volumes are not being used #45

Closed manuasir closed 4 years ago

manuasir commented 4 years ago

Hello folks,

It seems that there are issues with non-Amazon Linux AMIs. When a new volume is declared and attached to an instance using a CloudFormation template, we have something like this:

      BlockDeviceMappings:
        - DeviceName: /dev/xvda
          Ebs:
            VolumeSize: 50
            VolumeType: gp2

We found this way is only valid for Amazon Linux AMIs, the image is in charge of mounting the partition to the instance under the hood. But when we work with CentOS, Windows or Ubuntu AMIs that process is not being made, so we have a default EBS volume per instance and unused custom EBS volumes. The error was to set up the device name as /dev/xvda for all systems, and the solution is about changing it from xvda to sda1.

Cheers

manuasir commented 4 years ago

Done here #46