Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have mounted a partition and add it to fstab file and then rebooted but I see that the partition is not mounted although it was added to fstab.

What is wrong, and how can I solve it?
fstab line: /dev/xvdf /dev/xvdb1 ext3 defaults 0 0

share|improve this question
3  
Edit your question and add the fstab line to it. Also, when changing /etc/fstab don't reboot to test it. Use mount -a an check if it worked. –  jippie May 19 '12 at 7:28
1  
What is /dev/xvdf and /dev/xvdb1? What is the output to cat /proc/partitions? What device do you want to mount and what should the mountpoint be (where should it appear in the file tree)? –  jippie May 19 '12 at 8:11
    
Both of these are good comments, and I wanted to second the 1st suggestion. Using mount -a is almost always a good habit to check the validity of fstab. The reason it is good is that it will immediately list any errors it finds, so you not only know whether the file is valid, but if it isn't, you know what the errors are, which, of course, is a nice first step to solving the problem. –  Marty Fried May 19 '12 at 17:57
add comment

1 Answer

Something is very fishy about that fstab-line:

/dev/xvdf /dev/xvdb1 ext3 defaults 0 0

Normally they have the format:

/dev/device /mnt/mountpoint fs flags stuffINeverRemember

Basically, what this line does or tries is mounting /dev/xvdf onto the directory /dev/xvdb1. I think you misunderstood how /etc/fstab works. You most likely want something like this:

/dev/xvdb1 /mnt/ ext3 defaults 0 0

In particular, note that the mount point (/mnt in this example) must be an existing directory, it will not be created for you.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.