During a recent discussion: [7/5/25 5:19 AM] Anyways I am going to build a PC for family which would act as always on file server with 2 disks in raid 1 and gaming pc for us in living room [7/5/25 5:20 AM] Honestly just have a backup disk for important files Imo raid is just a waste of resources especially raid 1 [7/5/25 5:22 AM] Why? It's redundancy [7/5/25 5:25 AM] But still 1 disk can fail and my data is still safe [7/5/25 5:25 AM] Like setup some sort of incremental backups or something Since this discussion was between two other people, I left off the tags. Then someone also not in the conversation reached out to me and asked me to explain what the discussion was. This is a discussion on that for our command and conquer for this issue. RAID - Redundant Array of Independent Disks, it used to be inexpensive disks, but I’m sure we all can agree that with SSD’s that is no longer the case. Why would any home user consider RAID? RAID is a technology that is used to increase the performance and/or reliability of data storage and home users may want a piece of that. When RAID is mentioned, we also need to mention LVM, logical volume management. Why would we need to, you may ask, well, when you use RAID, there is more than one disk involved and other than straight mirroring, your data is split over multiple disks. LVM allows you to manage physical disks as a single pool of storage and with it, you can create logical volumes that behave like partitions. LVM creates an abstraction layer between physical storage and logical partitions, this is the important part. We are not going to dive deep into this, I just want you to know enough so we can continue and you are curious enough to go look it up. This will not be a step-by-step, rather a 10000ft overview, as it would be a nightmare to cover all the cases. With LVM, disks or partitions are grouped into Physical Volumes (PVs). These PVs are combined into Volume Groups (VGs), and from these groups you can create Logical Volumes (LVs). Does it make sense? Good. It’s not rocket science. First we tell Ubuntu to create our PV from either disks or partitions, for example: sudo pvcreate /dev/sda1 /dev/sdb1 I want you to use all the methods we used in the last issue to get some help on the pvcreate command. root@ubuntusrv:~# pvcreate /dev/sda1 /dev/sdb1 Physical volume "/dev/sda1" successfully created. Physical volume "/dev/sdb1" successfully created. ***There are three commands you can use to display properties of physical volumes: pvs, pvdisplay, and pvscan. I’m not even discussing those, you know the drill. Next, we need to combine the physical volumes into a volume group: sudo vgcreate new_vg /dev/sdb1 /dev/sdc1 (If the device was not previously initialized as a PV with pvcreate, vgcreate will initialize them, making them PV, but you obviously have less control.) You can specify multiple physical volumes to create a new volume group from them, like so: nonroot@ubuntusvr:~$ sudo vgcreate vol_grp2 /dev/sda2 /dev/sda5 /dev/sda7 Volume group "vol_grp2" successfully created Then, you can create a LV from the VG. You can specify the size or use all the free space, for example: sudo lvcreate -L 500G -n new_lv new_vg Once that is done, we can go ahead and slap a filesystem on it: sudo mkfs.ext4 /dev/new_vg/new_lv Now we can just mount the beast and we can use our new volume. Now that we understand the steps, getting our PV down first, making a VG or many VG’s, on top of our PV, and lastly the LV. Three steps, however I cannot tell you 100% how, as each computer is different, you may be using two different partitions or multiple partitions or multiple drives. All I want you to do is visualise the order, attack the problem step by step and follow the order and you will be successful. Don’t type out my commands 100%, you may not have sdb1, for instance, you need to use your own volumes or partitions. RAID on the other hand is a beast on it’s own. You can have hardware and software RAID, and RAID that may require you to install drivers for Linux. If you opt for hardware RAID, it is usually an add-on card that you will plug into your PC, unless you have a server board. Here you need to follow the instructions from the supplier with care. In my case, I was lucky, the last time I needed to do this, the driver came in a convenient .deb-file, that I needed to load, but you may not be so lucky. My advice is, that if you decide to home server it, check for compatibility. The previous install I did only had drivers for old versions of Red Hat Linux. Beware of cheap RAID cards on e-bay or wherever, as some work like the old win modems, that was purely software. Do your homework! Software RAID is cheaper and more prone to failure, as it relies on your OS. I don’t recommend it as I have had waaay too many issues with it in the past, if you want to learn about it, sure. RAID comes in “levels” RAID 0 – striping RAID 1 – mirroring RAID 5 – striping with parity RAID 6 – striping with double parity RAID 10 – combining mirroring and striping To envision striping, imagine a bunch of pot plants in a row. If I take a paintbrush wet with paint, and I draw a line across them, you may see the line, but each pot in the row only has a piece of the line on it. Mirroring is just what it says, it writes everything twice. You can imagine that this takes longer to write, but reading will be twice* as fast. (*almost) Parity is almost like the answer to a sum, imagine the data that you write is 2 and 3 bits, parity would sum them, and put a “5” down next to the numbers, so that even if one of the two get lost, you will know what the other one was, via simple math. This happens across all the drives in the set, meaning you will have to give up a lot of space for these parity sums. It is not what parity actually is, but it is a way for you to visualise it, remember that. So now you can work out what the different RAID levels mean, yourself, without getting bogged down in jargon or technical details. If you are the technical kind and want to know, see: https://www.techtarget.com/searchstorage/answer/RAID-types-and-benefits-explained Software Raid, requires mdadm, and Ubuntu does not ship with it by default, so you would need to install it. I suggest doing this in a VM, as it is easy to mess up your working desktop: sudo apt install mdadm OK, so here is the command syntax: sudo mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sda /dev/sdb You need to replace the Raid level you require, as you can see, this is RAID 0 and the devices should change to match *your devices, currently set to two. Again, these are examples, please don’t just go copying and pasting it into your working machine’s terminal. Now you go have coffee, while the software “builds” the array. Once done, we format the MD not the SD, like so: sudo mkfs.ext4 /dev/md0 Then we mount it in the usual way, sudo mkdir /mnt/raid sudo mount /dev/md0 /mnt/raid While I do not think that this is something for a CnC, as the variables are too diverse, I did promise to put an outline down, explaining each part. So while LVM and RAID are often used together, they can also be used apart. If you would like more on each, drop us a note on misc@fullcirclemagazine.org and I’ll see if I can whip up a step-by-step in a VM for you to test.