• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 442
  • Last Modified:

ubuntu server

i setup a ubuntu server and it's running great, now i want to edit the /etc/fstab file so my extra drive will mount to a directory called /storage. i did a fdisk -l and know that my drive is at
/dev/sdb1. i just don't know the syntax to put in my /etc/fstab file to accomplish this. any help would be greatly appreciated.
0
JeffBeall
Asked:
JeffBeall
  • 6
  • 5
  • 3
1 Solution
 
farzanjCommented:
Edit /etc/fstab

and type

/dev/sdb1 /storage                       ext4    defaults        1 1

I am assuming the file system type is ext4.  If the filesystem type is different, say, ext3, put ext3 instead of ext4
0
 
farzanjCommented:
Once you have typed this, just issue command

mount -a

You have to be either root or you have to use sudo
0
 
upanwarCommented:

Default option do not support in ubuntu.

enter the below given line in your fstab file, replace the ext3 with your required filesystem.

/dev/sdb1  /storage  ext3  relatime,noexec  0  2

and then execute below given command.

# mount -a

0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
JeffBeallAuthor Commented:
thank you, that worked great!
0
 
JeffBeallAuthor Commented:
i'm sorry upanwar - i accepted farzanj's answer, then saw your response.
0
 
farzanjCommented:
So defaults worked in Ubuntu??
0
 
upanwarCommented:
No problem, It was my experience that when I have tried default option while mounting a data partion on my ubuntu linux box then I have got the error that default option is not supported. :)

0
 
farzanjCommented:
@Upanwar

Did you use 'default' OR 'defaults'?
0
 
JeffBeallAuthor Commented:
maybe it's the distro version? the defaults worked for me. when i uname -a my box it says it's
2.6.32-21-generic-pae - if it helps.
0
 
upanwarCommented:
Currently I am in office, When I will go home then will check and let you know.
0
 
farzanjCommented:
One problem might be that it is defaults not default
0
 
upanwarCommented:
You are right farzani, I have check defaults worked in ubuntu and that time I was trying with default.
0
 
farzanjCommented:
@upanwar:  Thank you for your reply.  I cannot tell you how much I appreciate your feed back -- good learning experience with you everyday.
0
 
upanwarCommented:
I knew it that you were waiting for my answer so I have came to you.

I am also learning stuffs from you. I appreciate your effort. I have seen so many times when nobody have any input for asker that time you come with a solution.

EE should also appreciate your efforts because I have seen that you are always available on EE, just 24*7 support.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 6
  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now