Bind mounted /var to /raid5/var and now CentOS fails to boot
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Bind mounted /var to /raid5/var and now CentOS fails to boot
System Background: I am running CentOS 7 in a VM (in VirtualBox) on a host computer running Windows 10. My /dev/sda is on an SSD and then I have three 1TB HDDs /dev/sdb, /dev/sdc, and /dev/sdd configured into a RAID 5 drive called /dev/md5. The /dev/md5 is formatted as ext4 and is mounted to /raid5.
I wanted to bind mount both /home and /var to sub-directories in my RAID 5, /dev/md5.
The following steps worked just fine for /home:
mkdir /raid5/home
rsync -av /home/*/raid5 /home
mount --bind /raid5/home /home
nano /etc/fstab
/raid5/home /home none bind 0 0
I then restart CentOS and it boots no problem. I check df -aTh and both /raid5/home and /home show mounted to /dev/md5.
I follow the exact same process to bind mount /var and /raid5/var and upon reboot I can't even get to the login screen. Same exact commands were used, just substitute /var everywhere you see /home.
Any ideas why this worked for /home and not for /var?
FYI, I just started using CentOS/Linux last weekend so I only have 1 week of experience so far. I'm familiar with a lot of the Terminal commands, partitioning, formatting, and mounting drives, installing software, etc. I'm not as familiar with the file/directory permissions (I have a gut feeling when I bind /var to /raid5/var some important software is no longer able to access directories it needs).
Last edited by ChaosInferno; 10-19-2018 at 05:12 PM.
if you can get into your system to where you can comment out that line, then boot into it, when you add to fstab, do you issue
Code:
#mount -a
where if their is an issue you will see it in the terminal, no issue it should work. if you have an issue you can fix it before rebooting the system, as far a RAID and bind mounting, i have no idea. I do not use RAID.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.