Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add DiskIDTransform Rules #403

Merged
merged 13 commits into from
Jan 16, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add agent.json documentation
  • Loading branch information
ramonskie committed Jan 9, 2025
commit a6b83df4735c2c3a989c677dd915cc8fd4ab92ec
61 changes: 61 additions & 0 deletions stemcell_builder/stages/bosh_aws_agent_settings/assets/agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Disk ID transform rules
the following 2 json entries
```
"DiskIDTransformPattern": "^(vol-(.+))$",
"DiskIDTransformReplacement": "nvme-Amazon_Elastic_Block_Store_vol${2}"
```

## what it does
the `DiskIDTransformPattern` will match `vol-04b2a40747d7e9625` in to 2 groups `vol-` and `04b2a40747d7e9625`

the `DiskIDTransformReplacement` will match and replace `04b2a40747d7e9625` with `nvme-Amazon_Elastic_Block_Store_vol04b2a40747d7e9625`

## related information

contents of persistent_disk_hints.json
```
{
"vol-04b2a40747d7e9625": {
"ID": "vol-04b2a40747d7e9625",
"DeviceID": "",
"VolumeID": "/dev/disk/by-id/nvme-Amazon_Elastic_Block_Store_vol04b2a40747d7e9625",
"Lun": "",
"HostDeviceID": "",
"Path": "/dev/disk/by-id/nvme-Amazon_Elastic_Block_Store_vol04b2a40747d7e9625",
"ISCSISettings": {
"InitiatorName": "",
"Username": "",
"Target": "",
"Password": ""
},
"FileSystemType": "",
"MountOptions": null,
"Partitioner": ""
}
}
```

files listed in `/dev/disk/by-id`
```
nvme-Amazon_Elastic_Block_Store_vol04b2a40747d7e9625
nvme-Amazon_Elastic_Block_Store_vol04b2a40747d7e9625_1
nvme-Amazon_Elastic_Block_Store_vol04b2a40747d7e9625_1-part1
nvme-Amazon_Elastic_Block_Store_vol04b2a40747d7e9625-part1
nvme-Amazon_Elastic_Block_Store_vol0c2ee6da5d33b8f8b
nvme-Amazon_Elastic_Block_Store_vol0c2ee6da5d33b8f8b_1
nvme-Amazon_Elastic_Block_Store_vol0c2ee6da5d33b8f8b_1-part1
nvme-Amazon_Elastic_Block_Store_vol0c2ee6da5d33b8f8b_1-part2
nvme-Amazon_Elastic_Block_Store_vol0c2ee6da5d33b8f8b-part1
nvme-Amazon_Elastic_Block_Store_vol0c2ee6da5d33b8f8b-part2
nvme-Amazon_Elastic_Block_Store_vol0c67d3300b92fe851
nvme-Amazon_Elastic_Block_Store_vol0c67d3300b92fe851_1
nvme-Amazon_Elastic_Block_Store_vol0c67d3300b92fe851_1-part1
nvme-Amazon_Elastic_Block_Store_vol0c67d3300b92fe851-part1
nvme-nvme.1d0f-766f6c3034623261343037343764376539363235-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001
nvme-nvme.1d0f-766f6c3034623261343037343764376539363235-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part1
nvme-nvme.1d0f-766f6c3063326565366461356433336238663862-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001
nvme-nvme.1d0f-766f6c3063326565366461356433336238663862-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part1
nvme-nvme.1d0f-766f6c3063326565366461356433336238663862-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part2
nvme-nvme.1d0f-766f6c3063363764333330306239326665383531-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001
nvme-nvme.1d0f-766f6c3063363764333330306239326665383531-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part1
```