• Home »
  • Errors »
  • CentOS Linux Parted Error: Unable to open /dev/sdc – unrecognised disk label

CentOS Linux Parted Error: Unable to open /dev/sdc – unrecognised disk label

While rebuilding a large RAID 5 logical drive I had to use parted instead of fdisk. It has been awhile since I had to build a logical drive that was over 2TB so it had been quite awhile since I have used parted which will perform the same basic functions as fdisk and more. Anyhow when first attempting to use parted to create a partition table on the logical volume sitting on top of an Adaptec RAID card with multiple 2TB drives configured as RAID 5 on CentOS Linux I ran into an error. The resolution is easy but needed to note for myself as much as anything else.

CentOS Linux Parted Error Attempting To Partition 6TB Logical Drive:

bash

  1. [root@backup ~]# parted /dev/sdc
  2. GNU Parted 1.8.1
  3. Using /dev/sdc
  4. Welcome to GNU Parted! Type 'help' to view a list of commands.
  5. (parted) help
  6.   check NUMBER                             do a simple check on the file system
  7.   cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER   copy file system to another partition
  8.   help [COMMAND]                           prints general help, or help on COMMAND
  9.   mklabel,mktable LABEL-TYPE               create a new disklabel (partition table)
  10.   mkfs NUMBER FS-TYPE                      make a FS-TYPE file system on partititon NUMBER
  11.   mkpart PART-TYPE [FS-TYPE] START END     make a partition
  12.   mkpartfs PART-TYPE FS-TYPE START END     make a partition with a file system
  13.   move NUMBER START END                    move partition NUMBER
  14.   name NUMBER NAME                         name partition NUMBER as NAME
  15.   print [free|NUMBER|all]                  display the partition table, a partition, or all devices
  16.   quit                                     exit program
  17.   rescue START END                         rescue a lost partition near START and END
  18.   resize NUMBER START END                  resize partition NUMBER and its file system
  19.   rm NUMBER                                delete partition NUMBER
  20.   select DEVICE                            choose the device to edit
  21.   set NUMBER FLAG STATE                    change the FLAG on partition NUMBER
  22.   toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition NUMBER
  23.   unit UNIT                                set the default unit to UNIT
  24.   version                                  displays the current version of GNU Parted and copyright information
  25. (parted) print
  26. Error: Unable to open /dev/sdc - unrecognised disk label.
  27. (parted) print all
  28. Error: Unable to open /dev/sdc - unrecognised disk label.
  29. (parted) mkpart primary ext3 1 5991400
  30. Error: Unable to open /dev/sdc - unrecognised disk label.

The above output shows parted being launched from a terminal window on CentOS Linux. From the error messages it is obvious that we need to create a disk label but it took me a moment to remember the exact syntax. Use the parted syntax below to create a label for the hard drive in question.

Use Parted To Create Disk Label On CentOS Linux:

bash

  1. (parted) mklabel gpt

Now that the disk label has been created you can print the partition table or create new partitions as shown in the below example output.

Create Partition On Multi Terabyte Logical Drive On CentOS Linux:

bash

  1. (parted) mkpart primary ext3 1 5991400
  2. (parted) print
  3.  
  4. Model: Adaptec backup1 (scsi)
  5. Disk /dev/sdc: 5991GB
  6. Sector size (logical/physical): 512B/512B
  7. Partition Table: gpt
  8.  
  9. Number  Start   End     Size    File system  Name     Flags
  10.  1      1000kB  5991GB  5991GB               primary
  11.  
  12. (parted)

In the above example output we now have a 6 TB or Terabyte partition generated by parted on CentOS Linux. Don’t forget to format the filesystem before attempting to use your new partition.

The Accidental Administrator: Linux Server Step-by-Step Configuration Guide (Paperback)


List Price: $40.00 USD
New From: $30.33 USD In Stock
Used from: $34.95 USD In Stock

CentOS 6.2 Basic Installation By Example (CentOS 6 By Example Book 4) (Kindle Edition)


List Price: Click For Price
Kindle Edition: Check Amazon for Pricing Digital Only

Share