One hard disk wrongly detected as a RAID. Impossible to mount NTFS partitions.

Hi,

I am using openSUSE 13.2 x64

One of my hard drives is a 500GB SATA and has the following partition structure (created by Win7):

  • 100mb (that default system reserved partition which Win7 creates during installation)
  • 100GB (Windows installation C-drive, NTFS)
  • the rest to 500GB - another NTFS partition

For some reason linux detects this as RAID and I can’t mount any of these NTFS partitions. At the same time I have other hard drives on the same system which also have NTFS partitions created in Windows and they are recognized and mounted in linux without problems.

Here is what parted lists:

# parted -l
Model: ATA WDC WD1003FBYX-0 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 


Number  Start   End     Size    Type     File system  Flags
 1      1049kB  1000GB  1000GB  primary  ntfs         type=07




Model: ATA WDC WD5003ABYX-0 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 


Number  Start   End    Size   Type     File system  Flags
 1      1049kB  106MB  105MB  primary  ntfs         boot, type=07
 2      106MB   107GB  107GB  primary  ntfs         type=07
 3      107GB   500GB  393GB  primary  ntfs         type=07




Model: ATA HDS722516VLSA80 (scsi)
Disk /dev/sdc: 165GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 


Number  Start   End     Size    Type     File system     Flags
 1      1049kB  2155MB  2154MB  primary  linux-swap(v1)  type=82
 2      2155MB  23.6GB  21.5GB  primary  ext4            boot, type=83
 3      23.6GB  165GB   141GB   primary  ext4            type=83




Model: ATA INTEL SSDSC2BB24 (scsi)
Disk /dev/sdd: 240GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 


Number  Start   End    Size   Type     File system  Flags
 1      1049kB  240GB  240GB  primary  ntfs         type=07




Model: ATA WDC WD4001FAEX-0 (scsi)
Disk /dev/sde: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 


Number  Start   End     Size    File system  Name                          Flags
 1      17.4kB  134MB   134MB                Microsoft reserved partition  msftres
 2      135MB   4001GB  4001GB  ntfs         Basic data partition




Error: Can't have a partition outside the disk!
Model: Linux Software RAID Array (md)                                     
Disk /dev/md126: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags: 



That /dev/md126 is the problematic piece. As you can see it is also detected once as /dev/sdb and then again as a RAID.

I am also getting quite a lot of these mails in the root account:

Message 96:From root@localhost.localdomain  Wed Jun 24 23:45:01 2015
X-Original-To: root@localhost
Delivered-To: root@localhost.localdomain
From: mdadm monitoring <root@localhost.localdomain>
To: root@localhost.localdomain
Subject: DegradedArray event on /dev/md126:i7
Date: Wed, 24 Jun 2015 23:45:01 +0300 (EEST)


This is an automatically generated mail message from mdadm
running on i7


A DegradedArray event had been detected on md device /dev/md126.


Faithfully yours, etc.


P.S. The /proc/mdstat file currently contains the following:


Personalities : [raid1] 
md126 : active raid1 sdb[0]
      488383488 blocks super external:/md127/0 [2/1] [U_]
      
md127 : inactive sdb[0](S)
      2964 blocks super external:imsm
       
unused devices: <none>

Message 97:
From root@localhost.localdomain  Thu Jun 25 11:19:11 2015
X-Original-To: root@localhost
Delivered-To: root@localhost.localdomain
From: mdadm monitoring <root@localhost.localdomain>
To: root@localhost.localdomain
Subject: DegradedArray event on /dev/md126:i7
Date: Thu, 25 Jun 2015 11:18:24 +0300 (EEST)


This is an automatically generated mail message from mdadm
running on i7


A DegradedArray event had been detected on md device /dev/md126.


Faithfully yours, etc.


P.S. The /proc/mdstat file currently contains the following:


Personalities : [raid1] 
md126 : active (read-only) raid1 sdb[0]
      488383488 blocks super external:/md127/0 [2/1] [U_]
      
md127 : inactive sdb[0](S)
      2964 blocks super external:imsm
       
unused devices: <none>

In YaST > Partitioner this same disk shows twice too (md126 and sdb) in both entries without any partitions.

In case those that matters: There is an entry for it in grub2 menu Windows 7 (loader) (on /dev/md126p1), so I can boot into Windows without problems regardless of the situation. I also recently downgraded from Tumbleweed to 13.2 but it was exactly the same before that too. I actually hoped that somehow this movement to regular version would clean this up but no luck.

How can I fix this so that the partitions on that drive are properly detected and mountable without that fake RAID and error messages?

Perhaps RAID is turned on in the BIOS some machine come that way for no good reason that I know. Maybe MS pays to have it done to make it hard for other OS’s

Also check That fast boot is turned off it will prevent mounting of Windows partitions if turned on.

Also see if the Windows partitions are formatted as Dynamic Disk. This can not work in Linux

On 2015-07-08 00:36, heyjoe wrote:

> For some reason linux detects this as RAID and I can’t mount any of
> these NTFS partitions. At the same time I have other hard drives on the
> same system which also have NTFS partitions created in Windows and they
> are recognized and mounted in linux without problems.

Maybe the socket where it is connected in the motherboard is a fake raid
socket. Maybe this can be configured in the BIOS.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

No. In BIOS setup SATA Mode Selection is set to AHCI (not IDE and not RAID)

Also check That fast boot is turned off it will prevent mounting of Windows partitions if turned on.

How do I check this? (*I am actually able to mount the ntfs partitions on the other drives)

Also see if the Windows partitions are formatted as Dynamic Disk. This can not work in Linux

That drive in particular was split and formatted during standard Windows installation process. So to the best of my knowledge there it is not a dynamic disks. But please let me know if there is anything special I need to do to double check and confirm this.

Just to note: I was actually able to mount the C drive (the 100GB partition) when initially installing Tumbleweed by using the automatic mount points which linux creates in /run/media… But the problem with the third partition on the drive was still present at that time. As soon as I made the mounting of other ntfs partitions on the other drives fixed (i.e. not mount in /run/media but in particular points such as /myntfspartition1) I was no longer able to mount the 100GB “C” partition.

On 2015-07-08 01:26, heyjoe wrote:
>
> gogalthorp;2718690 Wrote:
>> Perhaps RAID is turned on in the BIOS some machine come that way for no
>> good reason that I know.
>>
>
> No. In BIOS setup SATA Mode Selection is set to AHCI (not IDE and
> not RAID)

I rather think that Linux thinks it is. You should have a good look at
the logs, find out what the kernel says when it finds the drive.

>> Also check That fast boot is turned off it will prevent mounting of
>> Windows partitions if turned on.
>
> How do I check this? (*I am actually able to mount the ntfs partitions
> on the other drives)

> Just to note: I was actually able to mount the C drive (the 100GB

This means that the partition is not dynamic, and that fast boot in
Windows is not enabled, or you would not be able to mount it in Linux at
all.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Somewhere in Windows there is a place to set fast boot. Don’t run Windows 8 so can’t guide you check with Windows form or maybe Google

Id does look like Linux thinks there is a RAID array. Has this driver ever been a part of a RAID. There can be residual stuff left in track 0 and last

But that in itself RAID should not stop mount of NTFS. So must be fast boot. This set up causes Windows to not actually shut down but go into some form of hibernation. This leaves the partitions not shut down properly and this causes no mount for any other OS

Your drive has valid IMSM (Intel Matrix array) signature.

May be. But mdadm actually checks for presence of Intel HBA, so it appears that RAID hardware is not completely deactivated.

If you are absolutely sure you are not using IMSM, you could destroy and delete metadata:

mdadm stop /dev/md126
mdadm stop /dev/md127
mdadm --zero-superblock --force /dev/sdb

but keep in mind that is actually writes into disk; area where superblock is located is probably unused (otherwise it would have been overwritten) but you have been warned.

Which logs exactly? Could you provide a command to do this please?

This is Windows 7, not 8 (in case that matters). No, there has never been a RAID on this machine. I don’t even know what fast boot is, so unless it is something turned on by default, I have definitely not set it.

That sounds scary for a non-expert like me who doesn’t even know what IMSM is :slight_smile: Is there a safer option?

Well, information is on disk and it has to be removed from disk. But could you upload output of “udevadm info --export-db” to http://susepaste.org/ to check what devices you actually have?

I tried to by as soon as I click the “Create” button I am taken to a 404 page. Anyway here is the info: https://goo.gl/hPbdHq

Hmm … actually I think it could be considered a bug in mdadm. Apparently in case of EFI it checks HBA class (that it is RAID) but does not do it for legacy systems. It is very good test case; would you consider opening bug report on https://bugzilla.opensuse.org/?

Yes, of course. I am just not sure how as I have never done this before. The bugzilla is asking for a Component - which one is that?
Also what info should I include in the bug report? A link to this thread?

BTW would it be safe if that thing mdadm is simply uninstalled? Might that be a workaround?

On 2015-07-08 11:46, heyjoe wrote:
>
> arvidjaar;2718741 Wrote:
>> It is very good test case; would you consider opening bug report on
>> https://bugzilla.opensuse.org/?

<https://en.opensuse.org/Bugzilla>

> Yes, of course. I am just not sure how as I have never done this before.
> The bugzilla is asking for a Component - which one is that?

Unsure. I think basesystem.

> Also what info should I include in the bug report? A link to this
> thread?

No, you have to write there all the information. You can add a link to
the forum thread, but they must be able to read it all inside Bugzilla
for better chance.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

On 2015-07-08 09:36, heyjoe wrote:
>
> robin_listas;2718705 Wrote:
>>
>> You should have a good look at the logs, find out what the kernel says
>> when it finds the drive.
>
> Which logs exactly? Could you provide a command to do this please?

dmesg and journalctl.

If you have syslog enabled, then you also get the /var/log/messages file.

> This is Windows 7, not 8 (in case that matters).

Well, fast boot is a feature of W8, so you haven’t seen it.

> No, there has never
> been a RAID on this machine.

Not the machine, but the disk, no matter in what machine.

> arvidjaar;2718723 Wrote:
>>
>> If you are absolutely sure you are not using IMSM, you could destroy and
>> delete metadata…
>
> That sounds scary for a non-expert like me who doesn’t even know what
> IMSM is :slight_smile: Is there a safer option?

https://en.wikipedia.org/wiki/Intel_Matrix_RAID

It is news to me.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

No. Never used RAID.

All right sirs, filed a bug report as per your advise:

https://bugzilla.opensuse.org/show_bug.cgi?id=937363