• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 665
  • Last Modified:

how do i mount raid array in CentOS?

I have 2 raid array's setup.  2x1TB in raid1.  How do i mount the 2nd array? I want to be able to save files to the 2nd array, but its not listed.  md127 was originally saying "pending", but i did get it switched over to "active".

[root@server public_html]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/md2        909G   33G  830G   4% /
tmpfs           7.8G     0  7.8G   0% /dev/shm
/dev/md0        190M   60M  121M  33% /boot


Personalities : [raid1]
md127 : active raid1 sdd1[1] sdc1[0]
      976629568 blocks super 1.1 [2/2] [UU]
      bitmap: 0/8 pages [0KB], 65536KB chunk

md0 : active raid1 sda1[0] sdb1[1]
      204736 blocks super 1.0 [2/2] [UU]

md2 : active raid1 sda3[0] sdb3[1]
      968036160 blocks super 1.1 [2/2] [UU]
      bitmap: 4/8 pages [16KB], 65536KB chunk

md1 : active raid1 sda2[0] sdb2[1]
      8384448 blocks super 1.1 [2/2] [UU]
0
AfternoonShift
Asked:
AfternoonShift
  • 3
  • 3
2 Solutions
 
arnoldCommented:
You need to run mkfs first to format it, or use pvcreate md12607 to add it into the LVM volume overlay.

If you use mkfs to setup the filesystem on it, you need to decide where you want this volume to appear.
Mount /dev/md127 /mount_point
Mount_point can be /home or any other location you want this storage to be.
0
 
AfternoonShiftAuthor Commented:
i'm still not really sure what to do... i wanna call the mount /home.

while i looked up the command mkfs, i'm confused of what exactly it wants.

mkfs -t ext4 /dev/md127 /home   ???

what ext do i want? i see ext2, ext4... etc.

to keep everything in line, can i rename md127 to md3 ?

do i need to add anything to the /etc/mdadm.conf ?


[root@server public_html]# mdadm --detail /dev/md127
/dev/md127:
        Version : 1.1
  Creation Time : Tue Apr  7 21:21:40 2015
     Raid Level : raid1
     Array Size : 976629568 (931.39 GiB 1000.07 GB)
  Used Dev Size : 976629568 (931.39 GiB 1000.07 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Sun Apr 19 02:52:44 2015
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : localhost.localdomain:3
           UUID : 1f2d576e:0e18332f:b8d14fbf:6464d6c9
         Events : 1451

    Number   Major   Minor   RaidDevice State
       0       8       33        0      active sync   /dev/sdc1
       1       8       49        1      active sync   /dev/sdd1
0
 
arnoldCommented:
Mkfs.ext4 /dev/md127
first you should copy the data in /home if any
mount /dev/md127 /mnt
Cd /home
Find . |cpio -pdvmu /mnt
umount /mnt
getfacl /home
mount /dev/md127 /home
getfacl /home
Make sure the two are the same.
Now edit /etc/fstab
And add the line
/dev/md127 ext4 /home nosuid meaning no programs/applications in /home can have setuid.

Depending what this system is for, I think 1TB for home might be a bit much.

You could rename, but not sure you need, it's just a label.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
AfternoonShiftAuthor Commented:
I guess i should explain my setup better. its a webserver setup with about 8 domains. 7 of the domains are on the first Raid1 while i  just want to setup the 2nd raid for the 8th website, since it takes up a lot data(wedding/event photography/video).  

So i don't want all users /home to be on the 2nd drive. I planned to just make a symbolic link of the /home/photographyuser/ to point to the 2nd raid array once i create the user in DirectAdmin.  

Sorry about the confusion. so should i name the drive mount to something else? ie: /home2 ? so i don't need to move all data to another drive.
0
 
arnoldCommented:
You can mount the second drive as /home/photographyuser

IMHO, it is a bad idea of pointing a web server (which runs as nobody) to a /home location as you will run into many problems dealing with access.

Using LVM you can carve up the md127 into as many pieces of what ever size you need and mount them in different locations.
LVM overlay of raid.

LVM changes additions/resize do not need system reboots.....
0
 
AfternoonShiftAuthor Commented:
thanks Arnold. i'll go with LVM! :D Thanks for all your help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now