Create RAID from a running system

Issues related to applications and software problems
Post Reply
Mars96
Posts: 3
Joined: 2017/09/08 06:26:44

Create RAID from a running system

Post by Mars96 » 2017/09/08 06:35:33

Hi,

I have an IBM server where i've recently installed CentOS 6.9.
On this server i've installed a Postfix mail server which serves as an archive for our main Qmail server. The archiving is done by imap-sync (which is a great tool btw).

The problem i have now is that when i have installed the system i had only one 2 tb hdd available and i needed to setup the server because our qmail server run out of free space. Obviously i can't rely on this single hdd so i want to setup a linux software RAID 1 or other RAID setup (i haven't got much knowledge about RAID systems) made of 2 new hdd plus the one in which CentOS is now installed.
How can i setup the RAID between the three disks without losing any data?

Thanks in advance.

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Create RAID from a running system

Post by jlehtone » 2017/09/09 14:41:38

What is your current setup?

Code: Select all

lsblk
pvs
vgs
lvs

Mars96
Posts: 3
Joined: 2017/09/08 06:26:44

Re: Create RAID from a running system

Post by Mars96 » 2017/09/25 06:25:16

Sorry for the delay, however here's my current setup:

Code: Select all

lsblk
NAME                           MAJ:MIN RM  SIZE RO TYPE   MOUNTPOINT
sr0                             11:0    1 1024M  0 rom
sda                              8:0    0  1.8T  0 disk
└─ddf1_\x01\x02 (dm-3)         253:3    0  1.8T  0 dmraid
sdb                              8:16   0  1.8T  0 disk
└─ddf1_\x01\x01 (dm-2)         253:2    0  1.8T  0 dmraid
sdc                              8:32   0  1.8T  0 disk
├─sdc1                           8:33   0  500M  0 part   /boot
└─sdc2                           8:34   0  1.8T  0 part
  ├─vg_archivio-lv_root (dm-0) 253:0    0   50G  0 lvm    /
  ├─vg_archivio-lv_swap (dm-1) 253:1    0  2.5G  0 lvm    [SWAP]
  └─vg_archivio-lv_home (dm-4) 253:4    0  1.8T  0 lvm    /home

Code: Select all

pvs
  PV         VG          Fmt  Attr PSize PFree
  /dev/sdc2  vg_archivio lvm2 a--u 1.82t    0

Code: Select all

vgs
  VG          #PV #LV #SN Attr   VSize VFree
  vg_archivio   1   3   0 wz--n- 1.82t    0

Code: Select all

 lvs
  LV      VG          Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lv_home vg_archivio -wi-ao----  1.77t                                         
  lv_root vg_archivio -wi-ao---- 50.00g                                         
  lv_swap vg_archivio -wi-ao----  2.45g                                         
Thanks.

Mars96
Posts: 3
Joined: 2017/09/08 06:26:44

Re: Create RAID from a running system

Post by Mars96 » 2017/10/03 08:44:49

Any help please?

Whoever
Posts: 1357
Joined: 2013/09/06 03:12:10

Re: Create RAID from a running system

Post by Whoever » 2017/10/04 02:33:35

Mars96 wrote:Hi,



The problem i have now is that when i have installed the system i had only one 2 tb hdd available and i needed to setup the server because our qmail server run out of free space.
Thanks in advance.
I realize that this doesn't help you solve your problem, but for future reference, the minimum number of drives required for RAID1 is actually 1. You can install it using RAID1 with one drive plus the other drive as "Failed". Then, when your second drive is available, you can add it and let the RAID system sync.

In this case, you may be able to partition your new drive as a number of RAID1 partitions (with one failed drive), copy everything over to the new partitions, add the boot loader, then boot off the new drive.

On the other hand, doesn't LVM "do" RAID now? All you really care about is your data, so you could just add a partition on the new drive to the existing VG in a RAID1 configuration, then let LVM to the rest of the work.

Post Reply