Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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?
Why is /dev/mapper/VolGroup-lv_swap swap swap defaults 0 0 shown in my /etc/fstab file, but not when I execute mount?
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 ~]#
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 09:46 AM.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.