« first day (4314 days earlier)      last day (640 days later) » 

10:51 AM
Quick question, if there is anyone here. I pulled out one of my hard drives, because it was making a noise. It was in an array with another drive (mirrored), and possibly mounted. What's the best way of checking the array is degraded?
 
@FaheemMitha if you’re using md, cat /proc/mdstat
 
 
2 hours later…
1:08 PM
@StephenKitt Yes, I tried that. So
> md1 : active raid1 sda1[1]
488383352 blocks super 1.2 [2/1] [_U]
The _ means missing, right? So that's a degraded array?
If I plug in a new drive, will it automatically rebuild, or do I need to tell it to do so explicitly?
mdadm -D /dev/md1 is also showing State : clean, degraded.
Anyway, time to buy a new HDD.
 
@FaheemMitha that’s a degraded array, yes
@FaheemMitha you’ll need to add the new drive to the array, then it will rebuild
 
@StephenKitt OK, thank you.
@StephenKitt So I need to issue a mdadm command to add the new drive to the array?
A couple of followup questions, if anyone feels like answering. The drive in question is a WD Caviar Black 500 GB HDD. Question 1) Would another HDD, say Seagate 500 GB also work as a new disk in the array? Question 2) Would a 500 GB SSD work?
 
2:08 PM
@FaheemMitha Yes, something like mdadm --add /dev/md1 /dev/sdXN
 
@fra-san OK. Thank you.
 
@FaheemMitha Any block device which is not smaller than your sda1 will work, if we limit the meaning of "work" to having two mirrored copies of your data
 
@fra-san Oh. So so it doesn't actually have to be the same size? I.e. a 1 TB and a 500 GB HDD will work in RAID 1?
The reason I ask is that I'm having difficulty finding a suitably new 500 GB HDD to put along with my existing 500 GB HDD. It looks like maybe they don't make them any longer.
 
Given HDD economics you’d be better off migrating to two larger drives
 
And software RAID will cope with this difference without any intervention on my part?
 
2:12 PM
yes, as long as the component drives are larger than the md device
 
@StephenKitt Probably. But copying the data over would be a pain. Could I do a two step repair?
 
yes, that’s what I meant — add a 4T drive to your array, wait for the data to be synced, then replace the 500G drive with another 4T drive
then grow your md to fill all the available room
 
@StephenKitt Ah. So that last step is easy to do?
 
@FaheemMitha yes, drop the old drive from the array, add the new one
 
@StephenKitt No, I meant the resizing thing. "then grow your md to fill all the available room".
Or should I say, can mdadm handle this automatically and reliably?
 
2:17 PM
man mdadm is your friend
 
@StephenKitt Well, I wouldn't know what to do if it errored out.
 
@FaheemMitha Reliably, yes. So reliably that you can forget to backup your data and feel comfortable? No ;-)
 
The nice thing about the procedure above is that you get a convenient backup on your 500G drive!
 
Yeah, indeed
 
 
2 hours later…
4:15 PM
Poll: how many working computers do you own? Meaning, computers that can be used for real work, so not museum pieces and also properly functioning. Not counting mobile phones. Either laptop or desktop.
 
 
1 hour later…
5:37 PM
Life is full of perplexing decisions. For example, the cost of an 500 GB SSD here is the same as the cost of a 2 TB HDD. So which should I get?
 
 
2 hours later…
7:16 PM
@FaheemMitha That depends on your requirements. A HDD takes a few seconds to spin up, it's slower, but it's bigger. An SSD is faster, smaller, and has limited writes.
 
@Kusalananda Aren't SSDs more reliable too? Also, the writes are limited, but a very very large number, aren't they?
 
Will you be using the disk for hourly backups, then I would pick the HDD. If I would use the disk for day-to-day stuff, as the main disk of a system, then pick the SDD, unless you know you need the larger disk.
@FaheemMitha Sure, but in the end it all comes down to what you're buying the disk for.
 
@Kusalananda No backups. It's not the main disk of a system either. Auxiliary stuff, mostly data, some videos and stuff like that. Which is why it's on a HDD in the first place.
I was just tempted to use a SSD, because it has no moving parts, is more modern, and seems like it would be more reliable. Though I realise that isn't necessarily the case, because in the real world, things aren't so easily predictable.
 
@FaheemMitha So it doesn't need to snappy, which would make the larger HDD suitable.
It comes down to how much space you need, I guess.
 
@Kusalananda Probably doesn't need to be snappy.
@Kusalananda Not sure about that. I guess I should check and think about it.
Actually, at least half of the current 500 GB is occupied by stuff I don't need.
 
7:26 PM
@FaheemMitha Well, then there is probably no need for the 2 TB disk within the foreseeable future.
@FaheemMitha 5 laptops and 2 desktop systems, and then whatever this is.
 
@Kusalananda Probably not. But it seems there at least it's hard to get newer HDDs at say the 500 GB size, judging by the complaints I've read in the reviews about old stock. It's possible it's just not manufactured any more at that size.
@Kusalananda Does that last thing run headless?
 
@FaheemMitha It does, but it has HDMI output so it can have a monitor attached.
 
@Kusalananda OK. I wish I had that many computers available.
 
@FaheemMitha A few of them are technically not "mine" but belongs to my work.
 
@Kusalananda Ah. Still, do you have them at home, and are you relatively unconstrained in what you can use them for?
 
7:31 PM
@FaheemMitha So it is.
 
@Kusalananda Sorry, not quite sure what that meant. Is that an affirmative for both?
 
@FaheemMitha Yes. I have them at home. I can use them for whatever I want, but are supposed to be (and are) used for work primarily.
 
@Kusalananda Yes, I understand. Thank you for answering my question.
 
As for your disk query, I would probably suggest going for the SSD if you think you're not constrained by the smaller size.
The HDD would be a good choice if you wanted to archive larger amounts of data, like a very long term incremental backup.
I use a 6 TB HDD for that, and it stores about 3 years worth of backups (from all the abovementioned systems).
 
8:00 PM
@Kusalananda Sure, though it's more expensive. My computer guy said that you couldn't put an SSD and a HDD in a RAID 1 (they're not compatible), though what I've found on the net contradicts that. The only thing I read is that everything will be slowed down to the level of the HDD, because if course it's slower.
@Kusalananda I use an external HDD for that.
 
@FaheemMitha I don't know much about things like that. I know that ZFS raidz is able to use a mix of different types of drives and that you are restricted by the slower. I have no clue about how "real" (hardware) raid works or what requirements there are on disks.
 
@Kusalananda I'm using software RAID on Linux. The standard implementation uses a driver called mdadm.
I had a hardware RAID card once. It was very expensive and it died after a few years. I started using software RAID after that, and I've had no problems with it.
But I've only used software RAID on Linux. I assume the kernel has support for it, but I've never bothered to find out.
A quick search finds unix.stackexchange.com/questions/243468/…, which doesn't have any details, though. It's also closed for some reason.
> A kernel with the appropriate md support either as modules or built-in.
 
8:50 PM
@FaheemMitha Using a md RAID 1 array (assuming 2 drives for simplicity) you are constrained by the speed of the slowest drive when writing, but you can read at the speed of the fastest one
See --write-mostly in man mdadm
 
@fra-san But mixing an SSD and a HDD isn't an issue, though?
 
@FaheemMitha I've never had any reason to think it was
 
@fra-san OK. Thank you.
 

« first day (4314 days earlier)      last day (640 days later) »