Software RAID (5) via Ubuntu?

Hi, I would like to use a decommissioned PC as a 'RAID enclosure'.

Can I simply use a decommissioned PC and create a RAID array using Ubuntu? RAID 5 is recommended, and preferably not JBOD.

This is meant to serve as redundancy, because I want to throw old records in there and then they can die there in peace.

If that's possible, how do I find hard drives if they don't have dedicated numbered drive bays like a 'real' NAS?

Would it be a wiser option to attach an expansion enclosure to my existing NAS?

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
12 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
KarlRanseierIII
1 year ago

Yeah, that’s it, you have the free choice:

man mdadm

or

man lvmraid

How do you want to find the plates?

barnim
1 year ago

How do you want to find the plates?

If you have a disc floated, you would like to pull and exchange the right ones 🙂

KarlRanseierIII
1 year ago
Reply to  barnim

There are WWN/series numbers for this.

As well as lsblk, blkid, hdparm and various other tools. If you should sit in front of a booted Linux:

ls -l /dev/disk/*/*
KarlRanseierIII
1 year ago
Reply to  illtry

hdparm serves the management of HDDs, but can also display the information from the Indentify including WWN and Serial etc.

blkid is used for handling UUIDs and labels, in particular finding block device inodes based on UUID/label.

lsblk lists block devices, also as a tree diagram, useful to quickly gain overviews.

mdadm is the veteran for RAID management, can create different metadata formats, RAIDs, controls Syncs, onlin capacity changes, level migrations and much more.

LVM2 is actually a volume manager, which is now also a component for RAIDs on Bais of mdraid, works structurally somewhat differently and uses its own metadata format to integrate both functionalities. It’s more necessary to get used, in my opinion.

Since the RAID is based on the device master in both cases, there is also a proc and a sysfs interface.

KarlRanseierIII
1 year ago

And finally, you can also ensure that udev generates further symbolic NAmen in addition to the normal inodes, so that you have something like /dev/slots/slot# -> /dev/sd .

If the disk is exchanged, you can only think about updating the configuration.

barnim
1 year ago

Can I simply use a sampled PC and create a RAID connection via Ubuntu?

Yes and yes. Depending on the PC, only makes sense because it is too expensive from power consumption.

How do I find hard drives again if there are no dedicated numbered drive shafts like a ‘real’ NAS?

With “lsblk”. This can read the serial number that is on the hard drive somewhere.

Would it be the smarter option to hang an extension case on my existing NAS?

Depending on the viewing angle 🙂 If you don’t want to work with it, and it’s just gonna work out, then it’s better to expand to the existing NAS. If you build and craft Bock on yourself, that’s it.

barnim
1 year ago
Reply to  illtry

You’re gonna have to make a fool of yourself. So regular OS patches, sort of a kind of monitoring to see when records are broken or the arrays are full, etc.

The limits give the hardware. If the board has e.g. 4 SATA ports (I guess you’re going to normal SATA spindles) and a PCIe slot, then you can run e.g. 8 Port SATA controllers and have a total of 12 ports.

software “limited” mdadm here in front of the Linux kernel, but as you probably don’t plan to pack 256 disks or more into your RAID, this fits:)

If you like a UI, look at the incoming NAS distros (Open Media Vault zB)