All of lore.kernel.org
 help / color / mirror / Atom feed
From: antlists <antlists@youngman.org.uk>
To: linux-raid@vger.kernel.org
Subject: Re: “root account locked” after removing one RAID1 hard disc
Date: Mon, 30 Nov 2020 09:27:15 +0000	[thread overview]
Message-ID: <bc15926a-8bf4-14ae-bd67-ae14d915d4c0@youngman.org.uk> (raw)
In-Reply-To: <e6b7a61d16a25c433438c670fa4c0b4f@posteo.de>

On 30/11/2020 08:44, c.buhtz@posteo.jp wrote:
> X-Post: https://serverfault.com/q/1044339/374973
> 
> I tried this out in a VirtualMachine to hope I can learn something.
> 
> **Problem**
> 
> The RAID1 does not containt any systmem relevant data - the OS is on 
> another drive. My Debian 10 does not boot anymore and tells me that I am 
> in emergency mode and "Cannot open access to console, the root account 
> is locked.". I removed one of the two RAID1 devices before.

I don't think this is specific to raid ...
> 
> And systemd tells me while booting "A start job is running for /dev/md127".
> 
> **Details***
> 
> The virtual machine contains three hard disks. /dev/sda1 use the full 
> size of the disc and containts the Debian 10. /dev/sdb and /dev/sdc (as 
> discs without partitions) are configured as RAID1 /dev/md127 and 
> formated with ext4 and mounted to /Daten. I can read and write without 
> any problems to the RAID.
> 
> I regualr shutdown and then removed /dev/sdc. After that the system does 
> not boot anymore and shows me the error about the locked root account.
> 
> **Question 1**
> 
> Why is the system so sensible about one RAID device that does not 
> contain essential data for the boot process. I would I understand if 
> there is a error messages somewhere. But blocking the whole boot process 
> is to much in my understanding.

It's not. It's sensitive to the fact that ANY disk is missing.
> 
> **Question 2**
> 
> I read that a single RAID1 device (the second is missing) can be 
> accessed without any problems. How can I do that?

When a component of a raid disappears without warning, the raid will 
refuse to assemble properly on next boot. You need to get at a command 
line and force-assemble it.
> 
> **More details**
> 
> Here is the output of my fdisk -l. Interesting here is that /dv/md127 is 
> shown but without its filesysxtem.
> 
>> Disk /dev/sda: 128 GiB, 137438953472 bytes, 268435456 sectors
>> Disk model: VBOX HARDDISK
>> Disklabel type: dos
>> Disk identifier: 0xe3add51d
>>
>> Device     Boot Start       End   Sectors  Size Id Type
>> /dev/sda1  *     2048 266338303 266336256  127G 83 Linux
>>
>>
>> Disk /dev/sdb: 8 GiB, 8589934592 bytes, 16777216 sectors
>> Disk model: VBOX HARDDISK
>>
>> Disk /dev/sdc: 8 GiB, 8589934592 bytes, 16777216 sectors
>> Disk model: VBOX HARDDISK
>>
>> Disk /dev/md127: 8 GiB, 8580497408 bytes, 16758784 sectors
>> Units: sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 512 bytes
>> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> Here is mount output:
> 
>> sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
>> /dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro)
>> /dev/md127 on /Daten type ext4 (rw,relatime)

And here is at least part of your problem. If the mount fails, systemd 
will halt and chuck you into a recovery console. I had exactly the same 
problem with an NTFS partition on a dual-boot system.
> 
> This is /etc/fstab:
> 
>> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
>> # / was on /dev/sda1 during installation
>> UUID=65ec95df-f83f-454e-b7bd-7008d8055d23 /               ext4 
>> errors=remount-ro 0       1
>>
>> /dev/md127  /Daten      ext4    defaults    0   0
> 
> 
Is root's home on /Daten? It shouldn't be.

Cheers,
Wol

  reply	other threads:[~2020-11-30  9:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30  8:44 “root account locked” after removing one RAID1 hard disc c.buhtz
2020-11-30  9:27 ` antlists [this message]
2020-11-30 10:29   ` c.buhtz
2020-11-30 11:40     ` Wols Lists
2020-11-30 10:31   ` Reindl Harald
2020-11-30 11:10     ` Rudy Zijlstra
2020-11-30 11:18       ` Reindl Harald
2020-11-30 20:06         ` ???root account locked??? " David T-G
2020-11-30 21:57           ` Reindl Harald
2020-11-30 22:06             ` RAID repair script (was "Re: ???root account locked??? after removing one RAID1 hard disc" David T-G
2020-11-30 12:00     ` “root account locked” after removing one RAID1 hard disc Wols Lists
2020-11-30 12:13       ` Reindl Harald
2020-11-30 13:11         ` antlists
2020-11-30 13:16           ` Reindl Harald
2020-11-30 13:47             ` antlists
2020-11-30 13:53               ` Reindl Harald
2020-11-30 14:46                 ` Rudy Zijlstra
2020-11-30 20:05 ` partitions & filesystems (was "Re: ???root account locked??? after removing one RAID1 hard disc") David T-G
2020-11-30 20:51   ` antlists
2020-11-30 21:03     ` Rudy Zijlstra
2020-11-30 21:49     ` Reindl Harald
2020-11-30 22:31       ` antlists
2020-11-30 23:21         ` Reindl Harald
2020-11-30 23:59           ` antlists
2020-11-30 22:04     ` partitions & filesystems David T-G
2020-12-01  8:45     ` partitions & filesystems (was "Re: ???root account locked??? after removing one RAID1 hard disc") c.buhtz
2020-12-01  9:18       ` Rudy Zijlstra
2020-12-01 10:00       ` Wols Lists
2020-12-01  8:41   ` buhtz
2020-12-01  9:13     ` Reindl Harald
2020-12-01  8:42   ` c.buhtz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc15926a-8bf4-14ae-bd67-ae14d915d4c0@youngman.org.uk \
    --to=antlists@youngman.org.uk \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.