LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-12-2014, 09:34 AM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 536

Rep: Reputation: Disabled
Help with mounting devices on Centos


My /etc/fstab file and the output of mount is listed below.

Note that /var/lib/mysql was manually mounted (after stopping mysql) using:
Code:
mount -t ext3 -o barrier=0 /dev/VolGroup/lv_mysql /var/lib/mysql
My main question is how do I modify /etc/fstab to automatically mount /var/lib/mysql just like the output of mount shows? Note that when I uncomment the line in my fstab, my Linux crashes upon trying to boot.

Secondary questions are:
  1. Why is none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) shown when I execute mount, but not in my /etc/fstab file?
  2. Why is /dev/mapper/VolGroup-lv_swap swap swap defaults 0 0 shown in my /etc/fstab file, but not when I execute mount?
  3. Why does /etc/fstab show /dev/sda1 as UUID=12a081eb-285e-4599-95ab-db23b70280df? This is the same device, right?

Thank you

Code:
[root@devserver ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sat Apr 19 05:57:56 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root /                       ext4    defaults        1 1
UUID=12a081eb-285e-4599-95ab-db23b70280df /boot                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_home  /home                  ext4    defaults        1 2
#/dev/mapper/VolGroup-lv_mysql /var/lib/mysql        ext3    barrier=0;noauto       1 2
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
[root@devserver ~]#
Code:
[root@devserver ~]# mount
/dev/mapper/VolGroup-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/VolGroup-lv_home on /home type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/mapper/VolGroup-lv_mysql on /var/lib/mysql type ext3 (rw,barrier=0)
[root@devserver ~]#
 
Old 05-12-2014, 09:52 AM   #2
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 656

Rep: Reputation: 121Reputation: 121
Try to put a comma after the no barrier option in your fstab file, i am not sure that semicolons are useable, they are generally for comments, so you likely comented out your options field.

1. It is a kernel capability for passing files around. It is mounted by an init script that is why it is there and not in fstab

2.shot in the dark,but it is not a normal file system and not useable as such for storage. You would see it allocated using top or the free command, probably due to being mapped to memory registers. Interesting question this one.

3. Newer systems mount the uuid, same as dev, same device but if you go switching cables, sda1 may become sdc1 the uuid stays the same so it does not matter which sata port the disk is connected to, it willmount the file system in the correct location.

Last edited by ericson007; 05-12-2014 at 10:46 AM.
 
1 members found this post helpful.
Old 05-12-2014, 11:28 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,938

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
In addition the option noauto will prevent the file system from automatically being mounted at boot.

In a nutshell /proc is a virtual file system i.e. it resides in memory. It is a method to access internal kernel data structures. As stated it is created at boot time. tmpfs and sysfs are also virtual file systems.
 
Old 05-12-2014, 01:29 PM   #4
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 536

Original Poster
Rep: Reputation: Disabled
Thank you ericson007 and michaelk,

Your responses make sense. Also, I also later realized that the noauto would prevent it from mounting at boot. I don't know for sure, but expect a semicolon or a comma would both work, but I know for sure a comma does.

In regards to modifying /etc/fstab to mount /var/lib/mysql, it now works perfectly. I am 99% sure I did the exact thing earlier, but with very bad results. Reference http://www.linuxquestions.org/questi...on-4175502842/. What is different, I have no idea, but the issue is fixed.

Thanks again, Michael
 
  


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
[SOLVED] mounting an FC Target Disk ( CentOS 6.5) on to an Initiator ( CentOS 6.5) vk33 Linux - Newbie 6 06-12-2014 01:12 AM
Mounting Raw Devices rightsidedown Linux - Newbie 1 03-06-2008 11:00 AM
fstab and mounting devices nass Slackware 2 07-11-2007 09:18 AM
mounting devices devavictrix Linux From Scratch 1 03-13-2006 07:51 AM
Mounting CD-Devices evilmonkey Linux - Newbie 10 06-16-2003 11:07 PM


All times are GMT -5. The time now is 10:39 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