LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-07-2006, 10:00 AM   #1
khoryh
LQ Newbie
 
Registered: Dec 2006
Posts: 2

Rep: Reputation: 0
Undelete XFS file in SGI


Hi all,
I need help and your expertise on XFS. We have accidentally deleted some important files from our SGI XFS system and fortunately we done have backup for the files. Is there any luck that we can still undelete the deleted file on XFS.

I have checked thru a few website but unfortunately the findings are not good. I was told it is impossible to undelete a file in XFS.

Does anyone know any undelete tool that we can use ? Any suggestion would be great. Your input or ideal would be very appreciated. Thank you for sharing.


Kent
 
Old 12-07-2006, 10:21 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
If a service might still have a handle to the files, you could use "lsof" to determine the process that is using them. I'm not certain what you mean by the "SGI". Besides Meaning Silicon Graphics, are you running Linux on an SGI machine rather than a Unix? ( You posted in Linx-General ). If that is the case, and you are using the Linux, then you have the /proc pseudo filesystem. If you haven't rebooted, and since the file is important maybe a background service still has it open. If that is the case, check: lsof | grep <filename>

For example:
Code:
lsof | grep Beagle\.dll
:~> lsof | grep Beagle\.dll
beagled   14474   jschiwal  mem       REG                3,6    38912     180320 /usr/lib64/beagle/Beagle.dll
beagled   14474   jschiwal    7r      REG                3,6    38912     180320 /usr/lib64/beagle/Beagle.dll
beagled-h 19306   jschiwal  mem       REG                3,6    38912     180320 /usr/lib64/beagle/Beagle.dll
beagled-h 19306   jschiwal    8r      REG                3,6    38912     180320 /usr/lib64/beagle/Beagle.dll

cd /proc/14474/fd
jschiwal@hpamd64:/proc/14474/fd> ls -l | grep Beagle\.dll
lr-x------ 1 jschiwal users 64 2006-12-07 08:01 7 -> /usr/lib64/beagle/Beagle.dll

jschiwal@hpamd64:/proc/14474/fd> cat 7 >/tmp/usr_lib64_beagle_Beagle.dll
jschiwal@hpamd64:/proc/14474/fd> file /tmp/usr_lib64_beagle_Beagle.dll
/tmp/usr_lib64_beagle_Beagle.dll: PE executable for MS Windows (DLL) (console) Intel 80386 32-bit, Mono/.Net assembly
If the system or a program still has a handle open on the file, then the directory entry is gone, but the file is still there.
 
Old 12-07-2006, 10:39 AM   #3
khoryh
LQ Newbie
 
Registered: Dec 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Hi JSChiwal,

Thank you for your advise. Yes, we are running Linux on SGI machine.Some of the deleted files are very old files that I afraid no background service still has it open. Any chances to recover them ? we havent reboot the server.

Thanks again.

Kent
 
Old 12-07-2006, 11:52 PM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Sorry, I'm not familiar with the XFS filesystem. For text files, you can use grep or a similar tool to try to locate the file on the device itself. Having located where the file is you can use the dd command with an offset to copy the file. This type of thing is often done from an image of the drive. You might also try looking at the info or man page for the "fine" command. Some files have particular "magic numbers" which could be used to locate the file. The patterns that "file" uses are listed in /usr/share/misc/magic.
 
Old 10-25-2009, 04:09 PM   #5
Danws
LQ Newbie
 
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mac OS X, Windows 7
Posts: 12

Rep: Reputation: 0
The relevant thread: Howto: undelete files on XFS
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
undelete file sy4 General 2 08-08-2004 10:25 AM
reiserfs file undelete Tafta Linux - Security 1 03-22-2004 05:09 AM
Help me install RH 7.3 w/ SGI-XFS Thaidog Red Hat 0 02-19-2004 10:38 AM
Linux, SGI, XFS and stereographics clar77 Linux - Hardware 0 03-09-2003 08:49 PM
RedHat +SGI XFS zeky Linux - General 4 07-19-2002 08:37 PM


All times are GMT -5. The time now is 02:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration