LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-03-2011, 11:26 PM   #1
gvsbnarayana
LQ Newbie
 
Registered: Jan 2008
Posts: 9

Rep: Reputation: 0
how to auto mount a file system on reboot


Hi,
I am a newbie using Oracle Enterprise Linux (flavor of Red Hat Linux). I have added a new disk and created a mount point /u02. How can I get it auto mount on reboot of the server?


# uname -a
Linux rac11g 2.6.18-92.1.17.0.2.el5xen #1 SMP Tue Nov 18 04:11:19 EST 2008 i686 i686 i386 GNU/Linux
#cat /etc/redhat-release
Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)

right now, after mounting the file system manually,

# mount -l
/dev/xvdb on /u02 type ext3 (rw)

I have mounted the file system manually using:
mount /dev/xvdb /u02

I appreciate your help.

Thanks and Regards,
Badri.
 
Old 11-03-2011, 11:38 PM   #2
mladoux
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Rep: Reputation: Disabled
add the following to the end of your /etc/fstab --

Code:
/dev/xvdb	/u02	ext3	defaults	0	2
make sure it's all one line, and by itself.
 
1 members found this post helpful.
Old 11-03-2011, 11:42 PM   #3
smilesavvy
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Rep: Reputation: Disabled
The above Solution works for you.
 
0 members found this post helpful.
Old 11-04-2011, 01:22 AM   #4
devUnix
Member
 
Registered: Oct 2010
Location: Bengaluru, India
Distribution: RHEL 5.1 on My PC, & SunOS / Sun Solaris, RHEL, SuSe, Debian, FreeBSD and other Linux flavors @ Work
Posts: 584

Rep: Reputation: 59
Badri, just have a look at

Code:
/etc/fstab
file and follow the format. Beware that if you mess up with this file then your system may not boot next time. However, you will get warnings/errors as soon as you save your edits and quit from this file, in case you make a mistake.
 
1 members found this post helpful.
Old 11-04-2011, 01:33 AM   #5
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by gvsbnarayana View Post
Hi,
I am a newbie using Oracle Enterprise Linux (flavor of Red Hat Linux). I have added a new disk and created a mount point /u02. How can I get it auto mount on reboot of the server?


# uname -a
Linux rac11g 2.6.18-92.1.17.0.2.el5xen #1 SMP Tue Nov 18 04:11:19 EST 2008 i686 i686 i386 GNU/Linux
#cat /etc/redhat-release
Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)

right now, after mounting the file system manually,

# mount -l
/dev/xvdb on /u02 type ext3 (rw)

I have mounted the file system manually using:
mount /dev/xvdb /u02

I appreciate your help.

Thanks and Regards,
Badri.
Code:
#vi /etc/fstab
/dev/xvdb    /u02    ext3    defaults   0 0

#mount -a
to check if everything is working fine as it updates fstab file

#mount
check your mount point
 
1 members found this post helpful.
Old 11-05-2011, 08:21 AM   #6
gvsbnarayana
LQ Newbie
 
Registered: Jan 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks a lot for your help. I will try and update you.
I appreciate your help.
Regards,
Badri
 
Old 11-05-2011, 08:37 AM   #7
Passmossis
LQ Newbie
 
Registered: Jul 2011
Location: USA
Distribution: RHEL 6.5
Posts: 28

Rep: Reputation: 2
If this does not work for you, you can create a mount script and place it within /etc/rc5.d. Things here take place in a specific order, so make sure you give it a name that is towards the end of the list.

Quote:
S995SANMount.scr
is an example name that should be towards the end of the operations. Note this mount would only take place when the system goes for init level 5 (standard boot)
 
  


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
Auto mount USB drive to specified mount point after reboot smallbook Linux - Server 7 07-21-2010 04:40 AM
file system will not mount after reboot V Srivallabh Linux - General 1 06-10-2009 09:27 AM
auto mount after reboot ust Linux - Newbie 2 09-05-2008 01:40 PM
[linux auto reboot] content"reboot system boot" hunter_cao7 Linux - Server 1 11-12-2007 06:09 PM
auto mount samba file system nanjil SUSE / openSUSE 1 11-25-2005 10:19 AM


All times are GMT -5. The time now is 02:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration