LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 07-19-2018, 08:18 PM   #1
milhan
LQ Newbie
 
Registered: Sep 2005
Location: NH, USA
Distribution: Fedora, Ubuntu, SuSE 10.2 i686
Posts: 29

Rep: Reputation: 0
Warning while trying to recover a deleted directory with extundelete


hi,
I am using Fedora 28. My Desktop environment is LDXE. I accidentally deleted a directory with subdirectories and about 7gb data files. I am trying to recover them with extundelete utility but getting warning. I unmounted the filesystem, where the directory was, right away with
Code:
sudo umount /dev/mapper/fedora-home
when I try the command:
Code:
/ sudo extundelete --restore-directory /home/milhan/Desktop/path/directory /dev/mapper/fedora-home
NOTICE: Extended attributes are not restored.
WARNING: EXT3_FEATURE_INCOMPAT_RECOVER is set.
The partition should be unmounted to undelete any files without further data loss.
If the partition is not currently mounted, this message indicates 
it was improperly unmounted, and you should run fsck before continuing.
If you decide to continue, extundelete may overwrite some of the deleted
files and make recovering those files impossible.  You should unmount the
file system and check it with fsck before using extundelete.
Would you like to continue? (y/n)
n
/ sudo fsck /home
fsck from util-linux 2.32.1
e2fsck 1.44.2 (14-May-2018)
/dev/mapper/fedora-home is in use.
e2fsck: Cannot continue, aborting.
I get the above results.. Any help? Thanks.
 
Old 07-20-2018, 07:48 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,448
Blog Entries: 15

Rep: Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442
You didn't unmount properly as it tells you.

To unmount you specify the directory/filesystem name NOT the filesystem device:
CORRECT:
Code:
sudo umount /home
INCORRECT:
Code:
sudo umount /dev/mapper/fedora-home
On the flip side you specify the filesystem device with fsck not the name:
CORRECT:
Code:
sudo fsck /dev/mapper/fedora-home
INCORRECT:
Code:
sudo fsck /home

Last edited by MensaWater; 07-20-2018 at 07:51 AM.
 
Old 07-20-2018, 11:53 AM   #3
milhan
LQ Newbie
 
Registered: Sep 2005
Location: NH, USA
Distribution: Fedora, Ubuntu, SuSE 10.2 i686
Posts: 29

Original Poster
Rep: Reputation: 0
Hi, thank you for the reply.
Code:
/ sudo umount /home
umount: /home: target is busy.
/ sudo umount -l /home
/ cd
bash: cd: /home/milhan: No such file or directory
/ sudo fsck /dev/mapper/fedora-home 
fsck from util-linux 2.32.1
e2fsck 1.44.2 (14-May-2018)
/dev/mapper/fedora-home is in use.
e2fsck: Cannot continue, aborting.

/
 
Old 07-20-2018, 03:45 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,448
Blog Entries: 15

Rep: Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442Reputation: 1442
Run "df -hP /home" when you think it is unmounted. If it still shows the filesystem as /home instead of just / then it isn't unmounted.

The umount told you it was busy. You can see what is busying out a filesystem by running lsof on it e.g:
lsof /home

Since it is /home and you logged in as yourself it may be your own login that is busying out /home because you're in your home directory. You'd need to at least cd out of /home (e.g. cd /tmp) so you're not sitting in it.

"umount -l" is lazy unmount. It really should only be used for unmounting shared filesystem (e.g. NFS mounts) from other server to this one. Even then it should only be done if the mount has gone stale such as when the server that exported the share got shutdown or lost networking for some reason.
 
Old 07-20-2018, 04:24 PM   #5
milhan
LQ Newbie
 
Registered: Sep 2005
Location: NH, USA
Distribution: Fedora, Ubuntu, SuSE 10.2 i686
Posts: 29

Original Poster
Rep: Reputation: 0
how do I unmount it then?
Code:
/ sudo umount /home                                                                                                                                                                                                 
umount: /home: target is busy.
 
Old 07-20-2018, 05:58 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 16,839

Rep: Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507
Easiest from single user mode, or use a liveCD.
 
Old 07-20-2018, 06:52 PM   #7
milhan
LQ Newbie
 
Registered: Sep 2005
Location: NH, USA
Distribution: Fedora, Ubuntu, SuSE 10.2 i686
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
Easiest from single user mode, or use a liveCD.
ok, booted single user mode, and here are the results:
Code:
/ extundelete --restore-directory /home/milhan/Desktop/path/directory /dev/mapper/fedora-home
NOTICE: Extended attributes are not restored.
Loading filesystem metadata ... 3256 groups loaded.
Loading journal descriptors ... Segmentation fault (core dumped)
 
Old 07-21-2018, 07:56 AM   #8
milhan
LQ Newbie
 
Registered: Sep 2005
Location: NH, USA
Distribution: Fedora, Ubuntu, SuSE 10.2 i686
Posts: 29

Original Poster
Rep: Reputation: 0
successfully unmounted /home and then ran a fsck successfully on single user mode. Then tried
Code:
extundelete --restore-all /dev/mapper/fedora-home
and again got segmentation fault.
 
  


Reply

Tags
file recovery


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How can I recover deleted directory? rblampain Programming 8 05-30-2015 10:14 PM
Recover deleted .ecryptfs folder using extundelete in Ubuntu ambivalent Linux - Newbie 23 09-17-2012 03:51 AM
How to recover deleted directory in Ubuntu 8.04? joulaei Linux - Newbie 3 02-08-2009 02:44 PM
Deleted a directory! Can I recover it? 360 Linux - General 2 02-11-2003 11:23 AM
Deleted Directory, how to Recover ?? GT I.N.C Linux - General 5 11-19-2002 08:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration