Git Product home page Git Product logo

Comments (13)

GreenJoson avatar GreenJoson commented on September 3, 2024

centos7.5 xfs format

from xfs_undelete.

ianka avatar ianka commented on September 3, 2024

Please first check if the filesystem is mounted read-only (or umounted). You do that by calling "mount" and check for the "ro" option. It must be mounted read-only (or umounted) before recovery as the filesystem must be clean (no entries in the journal) for the script to work as intended.

I recently made some changes so that remount is only attempted when neccessary. Maybe it had not detected the need for remount correctly and skipped that step.

If that's the case, remount read-only or umount by hand and retry. And please report if that helped so I can investigate on the issue further.

from xfs_undelete.

ianka avatar ianka commented on September 3, 2024

Also, does it take a minute for the script to complete? Or does it return within a second?

from xfs_undelete.

ianka avatar ianka commented on September 3, 2024

Could you also please post the verbatim result of
$ mount
on your system?

from xfs_undelete.

GreenJoson avatar GreenJoson commented on September 3, 2024

[root@03AF15-A28 xfs_undedel]# df -Th
devtmpfs devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs tmpfs 7.8G 608K 7.8G 1% /dev/shm
tmpfs tmpfs 7.8G 743M 7.1G 10% /run
tmpfs tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/mapper/centos_03af15--a28-root xfs 50G 11G 40G 22% /
/dev/sda1 xfs 492M 182M 310M 38% /boot
tmpfs tmpfs 1.6G 0 1.6G 0% /run/user/0
/dev/mapper/centos_03af15--a28-home xfs 873G 87G 787G 10% /home

[root@03AF15-A28 xfs_undedel]# umount -l /home

[root@03AF15-A28 xfs_undedel]# df -Th
devtmpfs devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs tmpfs 7.8G 608K 7.8G 1% /dev/shm
tmpfs tmpfs 7.8G 743M 7.1G 10% /run
tmpfs tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/mapper/centos_03af15--a28-root xfs 50G 11G 40G 22% /
/dev/sda1 xfs 492M 182M 310M 38% /boot
tmpfs tmpfs 1.6G 0 1.6G 0% /run/user/0

[root@03AF15-A28 xfs_undedel]# tclsh xfs_undelete -o /home/tools/ /dev/mapper/centos_03af15--a28-home

District name /dev/mapper/centos_03af15--a28-home
Location of lost data /home/wwweb/
Mounted partition/home/
This stores the recovered files from /dev/mapper/centos_03af15--a28-home in the directory /home/tools/

[root@03AF15-A28 xfs_undedel]# tclsh xfs_undelete -o /home/tools/ /dev/mapper/centos_03af15--a28-home
Starting recovery.
Done. 2 (100%))

[root@03AF15-A28 xfs_undedel]# cd /home/tools
[root@03AF15-A28 tools]# ls

[root@03AF15-A28 ~]# cd xfs_undedel
[root@03AF15-A28 xfs_undedel]# tclsh xfs_undelete /dev/mapper/centos_03af15--a28-home

Is the location where the data was recovered not available in /home/?
I'm trying to be in the root now, but it's a little small, I don't know if there's a lack of space or something.

from xfs_undelete.

GreenJoson avatar GreenJoson commented on September 3, 2024

I waited an hour, and then I didn't see any data recovery.

from xfs_undelete.

ianka avatar ianka commented on September 3, 2024

-o /home/tools means it will place the recovered files in /home/tools. That's not wrong as you umounted /home before. It will try to create the target directory if it does not exist yet. It also says Starting recovery so opening of the filesystem was possible. It should say something like

# tclsh xfs_undelete -o /home/tools/ /dev/mapper/centos_03af15--a28-home
Starting recovery.
Checking  inode  713909451 ( 12%)
Recovered file -> /home/tools/2020-04-14-18-18_713909451.png
Recovered file -> /home/tools/2020-04-14-18-18_713909453.png
Checking  inode  981237190 ( 15%)

and so on. The Checking inode line is updated multiple times a second, as the inodes are scanned. Scanning a half-filled 350GB xfs takes about 30 seconds on my machine.

Does the script just hang without giving any messages?

from xfs_undelete.

GreenJoson avatar GreenJoson commented on September 3, 2024

Yes ,It just shows a scan, no prompt for recovery.
Checking inode 713909451 ( 12%)

not echo Recovered file -> XXXX messages

from xfs_undelete.

GreenJoson avatar GreenJoson commented on September 3, 2024

My directory was deleted by mistake because I added the --delete parameter when synchronizing with the backup server rsync, and the data on this server was deleted by synchronization.

from xfs_undelete.

GreenJoson avatar GreenJoson commented on September 3, 2024

Does this situation make it impossible to recover?

from xfs_undelete.

ianka avatar ianka commented on September 3, 2024

By default, the script does not recover files it cannot find out the filetype for. You could try specifying the -i "" option so it recovers those unidentifyable files. If this also leads to no result I'm afraid your rsync call made xfs re-use the deleted inodes immediately. In that case your files cannot be recovered by this tool as all the metadata is lost.

from xfs_undelete.

ianka avatar ianka commented on September 3, 2024

I also wonder if maybe the file utility in CentOS7.5 does not support the --mime-type option. Could you post the result of

$ file --version
$ file --brief --mime-type /etc/magic

from xfs_undelete.

ianka avatar ianka commented on September 3, 2024

You haven't replied since seven days. If this was a bug, I cannot investigate it without your help. Because of this I'm closing this issue and also remove the bug label.

Feel free to reopen the issue once you have new information.

I'm sorry this tool was no help in recovering your data.

from xfs_undelete.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.