Beiträge von harpingon

    I had (have) been running OMV for a long time.


    I upgraded ages ago by pulling my data drives , which are three disks in a md raid 5, installing OMV again, then putting the data disks back in. OMV then detected the RAID and LVM, and it worked.


    So this time, going from 0.5 to 2.1


    Pulled the data disks, installed 2.1


    I now find that the md assembles as md127 showing UUU on raid 5:


    md127 : active (auto-read-only) raid5 sdd1[0] sda[2] sdb[3]
    3905399104 blocks super 1.2 level 5, 32k chunk, algorithm 2 [3/3] [UUU]


    But, it won't find the LVM PV that I had on the MD.


    pvscan returns:
    /dev/md127: size is 7810798208 sectors
    /dev/md127: size is 7810798208 sectors
    /dev/md127: No label detected


    There's no partition table showing on /dev/md127, but I honestly can't remember if I partitioned the md raid device before running pvcreate on it initially.


    I can dump some of the md127 using dd, so it's readable and it looks like I get some sensible data.


    Hoping it's some LVM metadata incompatiblity between 0.5 and 2.1, is this possible?


    I'd love some answer as to how I can get LVM running on this again. ||


    Thank you

    I would like to have OMV collect and report via email the ammount of time (and, which service if possible) caused the array to spin up.


    Can I do this with a cron job? What would be the best way to do it?


    Once a day email as a digest of events would be best.


    I don't mind writing it if it's possible, I just don't know what /is/ possible to get from OMV.


    Can do python, C, shell, or awk.

    I want to 'upgrade' OMV from 0.4 to 0.5


    Now, frankly, my plugins, apps, shares, etc. are a mess.


    So, can I just note down the locations of the shares I want on the volumes, then wipe my OMV boot disk and replace with an installation of 0.5?


    Will it pick up the Raid-5, Volume Groups, Logical Volumes from the md set? I would assume so as there appears to be little metadata on this in the config file.


    I'd quite like my 0.5 installation to start again from fresh, but to keep my almost 5TB of files intact.


    Will this work?

    The 2TB drives from different manufacturers have slightly different numbers of blocks, so I used partitions 'fd' type (I think - Linux Raid Autodetect) to get an exact number of blocks on each physical partition.


    Turns out, I picked a really rubbish partition size. Didn't account for the 4k divisor when I did my partitioning.


    Surely, using whole disks means you get physical disks with differing sizes? If I'd had two disks with 1,000,000 blocks on, and added a third with 999,980 blocks, that wouldn't be good either.


    Anyway, I have a plan and step 1 is to buy another 2TB disk. Which I haven't done yet.


    I will document all I do and post it up here in case it helps anyone else, but it'll be a while.

    Edit:


    It's the partition that did it, because the partition is not a multiple of 4K, so RAID5 won't accept it at all.


    I'm going to have to


    1) shrink the fs by a small amount


    2) shrink the array by the same


    3) reshape to 2 disk RAID 5


    4) add the new RAID 5 member to go to 3 disk RAID 5.


    On a live system :/



    Edit:


    Just run through that whole procedure on a VM and it didn't break anything.


    What I /will/ do, is add the new 2TB drive to the OMV server first, copy all the data on to that one drive. Then reshape the mirror into a 2 disk raid 5. Then I have something to fall back on if I break the array. Hopefully I won't.


    Then clear out and add the new disk to make a 3 disk raid 5. That sounds the safest.


    Sorry for wittering to myself mostly, and thanks for the help above, it did point me in the right direction.


    Hope the thread might help someone else one day. I'll add the full detail of what I did once I've done it.

    Ah, I did wonder about that.


    I saw some postings about the code going in to mdadm at 2.6.30 for this, but yeah, the omv kernel is a bit long in the tooth.


    I'm slightly concerned about running a reshape with a newer kernel though, that the array will still be mountable by the 2.6.32 kernel in omv.


    I have Virtual Box installed on my OMV, so I'll set up an omv-in-omv with a mirror configuration, and try it out on there first.


    Thanks for the suggestion.



    Update:


    In my virtual mini-OMV, I set it up and the reshape worked.


    The difference is, My configuration builds md0 on top of partitions, whereas OMV builds them on whole-disk devices.


    I used partitions to equalize the number of blocks between hard drives from different vendors who are nominally 2.0TB


    If I build my virtual OMV with a RAID using partitions, I get the same error.


    So now I'll try a rescue CD and see if I can reshape with that, without losing my virtual data, before risking my real data.

    Trying to reshape my RAID 1 to a RAID 5


    The first step is to modify the Raid 1 into a 2 disk Raid 5, and this fails:


    Code
    # mdadm -G /dev/md0 --chunk=64 -l5 -n2
    mdadm: /dev/md0: could not set level to raid5


    I also tried that with a 4k chunk. Made no difference, same error.


    dmesg (kernel log) output:


    Code
    [6917822.770378] md: md0: raid5 would not accept array


    mdadm status output:



    Can anyone shed any light on this?


    If the worst comes to the worst, I'll have to degrade the RAID-1 fail out one device, add in another, and make a new 2 disk raid-5 out of the two, copy all the data on and destroy the remaining RAID-1, followed by adding in the third disk to the RAID-5.


    I'd much much rather get this reshape to work, but the commands aren't telling me much about /why/ they're failing, only that they are.


    Appreciate any help, thanks

    Seems to me, that Bacula would make a great plugin.


    I see OMV being a great host for the bacula-dir and bacula-sd components. Maybe bacula-fd as well, if you want it to back itself up. In this way you could back up the OMV OS installation to the vault.


    I'm currently running Bacula having installed it into the debian OS, but it's not well integrated, doesn't know about OMV shared folders and the like.


    If someone who knows about plugins wants to write a bacula plugin for OMV, that'd be great, otherwise I might try myself, but it's not likely to happen quickly!

    I had a 2TB drive with data on being shared out with OMV, lots of shared directories, permissions, protocols configured.


    The drive failed, so I installed a new drive and copied the data back from backups.


    How can I make OMV configurations the same for the new drive? Hopefully without re-doing lots of manual work.


    I was thinking I could maybe change the UUID of the new partition to be the same as the old one, then maybe, /maybe/ things might just happen automatically.


    Does that seem sensible? Or, if not actually sensible, then at least workable?


    I've swapped out the single disk filesystem (LVM) based disk, for a whole disk based on an md this time (once bitten, etc.), but AFAIK, OMV uses partition, or block device UUIDS upon which filesystems reside, not those of the underlying components.


    Cheers for any advice


    G