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 |
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 Code:
umount /dev/sddiskpartition && cat /dev/sddiskpartition | bzip2 > backup.bz2 |
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/ |
All times are GMT -5. The time now is 12:35 PM. |