Hello,
It would be great to see some additional fields for disk devices coming back as Ansible facts.
In particular, disk serial number would be very useful for scripting partitioning and raid setup of
disks based on drive serial (reliable) rather than based on disk letter (such as sda) which is
subject to the random drive letter re-ordering that many sas controllers do.
Other facts that could be useful:
* Firmware Version - to help find drives, esp. SSD's, that need firmware updates
* Both logical and physical sector sizes (may help in partitioning/raid/file system creation)
* LU WWN Device Id (not sure what it's used for actually)
For reference, info from smartctl -a :
=== START OF INFORMATION SECTION ===
Device Model: ST240FP0021
Serial Number: Z5800FZA
LU WWN Device Id: 5 000c50 02ff17e7b
Firmware Version: B690
User Capacity: 240,057,409,536 bytes [240 GB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 8
ATA Standard is: ATA-8-ACS revision 4
Local Time is: Sun Nov 16 15:08:13 2014 PST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
==================================================================
For reference, a typical fact block (Ansible 1.7.2) for a disk looks like the following:
"sda": {
"holders": [],
"host": "RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2208 [Thunderbolt] (rev 05)",
"model": "ST240FP0021",
"partitions": {
"sda1": {
"sectors": "467631247",
"sectorsize": 512,
"size": "222.98 GB",
"start": "2048"
}
},
"removable": "0",
"rotational": "0",
"scheduler_mode": "cfq",
"sectors": "468862128",
"sectorsize": "4096",
"size": "1.75 TB",
"support_discard": "0",
"vendor": "ATA"
},
Regards,
--Ed