Posted by almoo7, 12-12-2009, 09:32 AM | Hello everyone,
How do I mount a partition, in this case, /var on /dev/hdc2, found on the second HDD on my new system? I'm on CentOS 5.x
I have successfully mounted /dev/hdc2 by doing:
#mkdir /media/hdc2
#mount /dev/hdc2 /media/hdc2
However, I cannot access the /var directory under it since it is not actually a directory, it's a partition. I'm using Plesk and i'm trying to retrieve my files (including databases) under /var on the old HDD. I tried doing:
#mkdir /media/hdc2var
#mount /dev/hdc2/var /media/hdc2
but it gives me this error:
mount: special device /dev/hdc2/var does not exist
(a path prefix is not a directory)
I really need help on how to mount /dev/hdc2/var as I really have important files and databases there that needs to be recovered. I hope someone here can help me. Thank you in advance.
Last edited by almoo7; 12-12-2009 at 09:39 AM.
|
Posted by madaboutlinux, 12-12-2009, 10:01 AM | What is the output of the following commands:
If you think /dev/hdc2 is the /var partition of the old drive, then mount it using
|
Posted by almoo7, 12-12-2009, 10:08 AM | Hello madaboutlinux,
df -h
fdisk -l
mount
I hope you can help me.
|
Posted by madaboutlinux, 12-12-2009, 10:13 AM | It doesn't look like /dev/hdc2 is a 'var' partition on the old drive. Try to mount /dev/hdc5 and /dev/hdc6 to see if you have any data there.
See if you have the data there
else, unmount /dev/hdc5 and mount /dev/hdc6
and check the data on the mounted partition
|
Posted by almoo7, 12-12-2009, 10:15 AM | I have already tried mounting /dev/hdc2 to /media/hdc2. I can see the other files and directory fine but when I get into the /var directory under it, there are no files present.
|
Posted by madaboutlinux, 12-12-2009, 10:19 AM | Have you tried mounting the other two partitions as stated in the previous post? As per your new drive, /var is a separate partition and is the biggest among all.
|
Posted by almoo7, 12-12-2009, 10:21 AM | Here's what I found -
/dev/hdc5
/dev/hdc6
Thank you very much madaboutlinux! I think it's in hdc6. I'll try searching for my files there. I really appreciate the time you took to check this thread and for answering me. Thank you!
|
Posted by madaboutlinux, 12-12-2009, 10:22 AM | No problems and yes, /dev/hdc6 is your /var partition of the old drive.
|
Posted by almoo7, 12-12-2009, 12:46 PM | Thank you again madaboutlinux. I have been able to recover my important databases and files. I'm really grateful for your help. Thank you.
|
|
Add to Favourites
Print this Article |