Sponsored Content
Top Forums UNIX for Advanced & Expert Users How does extundelete handle multiple versions of the same inode? Post 302987620 by chebarbudo on Tuesday 13th of December 2016 11:02:48 AM
Old 12-13-2016
How does extundelete handle multiple versions of the same inode?

Hi,

I noticed a weird behavior in extundelete way to choose the filename to which it will restore a given inode. Here is an example :

Code:
root@rescue:~# for after in '' 0 740 741 $(date -d 'now - 1 year' +%s); do rm -rf RECOVERED_FILES/; echo -e "$(date -d@$after 2> /dev/null || echo No date)\t$(extundelete --restore-all ${after:+--after $after} --log info /dev/md2 | grep 694)"; done | column -tns$'\t'
No date                       Restored inode 694 to file RECOVERED_FILES/lib/x86_64-linux-gnu/libanl-2.13.so
Thu Jan  1 01:00:00 CET 1970  Restored inode 694 to file RECOVERED_FILES/lib/x86_64-linux-gnu/libanl-2.13.so
Thu Jan  1 01:12:20 CET 1970  Restored inode 694 to file RECOVERED_FILES/lib/x86_64-linux-gnu/libanl-2.13.so
Thu Jan  1 01:12:21 CET 1970  Restored inode 694 to file RECOVERED_FILES/lib/udev/rules.d/60-gnupg.rules
Tue Dec  8 16:22:37 CET 2015  Restored inode 694 to file RECOVERED_FILES/lib/udev/rules.d/60-gnupg.rules

So apparently, the same inode has been used for two different files. Inode 694 was "/lib/x86_64-linux-gnu/libanl-2.13.so" from EPOCH to EPOCH+740 seconds and then it became "/lib/udev/rules.d/60-gnupg.rules" until today. I have no problem with this as in ext filesystems, the same inode can be reused once cleared. If I look at the file content (which is always the same whatever --after option I set), the actual file recovered is "60-gnupg.rules".

My first surprise is that a change on my system could happen on January 1st 1970 at 1:12. The install is at most 4 years old. But lets say the clock wasn't set at install time and the change happened after 12 minutes (I'm UTC+1). So I'm not complaining about it.

What I'm surprised about is that if one doesn't set an appropriate "--after" option, extundelete will recover an inode to it's oldest filename, leading to filesystem inconsistency.

Is this normal behavior?
Is there a workaround to it?

Regards
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Using multiple java versions in unix

Hello we are using java 1.2 in our shell / env it is also set in the main JAVA_HOME env var , but we have also java 1.4 installed , now we need to use new application that uses only java1.4 is there any way to point this specific application to use java 1.4 without changing the global... (2 Replies)
Discussion started by: umen
2 Replies

2. Shell Programming and Scripting

How to handle the Multiple Rows in the Database

Hi All, I have problem with database validations, actually my requirement is, my code will generate some seqno;s, which i have to check in database, whether the generated seqno;s are present in database or not, if the generated seqno;s are present in the database means, i need to generate... (2 Replies)
Discussion started by: hsekol
2 Replies

3. Shell Programming and Scripting

Handle Configuration File with same name of Parameter in multiple Sections

Hi I have a config file with multiple section and a parameter with the same name in each section. I need to read each parameter for distinct section. Parameter = 1 .... Parameter = 2 .... Parameter = 4 .... Tried this: grep -m1 '^*ProcessorsNumber' ServiceBrokerFramework.cfg |... (7 Replies)
Discussion started by: potro
7 Replies

4. Shell Programming and Scripting

How to handle multiple rows in a file

I have a FILE a.txt which has the following data 113901.94,113901.94,56950.97,56950.97,NOT MATCHING,NOT MATCHING 10693.04,10693.04,5346.52,5346.52,NOT MATCHING,NOT MATCHING 1901.94,1901.94,550.97,550.97,NOT MATCHING,NOT MATCHING 103.04,103.04,53.52,53.52,NOT MATCHING,NOT MATCHING #### This... (2 Replies)
Discussion started by: ksmbabu
2 Replies

5. Linux

Compiling with multiple versions of a library

Hello! I have a set of headers and libraries I want to use but they are mixed with ones I do not want to use. They are part of some official stuff, so I cannot modify them while begging and pleading for weeks. These headers and libraries are located here /long/official/path/to/include... (0 Replies)
Discussion started by: gobi
0 Replies

6. UNIX for Dummies Questions & Answers

how to handle multiple apps on host?

So, I'm going to install Oracle DB within my Suse host... Also, I would like to run Virtual Box and Tomcat.. ok, tomcat is going to be runnable app that will start at boot.. but, how to handle Oracle and virtual box? I would like to have an Oracle under it's own user, and to be able to use... (0 Replies)
Discussion started by: bongo
0 Replies

7. UNIX and Linux Applications

install multiple versions of firefox in linux

Since apt-get and yum won't let you install multiple versions of firefox I will explain how to here. 1. Go to this page and decide which version of firefox you want. ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/ I used this one. ... (0 Replies)
Discussion started by: cokedude
0 Replies

8. UNIX for Dummies Questions & Answers

Patches - why multiple versions?

Hi just wondering really ...... I've done a showrev -p and am somewhat surprised to see apparently multiple different versions of the same patches ...... 112161-02 112161-03 112161-04 It's my understanding that a newer revision of a patch , -04 in this case supercedes all previous... (2 Replies)
Discussion started by: Martincorneuk
2 Replies

9. Red Hat

Installing multiple versions of same package.

I need to install a older version of gnupg but not delete the current version of gnup2 on RHEL 6.4. What would be the correct syntax to install this? Tried to install and relocate it and still getting conflicts. aXXXXXX:root# rpm -ivh /root/rpmbuild/RPMS/x86_64/gnupg-1.4.16-1.x86_64.rpm... (2 Replies)
Discussion started by: soupbone38
2 Replies

10. Fedora

Segmentation fault while trying to recover file with extundelete

hello, I accidentally removed a directory with its contents with rm -r and I don't have a backup. I got to know about extundelete utility on linux and downloaded on my Linux Fedora 28 notebook PC. The file system is ext4. I log in to the system as single user mode and unmount the /home directory... (2 Replies)
Discussion started by: milhan
2 Replies
NTFSINFO(8)						      System Manager's Manual						       NTFSINFO(8)

NAME
ntfsinfo - dump a file's attributes SYNOPSIS
ntfsinfo [options] device DESCRIPTION
ntfsinfo will dump the attributes of inode inode-number or the file path-filename and/or information about the mft ( -m option). Run ntfs- info without arguments for a full list of options. OPTIONS
Below is a summary of all the options that ntfsinfo accepts. Nearly all options have two equivalent names. The short name is preceded by - and the long name is preceded by --. Any single letter options, that don't take an argument, can be combined into a single command, e.g. -fv is equivalent to -f -v. Long named options can be abbreviated to any unique prefix of their name. -F, --file FILE Show information about this file -f, --force This will override some sensible defaults, such as not overwriting an existing file. Use this option with caution. -h, --help Show a list of options with a brief description of each one. -i, --inode NUM Show information about this inode. -m, --mft Show information about the volume. -q, --quiet Produce less output. -t, --notime Do not display timestamps in the output. -v, --verbose Increase the amount of output that ntfsinfo prints. -V, --version Show the version number, copyright and license. BUGS
There are no known problems with ntfsinfo. If you find a bug please send an email describing the problem to the development team: linux-ntfs-dev@lists.sourceforge.net AUTHORS
ntfsinfo was written by Matthew J. Fanto, Anton Altaparmakov, Richard Russon, Szabolcs Szakacsits, Yuval Fledel, Yura Pakhuchiy and Cris- tian Klein. AVAILABILITY
ntfsinfo is part of the ntfsprogs package and is available from: http://www.linux-ntfs.org/content/view/19/37 The manual pages are available online at: http://man.linux-ntfs.org/ SEE ALSO
ntfsprogs(8) ntfsprogs 1.13.1 April 2006 NTFSINFO(8)
All times are GMT -4. The time now is 06:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy