Mirroring with existing drives

  • Hi Folks,


    I'm a newbie regarding OMV, so my apologies if this question has been discussed earlier, I have searched and found nothing.


    I wanna build a small (and maybe slow) NAS with a Raspi and 2 HD's, which are in RAID1 config. I have the disks (they are ext4 formatted), and there is a vast amount of data on one of it.


    Is there a way to preserve the data, say build the RAID1 with one (the empty) HD, copy the data over to this first HD in the incomplete RAID1 (with rsync preferably), and then afterwards add the 2nd HD to the RAID and let the rebuild do it's work ?


    Thanks in advance

    • Offizieller Beitrag

    Do you need a real time mirror? Why not have rsync mirror the two drives hourly? Then you could continue to use the current filesystems.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Hi,


    nice idea. But as soon as directory structures change or files are removed or at least moved the rsync method is not straighforward anymore.


    Is it possible as outlined in my first post ?


    Thanks in advance

    • Offizieller Beitrag

    Why would directory structure changes or files removed make a difference? That is exactly what the delete flag does. Still very straightforward. I wouldn't recommend it unless it was a comparable alternative to mirroring.


    Yes, it is possible with something called raider. No, it is not possible from the web interface and I don't recommend it especially without a backup.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • IMHO it would be better idea to get one more drive the same size as the empty one and build out a raid on them, than simply copy all data from the single drive onto active raid, using rsync or sometihng.
    after that you can format the left over drive and added to the system as a hot-spare or something.
    how big the drive we are talking about?


    FYI>> raider will not work either as it formats the drives as well. it only works with system drive to convert existing system(OS) setup to raid1 setup. but it has its issues.



    technically, it might be possible, as I have seen how-to to do what OP wants,
    i.e. do a setup on degraded raid1 first and then add second drive to it but you are risking the possibility of first drive failure during raid resync thus losing all the data in the process, so a good backup is still an absolute MUST. and the install is very tricky


    also it is not possible using OMV install CD. you will have to install Debian first, and I am not even sure it will allow you to setup degraded raid on install either...


    I will try it as a test on my VM server.


    EDIT:
    I tried setting up Debian 8 Jessie on degraded raid1, it works, installs and boots just fine.
    added second drive, used sgdisk to mirror gpt table
    and added partitions as needed to the raid. worked nicely.


    Still wouldn't do that without a good reliable backup.

    omv 3.0.56 erasmus | 64 bit | 4.7 backport kernel
    SM-SC846(24 bay)| H8DME-2 |2x AMD Opteron Hex Core 2431 @ 2.4Ghz |49GB RAM
    PSU: Silencer 760 Watt ATX Power Supply
    IPMI |3xSAT2-MV8 PCI-X |4 NIC : 2x Realteck + 1 Intel Pro Dual port PCI-e card
    OS on 2×120 SSD in RAID-1 |
    DATA: 3x3T| 4x2T | 2x1T

    Einmal editiert, zuletzt von vl1969 ()

  • @vl1969,


    thanks for your suggestions and your tests. The HDs I have are 1TB, I don't wanna buy another one.


    But you tell you have built a degraded RAID1, exactly the way I proposed in my initial post. So I think I'll try going this way, my setup is simple: no OS on the RAID1, cause the OS is on the Raspi's SD card. One big partition on the HDs, ext4. I can try to set the RAID1 up on my normal PC and move the HDs afterwards to the Raspi, and import them into OMV.


    Having a look into mdadm's manpage:


    To create a "degraded" array in which some devices are missing, simply
    give the word "missing" in place of a device name. This will cause
    mdadm to leave the corresponding slot in the array empty. For a RAID4
    or RAID5 array at most one slot can be "missing"; for a RAID6 array at
    most two slots. For a RAID1 array, only one real device needs to be
    given. All of the others can be "missing".


    So this should work.



    But one question is left, is there a way to import HDs configured this way into OMV ?


    Thanks in advance

  • as far as I know, OMV will pickup any raid device on boot.I never tried to add raid device to a running OMV system.


    still, I would not recommend doing degraded raid and moving data to it without full backup.
    are you that sure that drives you have will not fail on rebuild?
    take it from someone who had lost over 2TB of stuff one morning just because.
    I had 2(!) 3TB drives failed at the same time. no recovery possible.
    the worst thing was that I was building out new 4TB pool to move data to it at the time.
    2 more days and I would happily chuck the drives into trash and skip away into happiness whistling.


    so be warned!

    omv 3.0.56 erasmus | 64 bit | 4.7 backport kernel
    SM-SC846(24 bay)| H8DME-2 |2x AMD Opteron Hex Core 2431 @ 2.4Ghz |49GB RAM
    PSU: Silencer 760 Watt ATX Power Supply
    IPMI |3xSAT2-MV8 PCI-X |4 NIC : 2x Realteck + 1 Intel Pro Dual port PCI-e card
    OS on 2×120 SSD in RAID-1 |
    DATA: 3x3T| 4x2T | 2x1T

  • Hi,


    thanks all for your replies and suggestion and warnings ;)


    After further thinking about what I want to accomplish and what are the risks and benefits, I decided to go the way ryecoaaron suggested in posting #2. This rsync based solution is by far the easiest to setup, with no risks, and I keep my 2nd HD as backup and for other temporare doings. In fact I don't really need a RAID1, a relative recent backup on a 2nd HD is enough, the dataset on the disk to be shared is relative static.


    Thanks a lot for your assistence :)


    vl1969: nice avatar

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!