Can you not simply stop the systemd FSCK from running (I am asking the obvious question and well as learning when the correct answer comes along.)

Tim H

On 12/9/24 14:31, Ralph Corderoy wrote:
Hi,

I've been asked to help with an old server which is using LVM and
a /dev/mapper RAID 1, mirror, with two disks.  One of the disks has
hardware problems which keeps causing bus resets, delaying access to the
good drive and eventually causing lock ups.

Unplugging SATA power and data to that drive makes the kernel's dmesg
buffer much quieter and happier.  The machine swiftly boots from the
remaining drive but then one of systemd's targets is to fsck the RAID
mirror and that fails as a drive is missing.  systemd promptly stops
many of the things it had started and drops me into rescue mode.

I wish to boot fully with the degraded, one-disk, RAID ‘array’.  I don't
want to put a new drive in and repair the array.  I'd have thought
there'd be a simple command to confirm the degradation was expected.
There's ‘dmraid -x’ but I've found no good documentation, despite Red
Hat seeming to be the author, and suspect it deletes the whole array
rather than removing a disk from it.

Below is some output collected before the fault occurred which may be
useful.

An alternative is to alter the systemd configuration so the fsck always
passes or is no longer a dependency.  Views on the practicality of that
are also welcome.


     # dmraid -r   # format, RAID level, sectors used, data offset.
     /dev/sdc: pdc, "pdc_ghjgcbej", mirror, ok, 3906249984 sectors, data@ 0
     /dev/sdb: pdc, "pdc_ghjgcbej", mirror, ok, 3906249984 sectors, data@ 0
     #

     # dmsetup table
     pdc_ghjgcbej5:  0 3905746944 linear 252:1     501760
     xserver-root:   0 3885056000 linear 252:3        384
     xserver-swap_1: 0   20684800 linear 252:3 3885056384
     pdc_ghjgcbej:   0 3906249984 mirror core 2 131072 nosync 2 8:16 0 8:32 0 1 
handle_errors
     pdc_ghjgcbej2:  0          2 linear 252:1     501758
     pdc_ghjgcbej1:  0     497664 linear 252:1       2048
     #
     # dmsetup status
     pdc_ghjgcbej5:  0 3905746944 linear
     xserver-root:   0 3885056000 linear
     xserver-swap_1: 0   20684800 linear
     pdc_ghjgcbej:   0 3906249984 mirror 2 8:16 8:32 29803/29803 1 RA 1 core
     pdc_ghjgcbej2:  0          2 linear
     pdc_ghjgcbej1:  0     497664 linear
     #

     /dev/mapper:
                crw-rw---- 1 root root  10, 59 2018-03-11 09:27 control
                brw-rw---- 1 root disk 251,  0 2018-03-11 09:27 pdc_ghjgcbej
         /boot  brw-rw---- 1 root disk 251,  1 2018-03-11 09:27 pdc_ghjgcbej1
         lvm2   brw-rw---- 1 root disk 251,  2 2018-03-11 09:27 pdc_ghjgcbej5
         /      brw-rw---- 1 root disk 251,  3 2018-03-11 09:29 xserver-root
         swap   brw-rw---- 1 root disk 251,  4 2018-03-11 09:27 xserver-swap_1

     parted:
         Model: Linux device-mapper (mirror) (dm)
         Disk /dev/mapper/pdc_ghjgcbej: 2000GB
         Sector size (logical/physical): 512B/512B
         Partition Table: msdos

         Number  Start   End     Size    Type      File system  Flags
          1      1049kB  256MB   255MB   primary   ext2         boot
          2      257MB   2000GB  2000GB  extended
          5      257MB   2000GB  2000GB  logical                lvm

     lsblk:
         NAME                        MAJ:MIN RM  SIZE RO TYPE   MOUNTPOINT
         ...
         sdb                           8:16   0  1.8T  0 disk
         └─pdc_ghjgcbej              252:0    0  1.8T  0 dmraid
           ├─pdc_ghjgcbej1           252:1    0  243M  0 part   /boot
           ├─pdc_ghjgcbej2           252:2    0    1K  0 part
           └─pdc_ghjgcbej5           252:3    0  1.8T  0 part
             ├─xserver-root          252:4    0  1.8T  0 lvm    /
             └─xserver-swap_1        252:5    0  9.9G  0 lvm
         sdc                           8:32   0  1.8T  0 disk
         └─pdc_ghjgcbej              252:0    0  1.8T  0 dmraid
           ├─pdc_ghjgcbej1           252:1    0  243M  0 part   /boot
           ├─pdc_ghjgcbej2           252:2    0    1K  0 part
           └─pdc_ghjgcbej5           252:3    0  1.8T  0 part
             ├─xserver-root          252:4    0  1.8T  0 lvm    /
             └─xserver-swap_1        252:5    0  9.9G  0 lvm


--
 Next meeting: Online, Jitsi, Tuesday, 2025-01-07 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  https://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to