Skip to contentSkip to conversation

Question: Is it possible to recover deleted files from a healthy XFS filesystem?

DISCUSSION Bc. Martin Šafránek 4 participants 5 messages May 5, 2025 – May 6, 2025

lore
Share & tools
lore
#0 lore raw

Hello everyone,

I have a question regarding XFS and file recovery.

Is there any method — official or unofficial — to recover deleted files from a healthy, uncorrupted XFS filesystem? I understand that XFS does not support undeletion, but I'm wondering if any remnants of metadata might still allow partial or full recovery, perhaps under specific conditions.

If anyone has insights, tools, or suggestions, I’d be very grateful.

Thank you for your time.

Best regards,
Martin Safranek

#1 lore raw
Quoted 9 lines · Bc. Martin Šafránek

Hello everyone,

I have a question regarding XFS and file recovery.

Is there any method — official or unofficial — to recover deleted files from a healthy, uncorrupted XFS filesystem? I understand that XFS does not support undeletion, but I'm wondering if any remnants of metadata might still allow partial or full recovery, perhaps under specific conditions.

If anyone has insights, tools, or suggestions, I’d be very grateful.

Thank you for your time.

It all depends on if the file's data have been overwritten or not. We have no tools to undelete files, but there are a few tools on the market for that.

I've successfully used this tool in the past: https://www.ufsexplorer.com

But I am by no means associated with them, and I have no responsibility to whatever happens to your data.

I know about other tools too, but I have no experience with them.

Quoted 5 lines

Best regards,
Martin Safranek

#2 lore raw
In reply to Bc. Martin Šafránek
Quoted 9 lines · Bc. Martin Šafránek

Hello everyone,

I have a question regarding XFS and file recovery.

Is there any method — official or unofficial — to recover deleted files from a healthy, uncorrupted XFS filesystem? I understand that XFS does not support undeletion, but I'm wondering if any remnants of metadata might still allow partial or full recovery, perhaps under specific conditions.

If anyone has insights, tools, or suggestions, I’d be very grateful.

Thank you for your time.

There are tools that search the disk blocks trying to find blocks that belonged to a file that was deleted. The first step would be to set that filesystem to read only, and hopefully, create an image.

I have never tried on an XFS filesystem, so I can't recommend any tool. Tools need to know the type of file you want to find.

Signature · 4 lines
Cheers / Saludos,

		Carlos E. R.
		(from 15.6 x86_64 at Telcontar)
#3 lore raw
In reply to Bc. Martin Šafránek

A long time ago there was a simple xfs_irecover tool to scan blocks for inode signatures. We never managed to port it to use libxfs and the code repository for it seems to have disappeared.

But in general, yes you can scan for inode clusters that have not been reused, but it is very low-level and dangerous if you don't know what you are doing.

#4 lore raw
Quoted 7 lines · Christoph Hellwig

A long time ago there was a simple xfs_irecover tool to scan blocks for inode signatures. We never managed to port it to use libxfs and the code repository for it seems to have disappeared.

But in general, yes you can scan for inode clusters that have not been reused, but it is very low-level and dangerous if you don't know what you are doing.

If you are looking for specific file types, PhotoRec
(https://www.cgsecurity.org/wiki/PhotoRec) might also be an option.