Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Moutinng Raid

Posted on 2014-03-20
8
Medium Priority
?
245 Views
Last Modified: 2014-04-14
Hi,

 I'm not an expert in linux, I'm trying to build some servers with raid 1.

 I had created a directory on / as /srv/mysql.

I had created a raid partition /dev/md0 & I had mounted it on /srv/mysql.

Now my question is does the data gets stored in both the locations or /srv/mysql is just a shortcut referring to Raid Partition.
0
Comment
Question by:pcisiva
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 39944476
/srv/mysql is the mount point for your file system, so any file/dirs under that mount point exist on your RAID 1 drives.
0
 

Author Comment

by:pcisiva
ID: 39944480
tintin Files Exists in Both the places? Right ie; diskspace
0
 

Author Comment

by:pcisiva
ID: 39944486
I want to confirm

if the data gets stored in the /dev/md0 drive  ie; is /srv/mysql is just a shortcut? to the raid parition

or

The data gets stored in /srv/mysql
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 48

Accepted Solution

by:
Tintin earned 1500 total points
ID: 39944491
Think of the mount point as a shortcut.

If you can mount a filesystem on whatever directory you like.   Once you unmount it, there are no files/dirs left behind.
0
 

Author Comment

by:pcisiva
ID: 39944493
What happens if there is already a directory & i had mounted a raid partition on that directory.

Will the files present here in directory get moved to the raid partition?

Or only new files placed in the raid partition?
0
 
LVL 48

Expert Comment

by:Tintin
ID: 39944507
If you mount a filesystem on top of a directory that already contains files, it effectively makes them hidden.   They will appear again when you unmount the filesystem.

Think of it a little like placing a book on top of another book.  Only the  words ("files") of the book on top is active and the two books remain separated.
0
 
LVL 13

Expert Comment

by:Sandy
ID: 39944639
md0 is block device and you can't mount block device directly and block device has to be accessed from mount point only.. And yes once you store data in mount point it will be stored within the block device..

Like in windows drive letters  are being used as a block device mappers, in linux we use mount-points (dir)

TY/SA
0
 
LVL 80

Expert Comment

by:arnold
ID: 39945829
presumably /srv/mysql as the name implies is for use with mysql data files.

People covered your question, just adding the following as you may run into issues:

permissions are stored on the device not the mount point/short cut.
i.e.
Before loading/mounting/overlaying md0 onto /srv/mysql
/      root other drwxr-xr-x
/srv root other drwxr-xr-x
/srv/mysql  mysql mysql drwxrwxr-x

now you have your RAID 1 md0 and you load/mount/overlay /dev/md0 onto the /srv/mysql now your permissions will look like this
/      root other drwxr-xr-x
/srv root other drwxr-xr-x
/srv/mysql  root other drwxr-xr-x

The reason is that the permissions are stored on /dev/md0 and not as part of the mount point/shortcut.
You have to remember that when you are adding storage resource, you must set the permissions:
chown - Change ownership in this case to mysql user with mysql group chown mysql:mysql
chmod - change file access permissions (NOTE: ownership changes need to be made first when needed.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we purchase storage, we typically are advertised storage of 500GB, 1TB, 2TB and so on. However, when you actually install it into your computer, your 500GB HDD will actually show up as 465GB. Why? It has to do with the way people and computers…
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question