libera/#devuan/ Wednesday, 2025-02-12

freaxeh2I'm having mdadm issues00:25
freaxeh2https://paste.debian.net/1349551/00:26
rwpmdadm: no recogniseable superblock on /dev/sda1  mdadm: /dev/sda1 has no superblock - assembly aborted00:27
freaxeh2yeah I just created the array00:27
rwpAnd then you try using /dev/sda which tells me that you are guessing at what's there.  That's not good.00:27
rwpWhat command did you use to create the array?00:28
rwpNormally one would create an array with a command similar to this one: mdadm --verbose --create /dev/md1 --level=mirror --raid-devices=2 /dev/hdX1 /dev/hdY100:29
freaxeh2mdadm --create /dev/md0 --level=5 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd100:29
freaxeh2actually i didn't use that command00:30
rwpAs a hint I suggest keeping the md number to be the same as the partition numbers.  It is arbitrary.  But it keeps things easier to remember later.  So md1 when working with sda1 and so forth.00:30
freaxeh2heres the command i used from history:00:30
freaxeh2mdadm --create /dev/md0 --level=5 --raid-devices=4 /dev/sda /dev/sdb /dev/sdc /dev/sdd00:31
rwpSeems okay.  In that case you should have an array running right at that moment.  Run this to see what is the status of it: cat /proc/mdstat00:31
freaxeh2Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]00:32
freaxeh2unused devices: <none>00:32
freaxeh2i can't seem to find it though in /dev00:32
rwpThe /proc/mdstat is probably too large to copy into here and would need it's own pastebin.00:32
rwpYou can examine an individual partition to see how the configuration went using: mdadm --examine /dev/sda00:33
rwpIf the md is created then you can get the details on it: mdadm --detail /dev/md000:33
freaxeh2nope it just doesn't exist00:34
freaxeh2/dev/md0 just doesn't exist00:34
freaxeh2i did do a reboot after creating the array before saving its configuration00:34
rwpThen the array creation failed.  Try it again.  Look for errors.  Browse /var/log/syslog to see if anything was logged there.00:34
freaxeh2to mdadm.conf00:35
freaxeh2ok00:35
rwpIf the individual disks have been set up then "mdadm --examine /dev/sda" and on through the set will show something.00:35
rwpI suggest always using partitions because it makes things easier to understand later after having forgotten how they were set up.00:36
freaxeh2https://paste.debian.net/1349552/00:36
freaxeh2thats the output of mdadm --examine00:36
freaxeh2and mdadm --detail00:36
rwpIt's certainly okay to use /dev/sda but then later when trying to poke at things with a stick on a different system it is easier if it is /dev/sda1 such that we can get a normal result easier.00:36
rwpThat --examine does not show an array.  Let me paste an example.  https://paste.debian.net/1349553/00:37
freaxeh2thank you00:37
rwpHere is cat /proc/mdstat example: https://paste.debian.net/1349554/00:38
rwpExample of --detail output: https://paste.debian.net/1349555/00:39
freaxeh2syslog just shows a bunch of gobbldygook00:55
freaxeh2ccouldn't see anything related to mdadm00:55
freaxeh2i'll recreate the array anyway00:56
freaxeh2even though its going to take like 6 hours00:56
rwpHmm...  By default mdadm will create version 1.2 arrays that includes a bitmap.  You should be able to reboot immediately and it will pick up sync'ing the array from where it left off.00:57
rwpThough I admit I 99.44% of the time use RAID1 mirrors and you are creating a RAID5 which I almost never do.00:57
rwpI am in the camp that RAID5 is not a good RAID level to use.  I either use RAID1 mirrors or I use RAID6 with two disks of redundancy.  Seen too many catastrophes when people use RAID5.00:58
rwpSearch around and you will see a lot of reports about problems with RAID5.00:58
rwpIt might be fine for you on a personal system though.  The problem is that things are great while everything is working.  But then a drive fails.  If it is an active production site now the system is running in degraded mode which uses more cpu.  That might be enough more that the site can't keep up and falls over.00:59
rwpAlso another problem is that long term stored files might not have been read for a long time and during array rebuild a second problem is found which means the array no longer has enough information to recreate the storage array and fails then.00:59
freaxeh2ok i'll use raid601:00
freaxeh2the files i'm storing on it are semi-important and non important01:00
freaxeh2a mixture01:00
rwpRAID6 on 4 devices is fine.  But for simplicity then you want RAID10 which is 2x RAID1 mirrors.01:00
rwpI have never created a RAID6 on fewer than 6x devices.  (shrug)01:01
freaxeh2ok i'll use raid10 then01:01
freaxeh2lol01:01
rwpThe advantage of RAID6 over RAID10 is that with RAID6 any two of the devices can fail in any combination.  In RAID10 one device in each mirror can fail which adds up to two but if both sides of one mirror fail then the array is lost.01:02
rwpBut RAID10 is much simpler and simple is usually a good way to go.01:02
freaxeh2yep01:02
freaxeh2yes K.I.S.S01:03
rwpAlso remember that when creating a big array then you really need yet a second storage place for backup.  Because RAID is not backup.  And at some point something will break and you will need backup.  Because you will have a lot of data.01:04
rwpAdditionally I always set up smartmonutils package with daily self tests in order to keep poking at the drives.  SMART won't predict a failure but it will confirm a failure.01:04
rwpIf you have a failure don't delay in doing something about it.  I have twice now been involved in array recoveries where I was called in because one drive failed and everything worked so they did nothing.  Then too many drives failed and they did not have enough to recover.  It was too late by then.01:05
rwpIt's good to start on the simple side of things, build up experience using it, then graduate to more complicated configurations building upon the experience with the simpler ones.01:06
rwpGood luck!  Have fun! :-)01:07
* UsL adds even more wisdom to his rwp_thing.txt01:24
UsLthanks.01:24
UsL*things01:24
* rwp feels warm all over and thanks UsL for the kind words!01:25
UsLlast edited in 2023-01-21  I've been afk for way too long.01:28
freaxeh2yep raid is not backup, learnt that a long time ago.02:06
Xenguyrwp, smartmontools ?03:02
rwphttps://packages.debian.org/sid/smartmontools03:08
rwpAnd then use something like this in the smartd.conf file: /dev/sda -a -I 190 -I 194 -o on -S on -s (S/../../[1-5]/03|L/../../6/03) -m root -M exec /usr/share/smartmontools/smartd-runner03:10
rwpThis paste has explanations of the arcane syntax to some extent. https://paste.debian.net/1349573/03:11
Xenguytx03:12
* rwp is distracted while at a user group meeting IRL03:13

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!