RAID Questions

Home » CentOS » RAID Questions
CentOS 11 Comments


Just a couple questions regarding RAID. Here’s thesituation.

I bought a 4TB drive before I upgraded from 6.8 to 7.3. I’m not too far into this that Ican’t start over. I wanted disk space to backup 3 other machines. I way overestimated what I needed for full, incremental and image backups with UrBackup.I’ve used less than 1TB so far. I would like to add an additional drive to makeit a RAID server.

I may use a PCIe SSD for the boot drive if I can find onecompatible with my old hardware.

1- Better to go with a hardware RAID (mainboardsupported) or software?

2 – Can an existing drive with data on it be used as aRAID drive without losing current data?

3 – Can additional drive(s) be added later with a changein RAID level without current data loss?


11 thoughts on - RAID Questions

  • I would only use hardware raid if its a card with battery (or supercap+flash) backed writeback cache, such as a megaraid, areca, etc.
    otherwise I would use mdraid mirroring.

    software mdraid will let you add a mirror to an existing disk. or if its using LVM, you can mirror in LVM now.

    Only some systems support that sort of restriping, and its a dangerous activity (if the power fails or system crashes midway through the restriping operation, its probably not restartable, you quite likely will lose the whole volume)… with LVM mirroring, you can add more pairs of drives as additional mirrors to the volume group.

  • Note; If you’re mirroring /boot, you may need to run grub install on both disks to ensure they’re both actually bootable (or else you might find yourself doing an emergency boot off the CentOS ISO and installing grub later).

  • SSD, Thanks!!

    I’m only considering a SSD drive due to the lack of 3.5 drive space. I have unused 5.25 bays but I’d have to get an adapter.

    I probably don’t need to go the RAID 10 route. I just need/would like some kind of redundancy for backups. This is a home system but over the years due to HD, mainboard, power supply failures, I have lost photos, etc, that can never be replaced. Backing up gigabytes/terabytes of data to cloud storage would be impractical due to bandwidth limitations.

    Just looking for a solution better than what I have. A simple mirror is more than I have now. I’d like to add another drive for redundancy and go from there.

    What should I do?


  • Am Dienstag, den 14.02.2017, 20:21 -0500 schrieb Digimer:
    What we did test out and use on huge CentOS file system servers is

    Rear put you working kernel, needed kernel for your machine for example, onto usb or iso. A Bare-metal copy of you base system for recovery disaster can copy back over another value.



  • Doesn’t mdraid support changing RAID levels? I think it will even do it reasonably safely (though still better not to have a power failure!). I
    have a vague memory of adding a drive to a RAID5 and converting it to a RAID6 but I could be misremembering.


  • any such operation requires the entire raid to be re-slivered, stripe by stripe, as ALL the data moves around. on a large raid made from multi-terabyte drives, this would take DAYS.

  • Yes, it would take a long time, but the man page for mdadm implies that it’s reasonably safe (sorry for long lines):

    Changing the number of active devices in a RAID5 or RAID6 is much more effort. Every block in
    the array will need to be read and written back to a new location. From 2.6.17, the Linux Ker-
    nel is able to increase the number of devices in a RAID5 safely, including restarting an inter-
    rupted “reshape”. From 2.6.31, the Linux Kernel is able to increase or decrease the number of
    devices in a RAID5 or RAID6.
    When relocating the first few stripes on a RAID5 or RAID6, it is not possible to keep the data
    on disk completely consistent and crash-proof. To provide the required safety, mdadm disables
    writes to the array while this “critical section” is reshaped, and takes a backup of the data
    that is in that section. For grows, this backup may be stored in any spare devices that the
    array has, however it can also be stored in a separate file specified with the –backup-file
    option, and is required to be specified for shrinks, RAID level changes and layout changes. If
    this option is used, and the system does crash during the critical period, the same file must be
    passed to –assemble to restore the backup and reassemble the array. When shrinking rather than
    growing the array, the reshape is done from the end towards the beginning, so the “critical sec-
    tion” is at the end of the reshape.

    (Thanks to Gordon for the pointer to the GROW section of the mdam man page.)

    It’s been a long time since I did this, but I seem to remember resizing an md array of ~10 2TB drives in a RAID5 by adding one drive and reshaping to RAID6, and it took 2-3 days.

    The old 3ware controllers claimed to be able to support this sort of reshaping, but I only tried once and it failed. I don’t know if LSI or Areca supports it.


  • RAID is *not* a backup. If a virus or buggy program or an accidental “rm
    -rf *” in the wrong directory deletes files on a RAID then these files are obviously gone on the replicas as well. If you want to prevent the loss of files then instead you should add a second disk to the system and simply backup data on a daily basis to that disk. A RAID array is not the appropriate way to go for you scenario described above.