How to reclaim space in a thin provisioned LUN using fstrim?
Issue
- Thin provisioned LUN returns an allocation error, even though the
dfcommand says the device has free space:
kernel: blk_update_request: critical space allocation error, dev sdb, sector 426379264
kernel: blk_update_request: critical space allocation error, dev dm-2, sector 426379264
kernel: sd 12:0:2:1: [sdh] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
kernel: sd 12:0:2:1: [sdh] tag#0 Sense Key : Data Protect [current]
kernel: sd 12:0:2:1: [sdh] tag#0 Add. Sense: Space allocation failed write protect
kernel: sd 12:0:2:1: [sdh] tag#0 CDB: Write(10) 2a 00 16 9d a1 90 00 00 08 00
kernel: blk_update_request: critical space allocation error, dev sdh, sector 379429264
kernel: sd 11:0:3:1: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
kernel: sd 11:0:3:1: [sdd] tag#0 Sense Key : Data Protect [current]
kernel: sd 11:0:3:1: [sdd] tag#0 Add. Sense: Space allocation failed write protect
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Thin provisioned LUN
- LVM2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.