Sonntag, 30. Juni 2013

Dear Lazyweb ... why does lshw (still) identify my Linux raid autodetect partition(s) as NTFS volumes?

In a very first attempt, my disk:2 was partitioned and initialized as follows:

/dev/sdc1     1,5TB     NTFS
/dev/sdc2     0,5TB     EXT4

This was later changed to what you can see below and what fdisk correctly reports. These partitions all use the EXT4 file system.

[..]
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   524290047   262144000   fd  Linux raid autodetect
/dev/sdb2       524290048  3907029167  1691369560   fd  Linux raid autodetect
[..]
   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048   524290047   262144000   fd  Linux raid autodetect
/dev/sdc2       524290048  3907029167  1691369560   fd  Linux raid autodetect
[..]

I'm wondering why lshw and parted shows some of the partitions still being NTFS volumes? Checkout the output below. How can this be fixed? What is missing? Erase some header data?

Model: ATA WDC WD20EFRX-68A (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  268GB   268GB   primary               raid
 2      268GB   2000GB  1732GB  primary               raid


Model: ATA WDC WD20EFRX-68A (scsi)
Disk /dev/sdc: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  268GB   268GB   primary  ntfs         raid
 2      268GB   2000GB  1732GB  primary               raid
[..]
  *-disk:1
       description: ATA Disk
       product: WDC WD20EFRX-68A
       vendor: Western Digital
       physical id: 1
       bus info: scsi@3:0.0.0
       logical name: /dev/sdb
       version: 80.0
       serial: WD-WCC300354221
       size: 1863GiB (2TB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 sectorsize=4096
     *-volume:0
          description: Linux raid autodetect partition
          physical id: 1
          bus info: scsi@3:0.0.0,1
          logical name: /dev/sdb1
          capacity: 250GiB
          capabilities: primary multi
     *-volume:1
          description: Linux raid autodetect partition
          physical id: 2
          bus info: scsi@3:0.0.0,2
          logical name: /dev/sdb2
          capacity: 1613GiB
          capabilities: primary multi
  *-disk:2
       description: ATA Disk
       product: WDC WD20EFRX-68A
       vendor: Western Digital
       physical id: 2
       bus info: scsi@4:0.0.0
       logical name: /dev/sdc
       version: 80.0
       serial: WD-WCC1T0567095
       size: 1863GiB (2TB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 sectorsize=4096 signature=000a4d07
     *-volume:0
          description: Windows NTFS volume
          physical id: 1
          bus info: scsi@4:0.0.0,1
          logical name: /dev/sdc1
          version: 3.1
          serial: 013e-8473
          size: 1396GiB
          capabilities: primary multi ntfs initialized
          configuration: clustersize=4096 created=2013-06-18 06:24:11 filesystem=ntfs label=MEDIA state=clean
     *-volume:1
          description: Linux raid autodetect partition
          physical id: 2
          bus info: scsi@4:0.0.0,2
          logical name: /dev/sdc2
          capacity: 1613GiB
          capabilities: primary multi
[..]

Kommentare:

  1. Probably. I make it a habit to clean the first few Mebibytes (and, recently, also the last few Mebibytes) of a partition before (re-)using it (and also using in the first place).

    Additionally… 0xFD Linux RAID autodetect works only with 0.90 metadata, which recently made my system unbootable (because it was on the last partition, which made md think the RAID is on /dev/sda instead of /dev/sda2); you should be using 0xDA arbitrary data and 1.x metadata… ☹

    AntwortenLöschen
    Antworten
    1. That seems to work. sfdisk even showed some message (I probably overlooked before) to run: dd if=/dev/zero of=/dev/sd?? bs=512 count=1.

      I have no problem with version 1.2 metadata (I don't use the RAID to boot from it) although there seems to be an issue: http://article.gmane.org/gmane.user-groups.linux.dresden/23580.

      Löschen
  2. Partition tables do contain a flag to specify the filesystem type of a partition. Best bet: the partition still has a flag value matching ntfs. You can correct the situation using cfdisk. Be sure to read the manual before using this command. HTH

    AntwortenLöschen
    Antworten
    1. Neither cfdisk nor parted were able to delete this flag. I got it using the command issued by sfdisk: dd if=/dev/zero of=/dev/sdc1 bs=512 count=1

      Löschen