13 Replies Latest reply on Jan 26, 2010 7:25 AM by csayantan

    Error: Unable to open /dev/md0 - unrecognised disk label

    csayantan
      hi

      i am getting an interesting error.its a fresh installed OEL5.4 x86_64.but facing an issue with partition.how to get rid of from this error?
      [root@pc-2 ~]# fdisk -ls
      
      WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
      
      
      Disk /dev/sda: 80.0 GB, 80026361856 bytes
      255 heads, 63 sectors/track, 9729 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      
         Device Boot      Start         End      Blocks   Id  System
      /dev/sda1   *           1        3916    31455238+   7  HPFS/NTFS
      /dev/sda2            3917        9728    46684890    f  W95 Ext'd (LBA)
      /dev/sda5            3917        7863    31704246    7  HPFS/NTFS
      /dev/sda6            7864        7876      104391   83  Linux
      
      Disk /dev/sdb: 160.0 GB, 160041885696 bytes
      255 heads, 63 sectors/track, 19457 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      
         Device Boot      Start         End      Blocks   Id  System
      /dev/sdb1   *           1        5222    41945683+  83  Linux
      /dev/sdb2            5223        5744     4192965   82  Linux swap / Solaris
      AS in the Starting it says *"WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted."* so i tried "parted".but parted says
      [root@pc-2 ~]# parted /dev/md
      Error: Could not stat device /dev/md - No such file or directory.         
      Retry/Cancel? retry                                                       
      Error: Could not stat device /dev/md - No such file or directory.         
      Retry/Cancel? C                                                           
      [root@pc-2 ~]# parted /dev/
      Error: Error opening /dev: Invalid argument                               
      Retry/Cancel? C                                                           
      [root@pc-2 ~]# parted /dev/md0
      Warning: Unable to determine geometry of file/device /dev/md0.  You should not use Parted unless
      you REALLY know what you're doing!
      Ignore/Cancel? I                                                          
      GNU Parted 1.8.1
      Using /dev/md0
      Welcome to GNU Parted! Type 'help' to view a list of commands.
      (parted) help                                                             
        check NUMBER                             do a simple check on the file system
        cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER   copy file system to another partition
        help [COMMAND]                           prints general help, or help on COMMAND
        mklabel,mktable LABEL-TYPE               create a new disklabel (partition table)
        mkfs NUMBER FS-TYPE                      make a FS-TYPE file system on partititon NUMBER
        mkpart PART-TYPE [FS-TYPE] START END     make a partition
        mkpartfs PART-TYPE FS-TYPE START END     make a partition with a file system
        move NUMBER START END                    move partition NUMBER
        name NUMBER NAME                         name partition NUMBER as NAME
        print [free|NUMBER|all]                  display the partition table, a partition, or all devices
        quit                                     exit program
        rescue START END                         rescue a lost partition near START and END
        resize NUMBER START END                  resize partition NUMBER and its file system
        rm NUMBER                                delete partition NUMBER
        select DEVICE                            choose the device to edit
        set NUMBER FLAG STATE                    change the FLAG on partition NUMBER
        toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition NUMBER
        unit UNIT                                set the default unit to UNIT
        version                                  displays the current version of GNU Parted and copyright
              information
      (parted) rm /dev/md0                                                      
      Error: Unable to open /dev/md0 - unrecognised disk label.                 
      (parted) rm
      Error: Unable to open /dev/md0 - unrecognised disk label.                 
      (parted) print                                                            
      Error: Unable to open /dev/md0 - unrecognised disk label.                 
      (parted) version                                                          
      
      GNU Parted 1.8.1
      
      Copyright (C) 1998 - 2006 Free Software Foundation, Inc.
      This program is free software, covered by the GNU General Public License.
      
      This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
      
      (parted) quit                                                             
      Information: Don't forget to update /etc/fstab, if necessary. 
      how to get rid of it.

      regards
        • 1. Re: Error: Unable to open /dev/md0 - unrecognised disk label
          506787
          ghost rieder, how did you came up with /dev/md0?

          md0 is the linux software RAID device.

          fdisk complains about attributes it can't cope with, and suggest you use parted.

          why not use parted on /dev/sda?
          • 2. Re: Error: Unable to open /dev/md0 - unrecognised disk label
            csayantan
            hi

            Thanx for help frits
            frits hoogland wrote:
            ghost rieder, how did you came up with /dev/md0?

            md0 is the linux software RAID device.
            i had some RAID3 devices in this hdd.but this time,when i was installing OEL 5.4 i removed all of them.
            >
            fdisk complains about attributes it can't cope with, and suggest you use parted.

            why not use parted on /dev/sda?
            i did it but i bit different way the problem is still the same.as it is a dual boot box,so i simply went to my win env and formated disk one by the sweet graphical partition maker tool from there.BUT the situation is still the same.

            regards
            • 3. Re: Error: Unable to open /dev/md0 - unrecognised disk label
              506787
              if you still are interested in solving this, get the case right (your considerations and screenoutput of what you've done). the question now is quite vague, because the output doesn't comply with what you want to accomplish.
              • 4. Re: Error: Unable to open /dev/md0 - unrecognised disk label
                csayantan
                frits hoogland wrote:
                if you still are interested in solving this, get the case right (your considerations and screenoutput of what you've done). the question now is quite vague, because the output doesn't comply with what you want to accomplish.
                i had oel 5.4 with some raid made by raid s/w tool which comes with oel 5.4 during installation of the same).now the problem is i removed all of them during installation ie. during second time installation of oel 5.4.ie. i removed all the partition of raid and root partition and boot and everything of that previous installed os.so there should not be any /dev/mdx like partition.

                but i am getting that error that i posted with parted cmd.

                so what to do?

                regards

                NB:- its a dual boot machine.there is an xp sp2 too.
                • 5. Re: Error: Unable to open /dev/md0 - unrecognised disk label
                  506787
                  So the issue still is fdisk is complaining, and telling you to use parted.

                  Why not use parted? You did not post the output of using parted with your partition; only with the RAID device.
                  • 6. Re: Error: Unable to open /dev/md0 - unrecognised disk label
                    csayantan
                    frits hoogland wrote:
                    So the issue still is fdisk is complaining, and telling you to use parted.

                    Why not use parted? You did not post the output of using parted with your partition; only with the RAID device.
                    /dev/md0 should not be there........ parted output
                    [root@pc-2 ~]# parted -l
                    
                    Model: ATA SAMSUNG HD080HJ (scsi)
                    Disk /dev/sda: 80.0GB
                    Sector size (logical/physical): 512B/512B
                    Partition Table: msdos
                    
                    Number  Start   End     Size    Type      File system  Flags
                     1      32.3kB  32.2GB  32.2GB  primary   ntfs         boot 
                     2      32.2GB  80.0GB  47.8GB  extended               lba  
                     5      32.2GB  64.7GB  32.5GB  logical   ntfs              
                     6      64.7GB  64.8GB  107MB   logical   ext3              
                     7      64.8GB  80.0GB  15.2GB  logical   ntfs              
                    
                    
                    
                    Model: ATA ST3160815AS (scsi)
                    Disk /dev/sdb: 160GB
                    Sector size (logical/physical): 512B/512B
                    Partition Table: msdos
                    
                    Number  Start   End     Size    Type      File system  Flags
                     1      32.3kB  43.0GB  43.0GB  primary   ext3         boot 
                     2      43.0GB  47.2GB  4294MB  primary   linux-swap        
                     3      47.2GB  160GB   113GB   extended               lba  
                     5      47.2GB  52.6GB  5371MB  logical                     
                     6      52.6GB  58.0GB  5371MB  logical                     
                    
                    
                    Error: Unable to open /dev/md0 - unrecognised disk label.                 
                    
                    [root@pc-2 ~]# 
                    As i removed all of raid and all parts of previous installation.

                    what to do?
                    • 7. Re: Error: Unable to open /dev/md0 - unrecognised disk label
                      506787
                      okay, here's what to do:
                      query the raid device to see what it is composed of:
                      mdadm --query /dev/md0
                      then remove the device:
                      mdadm --remove /dev/md0 <device found with above --query>
                      • 8. Re: Error: Unable to open /dev/md0 - unrecognised disk label
                        csayantan
                        frits hoogland wrote:
                        okay, here's what to do:
                        query the raid device to see what it is composed of:
                        mdadm --query /dev/md0
                        [root@rac-1 ~]# mdadm --query /dev/md0
                        /dev/md0: is an md device which is not active
                        /dev/md0: No md super block found, not an md component.
                        [root@rac-1 ~]# 
                        >
                        then remove the device:
                        mdadm --remove /dev/md0 <device found with above --query>
                        what to do?

                        regards
                        • 9. Re: Error: Unable to open /dev/md0 - unrecognised disk label
                          506787
                          I am not sure if
                           mdadm --remove /dev/md0 
                          would work, try it to see if the device gets removed that way, otherwise remove it the blunt way:
                          rm -rf /dev/md0 
                          then it shouldn't give anymore troubles.
                          • 10. Re: Error: Unable to open /dev/md0 - unrecognised disk label
                            csayantan
                            frits hoogland wrote:
                            I am not sure if
                             mdadm --remove /dev/md0 
                            [root@rac-1 ~]# mdadm --remove /dev/md0
                            [root@rac-1 ~]# mdadm --query /dev/md0
                            /dev/md0: is an md device which is not active
                            /dev/md0: No md super block found, not an md component.
                            [root@rac-1 ~]# 
                            would work, try it to see if the device gets removed that way, otherwise remove it the blunt way:
                            rm -rf /dev/md0 
                            [root@rac-1 ~]# rm -rf /dev/md0
                            [root@rac-1 ~]# mdadm --query /dev/md0
                            mdadm: cannot open /dev/md0: No such file or directory
                            [root@rac-1 ~]# 
                            then it shouldn't give anymore troubles.
                            [root@rac-1 ~]# parted -l
                            
                            Model: ATA SAMSUNG HD080HJ (scsi)
                            Disk /dev/sda: 80.0GB
                            Sector size (logical/physical): 512B/512B
                            Partition Table: msdos
                            
                            Number  Start   End     Size    Type      File system  Flags
                             1      32.3kB  32.2GB  32.2GB  primary   ntfs         boot 
                             2      32.2GB  80.0GB  47.8GB  extended               lba  
                             5      32.2GB  64.7GB  32.5GB  logical   ntfs              
                             6      64.7GB  64.8GB  107MB   logical   ext3              
                             7      64.8GB  80.0GB  15.2GB  logical   ntfs              
                            
                            
                            
                            Model: ATA ST3160815AS (scsi)
                            Disk /dev/sdb: 160GB
                            Sector size (logical/physical): 512B/512B
                            Partition Table: msdos
                            
                            Number  Start   End     Size    Type      File system  Flags
                             1      32.3kB  43.0GB  43.0GB  primary   ext3         boot 
                             2      43.0GB  47.2GB  4294MB  primary   linux-swap        
                             3      47.2GB  160GB   113GB   extended               lba  
                             5      47.2GB  52.6GB  5371MB  logical                     
                             6      52.6GB  58.0GB  5371MB  logical                     
                            
                            
                            [root@rac-1 ~]# 
                            looks it worked.may i know why the other than rm did not work?
                            • 11. Re: Error: Unable to open /dev/md0 - unrecognised disk label
                              506787
                              the
                               mdadm --remove <raid device> <block device> 
                              does not remove the raid device, but is meant for removing block devices from the raid device. I suspected that, that is the reason I let you try it. I haven't dived very deep into software RAID, so I do not know for sure if there a mdadm command for removing the device. either way, we've made sure there are no devices in the RAID device, so we could remove it with a simple 'rm'.
                              1 person found this helpful
                              • 12. Re: Error: Unable to open /dev/md0 - unrecognised disk label
                                csayantan
                                frits hoogland wrote:
                                the
                                 mdadm --remove <raid device> <block device> 
                                does not remove the raid device, but is meant for removing block devices from the raid device. I suspected that, that is the reason I let you try it. I haven't dived very deep into software RAID, so I do not know for sure if there a mdadm command for removing the device. either way, we've made sure there are no devices in the RAID device, so we could remove it with a simple 'rm'.
                                something strange is still there:
                                [root@rac-1 ~]# gparted
                                ======================
                                libparted : 1.8.1
                                ======================
                                No such file or directory during read on /dev/md0
                                No such file or directory during read on /dev/md0
                                No such file or directory during read on /dev/md0
                                • 13. Re: Error: Unable to open /dev/md0 - unrecognised disk label
                                  csayantan
                                  [root@rac-1 ~]# gparted
                                  ======================
                                  libparted : 1.8.1
                                  ======================
                                  No such file or directory during read on /dev/md0
                                  No such file or directory during read on /dev/md0
                                  No such file or directory during read on /dev/md0
                                  AND
                                  [root@rac-1 ~]# parted -l
                                  
                                  Model: ATA SAMSUNG HD080HJ (scsi)
                                  Disk /dev/sda: 80.0GB
                                  Sector size (logical/physical): 512B/512B
                                  Partition Table: msdos
                                  
                                  Number  Start   End     Size    Type      File system  Flags
                                   1      32.3kB  32.2GB  32.2GB  primary   ntfs         boot 
                                   2      32.2GB  80.0GB  47.8GB  extended               lba  
                                   5      32.2GB  64.7GB  32.5GB  logical   ntfs              
                                   6      64.7GB  64.8GB  107MB   logical   ext3              
                                   7      64.8GB  80.0GB  15.2GB  logical   ntfs              
                                  
                                  
                                  
                                  Model: ATA ST3160815AS (scsi)
                                  Disk /dev/sdb: 160GB
                                  Sector size (logical/physical): 512B/512B
                                  Partition Table: msdos
                                  
                                  Number  Start   End     Size    Type      File system  Flags
                                   1      32.3kB  43.0GB  43.0GB  primary   ext3              
                                   2      43.0GB  47.2GB  4294MB  primary   linux-swap        
                                   3      47.2GB  160GB   113GB   extended               lba  
                                   6      47.2GB  58.0GB  10.7GB  logical                     
                                   5      58.0GB  68.7GB  10.7GB  logical                     
                                   7      68.7GB  79.4GB  10.7GB  logical                     
                                   8      79.4GB  101GB   21.5GB  logical   ext3              
                                  
                                  
                                  Error: Unable to open /dev/md0 - unrecognised disk label.                 
                                  
                                  [root@rac-1 ~]#