Fix/thinpool detection as it allows to delete active thinpool with different name than "data" #6730
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✍️ Description
Script would allow user to choose to delete an active thinpool with volumes under it:
-> Issue, system thinpool called "data" is excluded here
if [[ "$lv" == "data" || "$lv" == "root" || "$lv" == "swap" || "$lv" =~ ^osd-block- ]]; then
But if custom thinpools exist these will be offered up for deletion by the script:

Example:
Fix is avoiding all thinpools, now does not allow the user to delete custom thinpool.

I´ve tested functionality after the fix,
-> still lable to delete orphan lvm afterwards, and thin-pools are excluded.
Its questionable if actually deleting a thinpool would work if it still has volumes, mine would have open mounts and cmd would fail, but eventually users could be in a state where the cmd would actually succeed and introduce dl? I dont want to test deleting a thinpool.
/dev/nvme0n1p3 (Physical Partition)
└── pve (VG)
├── data (Thin Pool LV) <<<< protected before fix
│ ├── data_tdata (Thin Pool Data LV)
│ └── data_tmeta (Thin Pool Metadata LV)
├── vm-100-disk-0 (Thin LV inside 'data')
/dev/sda (Physical Disk)
└── 4TBSSD (VG)
├── thinpool (Thin Pool LV) <<<< not protected before fix, but after.
│ ├── thinpool_tdata (Thin Pool Data LV)
│ └── thinpool_tmeta (Thin Pool Metadata LV)
├── vm-100-disk-0 (Thin LV inside 'thinpool')
fix is using this logic:
🔗 Related PR / Issue
Link: #
✅ Prerequisites (X in brackets)
🛠️ Type of Change (X in brackets)
README
,AppName.md
,CONTRIBUTING.md
, or other docs.