The small linux problem thread

It says there’s no arrays found in the config file or automatically. So, apparently I missed a very important step after creating the array. :rofl:

1 Like

RIP, sorry dude…

It was just a test data array, I hope?

1 Like

Yeah, everything is backed up over and over. :smiley:

1 Like

Well, one thing I noticed is that there is no mdadm.conf in /etc. But there is a blank config file in /etc/mdadm/mdadm.conf. Is that a template that’s used that didn’t get copied into /etc somehow?

1 Like

If a RAID signature is on the drive, mdadm should pick it up when the system starts up and it scans. They don’t need to be specified in the config file. This is true even if mdadm did not create the RAID signature on the drive. You have to --zero-superblock on each device to stop mdadm finding and configuring the drives.

1 Like

So as long as mdadm is called loaded in the initramfs, it should scan and assemble arrays?

Been a looong time since I briefly tried it :frowning:

1 Like

So, I’ll go over the few steps I took and maybe it will be apparent to someone what I did wrong:

I have two 4TB HDDs. Identical. One is sda and the other is sdb.

I ran mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda /dev/sdb

Bam! That created a RAID array. Looking in Disks app, it showed sda and sdb as Linux RAID partitions and a new 4TB drive called md0 was there. I then formatted md0 as ext4. I could then mount it and copy stuff to it. Since I was restoring about 3TB of crap, it took hours, compounded by the fact that the array was busy sync’ing as well.

Hours later, it finished. I could browse md0 and see all my stuff and mdadm declared it happy and healthy.

Rebooted. Gone. Told mdadm to rescan and find it. Told me there’s nothing and never has been. I looked in Disks app and it showed sda and sdb as unpartitioned free space.

I figure since it was working fine, there must be a simple step or two I need to do in order to get the array to redetect and rebuild.

Either your description is oversimplified, or you created a large ext4 file system directly on a raw disk, which is a bad idea. Disks should be partitioned, and the “RAID” flag should be set (with parted).

parted -l /dev/sda might shed some light on things. mdadm --examine-bitmap /dev/sda should offer a lot of useful info.

mdadm --assemble -v /dev/md0 /dev/sd[ab] should restore your array, and if that works, mdadm --detail --scan > /etc/mdadm.conf should make sure it doesn’t forget about it again.

testdisk is pretty good at analyzing disks and should at least give you a good idea what’s on those two drives and allow recovering them, even if the md superblock really did get blown away by something.

4 Likes

Thank you for your help! So, I re-created the array (declaring the raid members by their ID instead of by sda or sdb) and it immediately reappeared with the correct volume name and had my data still on it. It re-sync’d and this time I pushed the mdadm detail/scan output into the mdadm.conf file as you suggested. Rebooted and the array is persisting. :slight_smile:

1 Like

I thought one had to format md0 with a filesystem? like makefs ext4 or something?

You need to create a file system, but it’s a very good idea to have partitions, too. Preferably, you create md0 from partitions on the disks, i.e. /dev/sda1 & sdb1 in this case.

My Spotify Flatpak keeps triggering sounds as notifications on my (KDE) Tumbleweed system everytime a new song starts. Notification is ok, but thatsound is annoying and I can’t seem to find the correct options to kill off that notification sound

I have got a list of package updates available for my Debian 11 installation. The issue is that several of these packages break ceratin things like networking and cups client printer discovery. I want to be able to upgrade the packages in small groups to isolate which package upgrade breaks what is working now. I can do this easily in the Synaptic Package Manager. What I also want to be able to do is to roll back an upgrade if it breaks something. Searching Google there doesn’t seem to be an easy way. Is there a way to upgrade packages that allows you to easily downgrade it? Is there way to archive the existing .deb package to install via dpkg later? I know apt archives packages downloaded but I also want to keep a copy of what is being upgraded. I know having to do this in Debian is quite crazy when it is known to be the stable of all and the reason why I picked it.

Well, using btrfs is the easy way. (Really, set up right it’s a few instant commands and a reboot.) But you can achieve nearly as good results using rsync. TimeShift uses btrfs or rsync; it may be what you want, though I haven’t used it.

KeyPress event, serial 40, synthetic NO, window 0x7000001,
    root 0x1ed, subw 0x0, time 8036965, (-399,213), root:(1872,832),
    state 0x10, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x7000001,
    root 0x1ed, subw 0x0, time 8037072, (-399,213), root:(1872,832),
    state 0x10, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x7000001,
    root 0x1ed, subw 0x0, time 8603183, (-968,234), root:(1303,853),
    state 0x10, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0x7000001,
    root 0x1ed, subw 0x0, time 8603342, (-968,234), root:(1303,853),
    state 0x10, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

is what I get when pressing f8 without and with fn.

KeyPress event, serial 40, synthetic NO, window 0x7000001,
    root 0x1ed, subw 0x0, time 8808518, (-225,1014), root:(226,1900),
    state 0x10, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x7000001,
    root 0x1ed, subw 0x0, time 8808654, (-225,1014), root:(226,1900),
    state 0x10, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x7000001,
    root 0x1ed, subw 0x0, time 8867263, (-179,39), root:(272,925),
    state 0x10, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x7000001,
    root 0x1ed, subw 0x0, time 8867375, (-179,39), root:(272,925),
    state 0x10, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

f11/playplause on another keyboard with and without fn.

Not sure what to make of the numbers and there’s no listed function lock key in the manufacturers site.

If you do apt get upgrade, this should not break your system, it will not remove anything, it will only upgrade existing packages and install any new dependencies. Once you get through that, you can do the atp full-upgrade to get to the current version of your release. This is destructive and this is where you may have some conflicts like what you are describing.

Are you mixing and matching repositories or are you only using the default Debian repositories? Are you mixing Debian versions? I think I am the resident Debian shill here and I run unstable/SID as my daily, I rarely have breakage issues until a major release is imminent and they shift the repos over by one.

As far as roll back, there is a way but you need to be on XFS or BTRFS to utilize it I think. Otherwise you need to dump your currently installed package list to a file to use for play back if you want to force roll back packages.

Otherwise, you will have to install each upgradable package in groups of main + dependencies.

1 Like

yep it shouldnt but i does on debian… quite regularly. :frowning:
last time for me was the nvidia non-free gpu drivers… when they went from 490? to 520
the non-free was loading the the 490? driver but trying to install cuda for 520.

i thought i broke something so spend half a day trying to fix it only to download a fresh image and have the same thing happen again.
3 days later i found a solution… and a day after nvida sorted it there end.

then last month debian got a big update and guess what… more shit broke.
something to do with php8.1 so again i just re-imaged.

as for pepsi… your best bet is a new image if stuff is breaking.
especially if its full version updates you need.
and debian stable?.. not if your doing nightly build updates or even weekly ones.

1 Like

I guess you mileage may vary but, Debian is my daily for a reason. I have been running SID since ~2007 with limited issues minus what was mentioned above. I tend to run all AMD systems though as I have been burned by nVidia too many times in the early 2000s. I don’t run stable on my devices though. I use testing as a bare minimum on my SBCs or ArchLinuxARM if they are supported.

2 Likes

I have main, contrib and non-free repos enabled but that is it. No sid or testing. I don’t install .deb packages outside these and use Flatpaks and AppImages for everything else. But as HEXIT points out some package updates do weird things even in Debian.

It is not like Debian doesn’t know this happens because they have a wiki page about rolling back updates at https://wiki.debian.org/RollbackUpdate except apt-get it not playing along to follow their guide - see further below.

Changing the file system now is not preferred as my root partition is already set up as ext4. I will park this for when I do a full release upgrade. I suppose btrfs + a utility like timeshift will give the equivalent to Windows System Restore?

Currently, I do periodic manual partition image back ups to my NAS using Clonezilla before I make major changes and that is how I recovered when I initially upgraded all the packages and things broke. But this is cumbersome to do every time I want to update a package. Can timeshift be used with rsync to a Samba share on the network? Can rsync do a full backup on a live file system? This is why I have opted for Clonezilla.

Back to the alternative, I have created a log of current and to be upgraded version list of packages using the utility apt-show-versions. To test the water as an example I upgraded unzip utility from version 6.0-26 to 6.0-26+deb11u1. Then I tied to roll back to the previous version manually using sudo apt-get install unzip=6.0-26 and got the following error:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Version '6.0-26' for 'unzip' was not found

Not sure why. It looks like apt-get no longer offers the previous version?? This means I need to keep a local copy of the .deb package and force a downgrade using dpkg. I am loathed to do this because it doesn’t keep track of dependencies. Anyway, the question is where do I get the existing version .deb package? From the installation media I used?

I am also a Debian shill because I have a soft spot for it having used it over many years on and off plus on Raspberry Pis but this whole situation of unreliable package updates makes me feel like I am in Arch land. Once I isolate the offending package/s I will share more details of it and also make a bug report.

I suggest you look into btrfs.

1 Like