the itjerk

my adventures with technology

Tag Archives: raid

new raid1

The linux computer crashed. Upon restart, it wanted a disk check. Fair enough. But then when it rebooted, it went to the recovery console. Uh, oh, something is up. I went to Advanced Options and did a dpkg check, which found a few things to correct before I could reboot back into the GUI. At first I thought the OS drive was bad, but it ends up that the data drive was the one that had the error.

Upon the next reboot, my RAID card gave me a warning, “HDD may be not available. Please contact…” but when I went into the RAID menu, all drives were good. Hmmm. Does the ASMedia really read the disks’ SMART status? Once inside Ubuntu I then checked the SMART status of my drives using smartctl:

sudo smartctl -d sat --all /dev/sdx -H

The OS drive was fine, but the RAID said DISK IS LIKELY TO FAIL SOON, even though the RAID menu reported both disks as fine. While smarctl is very useful, it cannot look inside the ASMedia controller to let me know which disk was failing. Card said fine, OS said not fine. Who do I trust? Ubuntu. Bottom line: SMART is not to be ignored.

First, I immediately did a backup. Success. I then popped down to my local Microcenter and purchased two new (price matched!) 4TB Seagate IronWolf drives and setup a new RAID1. Why? Foremost, all the drives were still working, no data had been lost. So why not start fresh, reset the clock on the drives to Late 2021 and gain an extra TB of space?

It’s just a lot of time to complete a restore, but everything is safe again.

backup

The data axiom is “always have at least two copies of anything you want to keep!”

Now that I’ve ripped my entire (well, almost entire) CD collection, I have to back it up. A RAID 1 drive is good protection from drive failures, but it doesn’t protect at all for accidental erasure, file corruption, etc. I’m going old school and bought a new 3TB disc, the same size as my RAID, and plugged it into a hard disc enclosure, the same model I have for my another backup drive; I only need to have the same wall-wart and USB cable handy. I formatted the disk with ext4, the same as the source drive, which prevents file-naming errors during backup. However, if you format your disk for use with Windows, you’ll need to install exfat-utils and exfat-fuse in Ubuntu. (I also recommend doing the initial format on a Windows machine.)

I am using Grsync software to make the backup, which is a graphical front-end for the rsync utility. I marked the –update and –delete options, as I want to make an identical copy of the source on the destination: copy what’s not there, replace (based on checksum) what’s changed and delete what was removed from the source. You can perform a dry-run first; be sure to empty the trash and skip the lost+found folder before you sync (the latter may give errors). Viola, backing up FTW!

When deciding on a backup method, it’s important to always remember what you’re backing up and why you’re backing it up – and what risk you can afford.

In this case, these are music files, most of which I have a CD copy of but would never want to put in the months of work in to rip again. The rest are downloads, paid or otherwise, some I may never have access to again. Now, I could probably use something different method (cloud, internal disk), something automated, something better, but this method works for me because I can assume the risk.

I have an initial backup (which I have tested) and a proven backup method, so it’s up to me to keep up the work.

raid, again, and backup

I bought two 3TB drives to replace my 1TB RAID. Easy enough, because with hardware RAID 1 the disks are identical: you can pull one drive out, plug it into a USB enclosure, and provided your computer is compatible with the drive’s format — ext4 in my case — you will have two functioning backup drives to copy over to the new RAID (and eventually erase/shred).
sudo shred -v -nX -z /dev/sdX

A thing about buying a hard drive. I notice that the marketing has now shifted to “intended use” of the drive – Desktop, NAS, Surveillance, etc. Guess what, I call b.s. — they’re all the same drives, probably just the more expensive ones were tested more (to justify price/warranty). Please, let me know otherwise if you think I am wrong.

Maybe I should have got 4TB discs? I don’t know. Going from 70% used to 70% available is a jump. I do want to rip more of my CD library to my computer, because digital music is here to stay (and when I say “more” of my library, I mean a “curated” more of my library). I rip to FLAC, which is all the quality I require (considering the source is 16bit/44khz), so how much will I need? Figuring FLAC at level 5 is about 300-350 MB per CD, 2TB will hold a LOT of CDs.

2000000 MB / 330 MB = 6060 CDs

I should probably also mention that RAID 1 is not a backup. It’s a safety copy in case one drive fails. You want backup? You gotta have two of everything. One here, and one over there. More later.

The bigger question then is what do we do with all the data we have. If I really think about it, I need to back up my photos, SOME of my music, my data (book, website, etc), and what else? Do I really need all the crap on my computer? All the files on those backup drives and old hard disks? Probably not, because I don’t even know what I have most of the time and … p0rn should never be downloaded! 😉

My next project will be to organize all my “digitalia,” and what a project that will be!

raid, finally

I’ve always kept my media on a second drive in my linux box and backed it up to a remote NAS. While a perfectly acceptable setup, what I always wanted was two mirrored drives with all my data. The computer already a WD Red 1TB drive so I thrilled when I found another of the exact same drive for $67. Always a best practice to use the same model when building a mirrored RAID1.

I bought a Syba 2-port SATA RAID controller card that plugged into the empty PCI-e slot on the motherboard. It was only $25, but honestly if I had a motherboard with more features, I wouldn’t have needed it. Nonetheless, after moving the drives around in the case so the power connectors would match up to all the drives, I booted the computer and used CTRL-R immediately to get to the card’s BIOS to setup the RAID. It didn’t initially recognize all the drives, so I booted into Ubuntu and used the program Disks to format the new drive. (I also edited /etc/fstab and took out the reference to the old single drive). Rebooting again, the card recognized both drives, and then setup them up as a RAID1 using the card’s BIOS utility.

Continuing into Ubuntu, I again ran Disks and formatted the new single drive. I then edited /etc/fstab with the new mount point (which I had to create), and then ran a sudo mount -all to access it.

Now it’s time to copy everything back to my new mirrored data drive. Remember, when it comes to data, you must have two copies of everything you’d ever expect to keep. But two drives mirrored are really only one copy (think accidental erase), so I’ll still need to keep a backup of files I want to keep forever.