# New fileserver advice

## kurosama

Hi all!

I'm planning to build a new fileserver and I'd like some advice.

I've chosen a Supermicro X7SPA-H motherboard (6 sata, 1 pcie-express x4 in x16 slot, two intel gigabit ports).

I'm planning to build an always-on raid-6 array with the internal sata ports, and an hotplug one using an highpoint 2322 multilane pci-e controller in jbod mode (so software raid also on this one), with an external 8 bays sata tower.

I'm wondering if I can to this when I need to shutdown the external raid array.

- Umount the filesystem on the raid array

- Stop mdadm on this array

- Shutdown the external sata tower via the power button.

The question is:

when I need to power the external raid array back, with the fileserver with the internal raid array already up, the array will be assembled automatically?

Am I going to face some issues? Like rebuilding the array every time I power it up?

Thanks for your help.

Bye.

----------

## BradN

Why not experiment with a handful of usb-flash drives and a usb hub?   I imagine the behavior will be similar at least from the general sense of devices showing up, and even if they're not automatically identified, you should be able to write a mdadm command to load them.  But I suspect the same code that reads out the partition table may initiate the check for raid devices.

However, there is a complication... At kernel startup, the kernel basically knows when it's done identifying devices on internal busses.  Normally it doesn't check for the root device until this is complete.  There is however the situation where say on a RAID-5, one device is completely missing.  Eventually the array will start without the missing drive, but only once kernel boot is complete, as starting without a drive that's about to be found unnecessarily weakens the redundancy by bringing one disk out of sync.

Then comes the question... in the case of removable drives, how does the kernel know when devices are done being plugged in, and it can start raids that don't have all their devices but do have enough to run?

So because of this basic functionality question, I suggest experimenting just to see what you're up against.  Maybe raids only autostart once all of their drives appear.  Maybe they don't autostart at all!  There could be an arbitrary time limit.

If you find a strategy that works with USB drives, it will probably work with your external raid array (provided hotplug works in general!).  Note that USB doesn't guarantee a specific drive ordering, so you may wish to plug them in a certain order to make sure they have the identifiers you expect.  Probably your raid controller will maintain a specific order though.

----------

## kurosama

Thanks for the suggestion.

I'll experiment with an usb raid array this week-end.

Bye

----------

## kurosama

Found a little time this afternoon and I've started playing with usbkeys.

With the "manual" method no problem so far... and I presume I'll use this method from now on:

1. umount the filesystem

2. stop the array 

3. unplug the devices

4. replug them

5. start mdadm again with mdadm --assemble

6. remount the filesystem

I've tried thirty times and checked everytime the filesystem, without a single glitch.

I've only generated an /etc/mdadm.conf via the --examine --scan options, no other commands used so far.

Without a drive plugged in the raid array starts in degraded mode and after plugging in the missing usbkey i can rebuild adding it to the array.

This is enough for me to start buying the final hardware for experimenting with an 8-bay sata external enclosure.

Bye  :Smile: 

----------

## BradN

Sounds good, good luck with your project!

----------

