mount: Structure needs cleaning. How to repair without losing data?

Latest response

I am meeting the following issue:
[root@hostname ~]# mount /dev/db2vg/lcData /home/db2inst2
mount: mount /dev/mapper/db2vg-lcData on /home/db2inst2 failed: Structure needs cleaning
[root@hostname ~]# xfs_repair -n /dev/db2vg/lcData

a detail in the attachment.

How can I repair this filesystem without losing my data?
Thanks.

Attachments

LONG CHEN's picture

Responses

[root@hostname ~]# xfs_repair /dev/db2vg/lcData

Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed.  Mount the filesystem to replay the log, and unmount it before
re-running xfs_repair.  If you are unable to mount the filesystem, then use
the -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.

Was this helpful?

We appreciate your feedback. Leave a comment if you would like to provide more detail.
It looks like we have some work to do. Leave a comment to let us know how we could improve.
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.