Create RAID 1 with existing Data Disk

  • Hi,


    i Know i had to search for "degraded RAID 1", but i ask better once more bevor my Data ist lost (i have a backup but i dont want to set up all the OMV shares/setup for the data drive). This time i have a SSD vor the System (sdc) and one 2TB drive for the Data (sda). Now i have a second 2TB drive (sdb) and want to mirror the existing drive in a RAID 1. Is this the right way!?:


    • Create a degraded RAID 1 device /dev/md0, using one single drive /dev/sdb, enter the following at the command prompt:

      Code
      mdadm --create /dev/md0 -l 1 -n 2 /dev/sdb1 missing


    • copy the data from /dev/sda to the RAID array while it is running in degraded mode. Whats the best to do this? rsync?
    • Add /dev/sda to the mirror by entering the following at the command prompt:

      Code
      mdadm /dev/md0 -a /dev/sda1


    • Monitor the build progress by entering the following at the command prompt:

      Code
      watch -n 1 cat /proc/mdstat


    Must i partioning the new drive /dev/sdb with one great Partition bevor i start?
    Many thanks for help.


    Jochen

    omv 1.14 kralizec | 64 bit | 3.16 backport kernel | omvextrasorg 1.13
    Plugins: Virtualbox, VDR (e-toby 2.2, jessie, manual), OwnCloud, Backup, MiniDLNA, Openvpnas, MySQL, USB Datasave, USV
    HW:Asrock q1900-ITX / 8GB RAM / 60 GB SSD / 2 TB Seagate Green + 2 TB WD Red = RAID 1 / APC Back-UPS CS 350 / Digibit R1 SAT>IP

  • o.k.
    Did

    Code
    mdadm --create /dev/md0 -l 1 -n 2 /dev/disk/by-id/ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M77K1YTS missing


    Then in OMV /Filesystems created a EXT4 Filesystem. At this time

    Code
    rsync -auv --log-file=/var/log/rsync_copy.log /media/c36d044e-7b91-408c-b180-eb6ff6bd5a32 /media/6a6700bb-331f-4c00-ba2a-620edb61605f &


    is running. It takes al long time with 1,1 TB ;( .
    Am i on the right way after rsync ist complete, to do a "init 1" on the Console, unmount the old data drive an delete the Partition?
    Then create the mirror:

    Code
    mdadm /dev/md0 -a /dev/sda1


    I think it is a good idea to replace the uuid of the old data drive with the uuid of the md0 in the fstab and the config.xml to make the old shares to work, isnt it!? ?(


    Jochen

    omv 1.14 kralizec | 64 bit | 3.16 backport kernel | omvextrasorg 1.13
    Plugins: Virtualbox, VDR (e-toby 2.2, jessie, manual), OwnCloud, Backup, MiniDLNA, Openvpnas, MySQL, USB Datasave, USV
    HW:Asrock q1900-ITX / 8GB RAM / 60 GB SSD / 2 TB Seagate Green + 2 TB WD Red = RAID 1 / APC Back-UPS CS 350 / Digibit R1 SAT>IP

  • Hi,


    seems to work. Recovering process is in progress. The old shares seems to work.


    Jochen

    omv 1.14 kralizec | 64 bit | 3.16 backport kernel | omvextrasorg 1.13
    Plugins: Virtualbox, VDR (e-toby 2.2, jessie, manual), OwnCloud, Backup, MiniDLNA, Openvpnas, MySQL, USB Datasave, USV
    HW:Asrock q1900-ITX / 8GB RAM / 60 GB SSD / 2 TB Seagate Green + 2 TB WD Red = RAID 1 / APC Back-UPS CS 350 / Digibit R1 SAT>IP

  • hi,


    now i has a problem. When i save the config i have this error:

    Code
    Failed
    to execute command 'export LANG=C; monit restart collectd 2>&1':
    /etc/monit/conf.d/openmediavault-filesystem.conf:21: Error: service
    name conflict, fs_media_6a6700bb-331f-4c00-ba2a-620edb61605f already
    defined '/media/6a6700bb-331f-4c00-ba2a-620edb61605f'


    seems omv tries to add the hd twice!?
    Had deleted the file openmediavault-filesystem.conf but it is always the same

    omv 1.14 kralizec | 64 bit | 3.16 backport kernel | omvextrasorg 1.13
    Plugins: Virtualbox, VDR (e-toby 2.2, jessie, manual), OwnCloud, Backup, MiniDLNA, Openvpnas, MySQL, USB Datasave, USV
    HW:Asrock q1900-ITX / 8GB RAM / 60 GB SSD / 2 TB Seagate Green + 2 TB WD Red = RAID 1 / APC Back-UPS CS 350 / Digibit R1 SAT>IP

  • found in config.xml a second section for the hard drive. but don´t know where it comes from!?
    the new one ist the same as the first but nowhere referenced by a share. seems so that omv the hd found new by a reboot?!

    omv 1.14 kralizec | 64 bit | 3.16 backport kernel | omvextrasorg 1.13
    Plugins: Virtualbox, VDR (e-toby 2.2, jessie, manual), OwnCloud, Backup, MiniDLNA, Openvpnas, MySQL, USB Datasave, USV
    HW:Asrock q1900-ITX / 8GB RAM / 60 GB SSD / 2 TB Seagate Green + 2 TB WD Red = RAID 1 / APC Back-UPS CS 350 / Digibit R1 SAT>IP

  • Yes shure, this is possible. I do later a reboot and look at the config.

    omv 1.14 kralizec | 64 bit | 3.16 backport kernel | omvextrasorg 1.13
    Plugins: Virtualbox, VDR (e-toby 2.2, jessie, manual), OwnCloud, Backup, MiniDLNA, Openvpnas, MySQL, USB Datasave, USV
    HW:Asrock q1900-ITX / 8GB RAM / 60 GB SSD / 2 TB Seagate Green + 2 TB WD Red = RAID 1 / APC Back-UPS CS 350 / Digibit R1 SAT>IP

  • no. not rsync. at this time i see no error. Seems to be all right. Looks like i had realy forgot a entry in the fstab.
    Now everything ist working, my USV has had shutdown the NAS safety. Only the error occours like written in the outher Thread.

    omv 1.14 kralizec | 64 bit | 3.16 backport kernel | omvextrasorg 1.13
    Plugins: Virtualbox, VDR (e-toby 2.2, jessie, manual), OwnCloud, Backup, MiniDLNA, Openvpnas, MySQL, USB Datasave, USV
    HW:Asrock q1900-ITX / 8GB RAM / 60 GB SSD / 2 TB Seagate Green + 2 TB WD Red = RAID 1 / APC Back-UPS CS 350 / Digibit R1 SAT>IP


  • I have done something similar, cause already having a NTFS-Data drive and only 1 more data disk. So I installed OMV 3 on an USB3-Stcik and mounted in webinterfase the NTFS disk successfully. I created then a degraded RAID 1 device /dev/md0 by using this command:

    Code
    mdadm --create /dev/md0 -l 1 -n 2 /dev/sdd1 missing

    And the raid got created and was visible in webinterface. Monuted it, created a filesystem on it and started creating shares.
    With rsync in webinterface I started copying all shared folders from the NTFS data drive to the new RAID.


    Had a reboot in between and the md0 got not mounted. How do I make OMV mount the md0 raid permanently, also after reboot. This is the only thing not working me so far.


    Can I later, once permanently mpounting is working, repair the Raid (after finishing copy of old data) witin the webinterface?


    So far I am really impressed with OMV 3. It is the first time using it. Thanks in advance for your support here :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!