Rich Stilo via plug on 13 Jan 2021 06:09:07 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] I need help with configuring Raid on Ubuntu server 20.04


I use mdadm to setup raid 0 in ubuntu in a bash script.

Snippet of my code:

raidcount=$(df -h | grep /dev/md1 | wc -l)
    if [ $raidcount -eq 0 ] ; then
        # Create raid 0 drive:
        sudo mdadm --create --verbose /dev/md1 --level=0 --raid-devices=2 /dev/sdc /dev/sdd && mkfs.ext4 -F /dev/md1
        wait
        #mount point for the array:
        sudo mkdir -p /datamount
        # mount the array to the mount point:
        sudo mount /dev/md1 /datamount
        # Add to fstab:  
        sudo echo "/dev/md1 /datamount                  ext4    defaults        0 0" >> /etc/fstab    
        echo $(date +"%Y-%m-%d %H:%M:%S") Raid 0 array created. | tee -a $logfile
    else
        echo $(date +"%Y-%m-%d %H:%M:%S") Raid 0 array was already created. | tee -a $logfile
    fi

Thanks,
Rich Stilo

On Wednesday, January 13, 2021, 1:36:16 AM EST, Keith C. Perry via plug <plug@lists.phillylinux.org> wrote:


To reiterate what Rich said, if you want to use hardware raid, your best bet is to get a known to be good RAID hardware controller for Linux.  I don't have a current recommendation for that because I moved away from hardware RAID a long time ago.

An alternative he mentioned is using software RAID.  You can do that with MDADM or LVM these days.  If you are putting your entire system on the RAID then the trick is to use a Live CD to create the array first then reboot and do the install.  20.04 LTS might let you do create the LVM during the install but creating it first works back at least to 16.04 LTS.

See

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/cluster_logical_volume_manager/lvm_overview

or

https://raid.wiki.kernel.org/index.php/A_guide_to_mdadm

for references to help get you started if that is the way you want to proceed.



~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Keith C. Perry, MS E.E.
Managing Member, DAO Technologies LLC
(O) +1.215.525.4165 x2033
(M) +1.215.432.5167
www.daotechnologies.com


From: "H Mottaleb via plug" <plug@lists.phillylinux.org>
To: "Rich Mingin (PLUG)" <plug@frags.us>
Cc: "Philadelphia Linux User's Group Discussion List" <plug@lists.phillylinux.org>
Sent: Tuesday, January 12, 2021 8:45:52 PM
Subject: Re: [PLUG] I need help with configuring Raid on Ubuntu server 20.04

My apologies. I didn’t mention, i was seeing the individual disks before setting up Raid 5. 

I need help with setting up raid in Ubuntu server. What would be the best approach to do that?


Sent from Yahoo Mail for iPad

On Tuesday, January 12, 2021, 7:54 PM, Rich Mingin (PLUG) via plug <plug@lists.phillylinux.org> wrote:

If you set up a RAID5 in the raid controller firmware, but Linux is still seeing the individual disks, you have a "fakeraid" or "softraid" controller. It only handles booting the array, and then (Windows-centric) drivers handle all raid operations after.

While it is possible to break the raid array in the firmware and setup a nice MDRAID array on the disks, I'm guessing that's not what you want. You'd like a bootable RAID5, right?

Easiest route, but not cheapest, is to find a real hardware raid controller for the R510 that's Dell OEM and switch it out. Sorry for the bad news.


On Tue, Jan 12, 2021 at 7:47 PM H Mottaleb via plug <plug@lists.phillylinux.org> wrote:

I have a Dell Poweredge R510 server configured  6 1TB drives and 34 GB ram.


i’ve configured raid 5 in the bios but I’m not sure how to configure it in Ubuntu server 20.04. I have already tried to set it up as a single HD but the space was not allocated correctly. 



___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group        --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --  http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________

Philadelphia Linux Users Group         --        http://www.phillylinux.org

Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce

General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________
Philadelphia Linux Users Group        --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --  http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug