xfs_repair fails with pwrite failed: Input/output error

Solution Verified - Updated -

Issue

  • An XFS filesystem was corrupted, but xfs_repair cannot repair the filesystem with the following error.

    # xfs_repair <logical volume>
    ...
    xfs_repair: pwrite failed: Input/output error
    releasing dirty buffer (bulk) to free list!
    

    or

    # xfs_repair <logical volume>
    ...
    xfs_repair: pwrite failed: No space left on device
    releasing dirty buffer (bulk) to free list!
    
  • In /var/log/messages we could see below errors:

    lvm[1446]: WARNING: Thin pool vg00-tpool0-tpool metadata is now 95.08% full.
    kernel: device-mapper: thin: 253:2: reached low water mark for metadata device: sending event.
    ...
    kernel: device-mapper: thin: No free metadata blocks
    kernel: device-mapper: thin: 253:2: switching pool to read-only mode    
    

Environment

  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 7
  • XFS filesystem
  • 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