alain williams wrote on 1/22/26 11:01 AM:
On Thu, Jan 22, 2026 at 10:03:11AM -0700, D. R. Evans wrote:
Due to a cascading series of failures (some of hardware, some of my brain),
I find myself in the following situation:

You do not say what sort of RAID you are using, but you have 2 disks so I
assume RAID-1 (mirrored disks).


No matter how careful I am, I always end up leaving out important information when asking questions :-)

Yes, you are correct: RAID-1.

I also assume that you have a root file system that is a primary disk
partition, ie you do not use LVM.


I don't use LVM.

The command "parted -l" gives:

----

Model: ATA HGST HDN724030AL (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  16.0GB  16.0GB  primary               boot, raid
 2      16.0GB  2000GB  1984GB  primary               raid

----

All the system info is in that second partition. I don't rightly recall why the first partition is present (it's been an awfully long time since I installed this disk). I suspect that it's reserved for swap, although I doubt that swapping has ever occurred.

This means that the root filesystem is /dev/sda2, rather than /dev/sda1 as you assumed.

The easiest way to recover is to boot from a bootable Debian USB memory stick
or CD-ROM. Do not try to rescue, do something like below - needs work at the
command line.

I had a spare hard drive on which I installed a pristine copy of trixie (on ext4), and that's what I've booted from.


Boot the machine to give you a desktop.


OK.

Open a terminal, become root


OK.

Identify the hard disk that contains your system, look at /proc/partitions.

By "the hard disk that contains your system", I assume you mean the RAID disk.

----

major minor  #blocks  name

   2        0          4 fd0
   8       16 1953514584 sdb
   8       17 1945125888 sdb1
   8       18          1 sdb2
   8       21    8385591 sdb5
   8        0 2930266584 sda
   8        1   15624192 sda1
   8        2 1937889280 sda2
  11        0    1048575 sr0
  11        1    1048575 sr1
   9      126 1937757184 md126

----

sdb (size 2TB) is the drive from which I booted. sda (size 3TB) is the old RAID drive.

I am going to assume that it is /dev/sda with the root file system as /dev/sda1


Actually, /dev/sda2 (see above).

But should I be using /dev/sda2 or /dev/md126 (as listed in /proc/partitions)??

mkdir /tmp/RFS

OK.


mount /dev/sda1 /tmp/RFS


mount /dev/sda2 /tmp/RFS
OK.

For kicks, I also tried
  mount /dev/md126 /tmp/RFS
and that also worked fine.

Copy /dev/ to /tmp/RFS/dev/


So here I have a question. This looks like it will try to copy the /dev/ from the running OS (i.e., the non-RAID drive) and overwrite the /dev that is on the RAID disk.

Why would one do that? The /dev that was on the RAID disk worked fine until the other drive of the pair failed; so why does it need to be overwritten by the
/dev from the running system?

I'm sorry if I'm being dense. In this situation, I'm very nervous about running commands whose purpose I don't understand.

  Doc

--
Web:  http://enginehousebooks.com/drevans

Reply via email to