Yesterday, my first attempt at setting up RAID failed. The second attempt worked beautifully and after restart my raid showed up beautifully as
One thing remained. Making the RAID partition accessible. It’s not been formatted or mounted. And I’m looking up articles on LVM to understand why using LVM might be a better idea than managing it using the mkfs and mount commands. Here’s one awesome article that caught my eye. But it wasn’t much help!
I decided that using LVM was a good idea, so I started using this article to go about it. Here’s the sequence of commands:
sudo -i pvcreate /dev/md0 vgcreate datavg /dev/md0 lvcreate -l 100%FREE -n MyData datavg mkfs.ext4 -m 0 /dev/datavg/MyData mount /dev/datavg/MyData /raid1 chmod 777 /raid1
In order – sudo switches me to the super user mode. pvcreate allows me to define a few physical volume (pv). vgcreate creates the Volume Group (vg). And finally lvcreate allows me to create the logical volume where I ask it for 100% of the free space and name it MyData. The mounting should be familiar. chmod 777 pretty much gives everyone full access to the drive, else I’d run into permission issues.
The coolest bit is the following. I opened up the LVM GUI and from there I looked up the info on MyData. There was a checkbox with Mount on Reboot. I checked that and voila, I’m done! Next phase will be to set up my media server!