LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-23-2004, 04:02 AM   #1
skvasistha
LQ Newbie
 
Registered: Nov 2004
Location: india
Posts: 14

Rep: Reputation: 0
contents of /home lost!


hi all
i have two hard disks on my server
sda and sdb
suddenly my /home directory is empty.
i am in trouble.
how to retrieve that data.
pl help
 
Old 11-23-2004, 04:53 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
What kind of filesystem is on /home? Is it a separate partition?

If it is a separate partition, then first check /proc/mounts to see if the filesystem is mounted. If not, try remounting it with
Code:
mount /home
If it is mounted, then you have lost your directory index somehow. To retrieve it, we first need to know what kind of filesystem you are using (this will be listed in /etc/fstab). It would also help for you to take a backup of the partition
Code:
umount /dev/sddiskpartition && cat /dev/sddiskpartition | bzip2 > backup.bz2
 
Old 11-23-2004, 05:31 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You haven't indicated even the file system type of the hard drive. Did you do something to delete the files, or do you think your hard drive went bad?

Su to root and run fdisk -l. This with list the drives and the partitions. You might want to provide the contents of the /etc/fstab file. This file contains information about how partitions are mounted. Also the output of the 'mount' command without any options will list the currently mounted partitions.

One thing that could of happened is if you mounted another partition over the /home directory. Doing that will make the contents of the directory seem to change. Also, for that to be a possibility, the /home directory wouldn't be in its own partition.

There is a command 'fsck' that you can use to check and repair an unmounted partition. You would probably want to boot into rescue mode to run this.

If the partition that contains the home directory is healthy, but somehow you deleted the files, then the solution if there is one may depend on the file system. If it is the ext2 file system, there is an recover utility. You can also use Midnight Commander (mc) to recover delete files.

Here is a web page with a link to the recover utility:
http://recover.sourceforge.net/linux/recover/
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kmail - some message contents lost doublej Linux - Software 1 10-20-2005 08:46 AM
Lost FAT partition contents fuelinux Linux - Hardware 5 08-25-2005 06:04 AM
Lost /boot contents. Oops! khader69 Linux - Newbie 2 04-26-2005 05:06 AM
unable to view contents of /home anubhuti_k General 4 11-20-2004 05:02 AM
unable to view contents of /home anubhuti_k Linux - Software 4 11-19-2004 11:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:16 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
Open Source Consulting | Domain Registration