Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Migrate to a linux based NAS

Options
  • 14-10-2013 8:57pm
    #1
    Registered Users Posts: 2,030 ✭✭✭


    I'm looking at replacing my aging (slow) home NAS appliance with a self build home server in the coming months.

    In order to keep some of the costs down, I want to try to reuse the hard drives. I currently have 3x 2TB in a raid 5 config, giving me 4TB of usable space.

    Currently using approx 3TB of space.

    Now to my question, I'm planning a linux server with linux software raid, using mdadm to configure it. Not very familiar with mdadm, but after some googling, here's my current thinking:

    1. Initial setup with RAID 5 with just 2x 2TB drives to start
    2. Migrate enough data from the old NAS to reduce size to < 2TB
    3. Remove one drive from old NAS, and rebuild using 2 disks
    4. Insert this disk into new NAS, expand the new NAS to use the new disk
    5. Copy the remaining data to the new NAS
    6. Remove the remaining drives and install them into the new NAS
    7. Add the new drives in mdadm, and resize the array.

    Now I should have 8TB of usable space.

    Has anyone done anything similar to this? Or experience with mdadm? Or indeed have any suggestions?


Comments

  • Moderators, Technology & Internet Moderators Posts: 37,485 Mod ✭✭✭✭Khannie


    I have done similar to this. It can be a pain.

    I would do it slightly differently though:

    You have a total of 5 disks. 3 currently in the NAS.
    Set up a "degraded" raid 5 array in linux (4TB usable).
    Copy over the files from the NAS.
    Take the NAS disks out and grow / repair your mdadm array.
    Job done.


  • Registered Users Posts: 53 ✭✭spynappels


    Also bear in mind you cannot boot from a RAID5 mdadm array, so you would probably want to include one small OS drive, or 2 of them in RAID1 which you can boot from.


  • Registered Users Posts: 2,030 ✭✭✭colm_c


    Khannie wrote: »
    I have done similar to this. It can be a pain.

    I would do it slightly differently though:

    You have a total of 5 disks. 3 currently in the NAS.
    Set up a "degraded" raid 5 array in linux (4TB usable).
    Copy over the files from the NAS.
    Take the NAS disks out and grow / repair your mdadm array.
    Job done.

    Good option.
    spynappels wrote: »
    Also bear in mind you cannot boot from a RAID5 mdadm array, so you would probably want to include one small OS drive, or 2 of them in RAID1 which you can boot from.

    Wasn't aware of this, not really ideal for what I'm thinking, are there any alternatives to mdadm, that would allow booting from the raid array?

    I also only have 6 spaces in the case I'm looking, so no space for two drives and I'd rather not spin up another two drives to be honest.


  • Registered Users Posts: 53 ✭✭spynappels


    You could boot from a 8GB USB thumbdrive and mount your RAID5 array.

    As long as your /var and /home directories are on the array, you should be fine and the thumbdrive should last a very long time, there should not be many writes to it which is what causes them to fail eventually.

    I've done this in places where the number of disks was limited and it works very well.


  • Moderators, Technology & Internet Moderators Posts: 37,485 Mod ✭✭✭✭Khannie


    spynappels wrote: »
    Also bear in mind you cannot boot from a RAID5 mdadm array, so you would probably want to include one small OS drive, or 2 of them in RAID1 which you can boot from.

    That limitation is gone now AFAIK.

    edit: If not, you could set up a very small raid1 array for /boot spread over the five drives (or use the thumb drive for /boot as suggested).

    further edit: Yeah, looks like grub 2 supports MD devices -
    With more recent bootloaders it is possible to load the MD support as a kernel module through the initramfs mechanism, this approach allows you to let the /boot filesystem be inside any RAID system without the need of a complex manual configuration.


  • Advertisement
  • Registered Users Posts: 53 ✭✭spynappels


    Hmm, just tested it and you can install on a RAID5 array and boot from it, nice one Khannie.

    I'd still recommend keeping the OS separate from the data array personally, but you could just create a RAID5 array and install straight on to it.


  • Moderators, Technology & Internet Moderators Posts: 37,485 Mod ✭✭✭✭Khannie


    You could do 2 raid arrays. One small one (like 50G from each drive in a raid 6, which would give you 150G usable with lots of redundancy) and one large one for your precious porn data.


  • Registered Users Posts: 2,030 ✭✭✭colm_c


    Nice one, boot partition on the array it is.


Advertisement