-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
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