Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-10543

Select EC2 device name programatically

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 2
    • 2023-02-23 "Stoney Baloney"

      When attaching an EBS volume in EC2, the user can specify the device name. However, the block device driver for the instance assigns the actual volume name when mounting the volume, and the name assigned can be different from the name that Amazon EC2 uses. This ticket is to update the testy backup script to programatically find the device name for an unmounted volume.

      Suggested solution (pending testing across distros):

      _root_device=$(findmnt -n -o SOURCE /)
      _fs=$(sudo blkid -o value -s TYPE "$_root_device")
      _mount_device=$(sudo blkid -t TYPE="$_fs" -o list | awk '/not mounted/ { print $1 }')
      
      echo $_mount_device

            Assignee:
            tammy.bailey@mongodb.com Tammy Bailey (Inactive)
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: