Mailinglist Archive: opensuse (686 mails)

< Previous Next >
Re: [opensuse] md stealing disks! (solved)
(top posting to close the issue)

Hi Folks,

I figured out what was going on. The disk, that I thought was new,
apparently wasn't. It must have been a member of an md array
at one point, and the kernel was grabbing it and trying to use it.

So this sequence cleared out the md superblock and allowed me
to configure the disk.

1. cat /proc/mdstat to determine the md devices. In this case they
were md126 and md127 living on /dev/sdg. They were also
inactive.

2. mdadm --stop /dev/md126; mdadm --stop /dev/md127

3. mdadm --zero-superblock /dev/sdg

That was it. The zypper dup was just happenstance and not related
to the issue.

Regards,
Lew

On 07/17/2013 11:31 AM, Lew Wolfgang wrote:
On 07/17/2013 11:22 AM, Andrey Borzenkov wrote:
В Wed, 17 Jul 2013 10:53:58 -0700
Lew Wolfgang <wolfgang@xxxxxxxxxxxxxxx> пишет:

Hi Folks,

Here's an odd one. I pulled a "zypper dup" yesterday on
a 12.3 x86-64 without any obvious issues.

But today, I connected a brand new 3.5-in SATA disk to the
system with one of those SATA/USB converters. I do this
all the time and have never had any issues.

So, I "tail -f /var/log/messages" to get the /dev/sdx id
and then run fdisk /dev/sdf, in this case. I create one
Linux partition using the whole disk. No problems noted.

But now, when I run "mkfs.xfs /dev/sdf1" I get this error:

"mkfs.xfs: cannot open /dev/sdf1: Device or resource busy"

df doesn't show anything, and the Device Notifier is quiet.

I then notice this in /var/log/messages:

"[ 1122.179127] md: bind<sdf>"

It looks like md is snatching the disk! But I'm not running md,
to the best of my knowledge. A "ps ax |grep -i md" shows:

90 ? S< 0:00 [md]
95 ? SN 0:00 [ksmd]

Is systemd quietly starting md which is then trying to be helpful?
Of course. It also ate your kittens.

Of course! That's where they went!


"kill -9 90" doesn't touch the process.

"cat /proc/mdstat" shows:

Personalities :
md126 : inactive sdf[0]
976224256 blocks super external:/md127/0

md127 : inactive sdf[0](S)
538328 blocks super external:ddf
Zero out last couple of megabytes of this disk.

Huh?


unused devices: <none>

This process of adding/formatting disks has worked for decades before
yesterday's zypper dup. Are other folks seeing this?

Regards,
Lew



--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >