LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-19-2018, 06:06 PM   #1
ChaosInferno
LQ Newbie
 
Registered: Oct 2018
Posts: 6

Rep: Reputation: Disabled
Question 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 06:12 PM.
 
Old 10-20-2018, 11:48 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware FreeBSD Win10 MX
Posts: 9,617

Rep: Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071
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.
 
  


Reply

Tags
/var, bind, centos7, mount, raid5


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] slackpkg upgrade-all fails when /var/log is mounted as tmpfs flokofcgulls Slackware 8 06-01-2013 10:12 AM
fsck.ext3 unable to resolve 'label=var' 1.6TB var techux Linux - General 3 03-31-2013 10:02 PM
/var/cache/yum and /var/lib/rpm getting BIG. How to safely pare down? SharpyWarpy Linux - General 3 02-29-2012 02:17 AM
How to change var folder to a new mounted raid 1 drive on Centos 6 x64 Adil Boyun Linux - Server 2 11-21-2011 05:39 PM
my.cnf on debian squeeze. var names don't match, var values missing. sneakyimp Linux - Server 1 07-03-2011 02:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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