"thin_repair" command gives error 'you cannot run this tool with these options on live metadata'

Solution Verified - Updated -

Issue

  • thin_repair command fails with message "you cannot run this tool with these options on live metadata"
# thin_repair -i /dev/mapper/VG-mypool00_tmeta -o /dev/VG/newmetaLV
syscall 'open' failed: Device or resource busy
Note: you cannot run this tool with these options on live metadata.
  • How to repair thinpool metadata when "/" is a thinLV in the same pool.
Filesystem            1K-blocks     Used Available Use% Mounted on
/dev/mapper/VG-root 158384576 17999660 140384916  12% /

Name              Maj Min Stat Open Targ Event  UUID                                                                      
VG-swap         253   4 L--w    2    1      0 LVM-4jvjo12345678kTPqeDAaPNa2uPDFCnLEOhTerHTMABCDEFGH85KkcdHsNd166Pm      
VG-root         253   3 L--w    1    1      0 LVM-4jvjo4fgw2OcckTPqeDAABCDEFGH123456lIdkBzoPfFex1tpHoA8Kh0AyTWVef5 

Aug 12 13:45:51 hostname lvm[880]: WARNING: Thin pool VG-mypool00-tpool metadata is now 98.05% full.
Aug 12 13:45:51 hostname lvm[880]: WARNING: Thin pool VG-mypool00-tpool data is now 91.04% full.

Aug 12 18:17:30 hostname kernel: device-mapper: thin: No free metadata blocks
Aug 12 18:17:30 hostname kernel: device-mapper: thin: 253:2: switching pool to read-only mode
Aug 12 18:17:31 hostname lvm[880]: WARNING: Thin pool VG-mypool00-tpool metadata is now 100.00% full.
Aug 12 18:17:31 hostname kernel: dm-3: writeback error on inode 470035623, offset 559415296, sector 285794304
Aug 12 18:17:31 hostname kernel: dm-3: writeback error on inode 470035624, offset 0, sector 286798720
Aug 12 18:17:31 hostname kernel: dm-3: writeback error on inode 470035623, offset 664272896, sector 285999104
Aug 12 18:17:32 hostname kernel: dm-3: writeback error on inode 470035624, offset 104857600, sector 287003520
Aug 12 18:17:32 hostname kernel: dm-3: writeback error on inode 470035623, offset 769130496, sector 286203904
Aug 12 18:17:32 hostname kernel: dm-3: writeback error on inode 470035624, offset 209715200, sector 287208320
Aug 12 18:17:32 hostname kernel: dm-3: writeback error on inode 470035623, offset 873988096, sector 286408704

Environment

  • Red Hat Enterprise Linux 6, 7, 8, 9
  • LVM Thin Provisioning

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content