Unrecognised Disk Label When Creating Partition

»»»Unrecognised Disk Label When Creating Partition
When creating and adding a primary partition on a new hard disk through Webmin, error occurred and the creation of new partition failed. The error message is similar to the following, where the drive name and size may differ, e.g. /dev/sda, /dev/sdc, /dev/sdd etc.

Failed to save partition : parted -s /dev/sdb unit cyl mkpart primary 0 30394 failed : Error: /dev/sdb: unrecognised disk label

Add Partition Failed Unrecognised Disk Label

If you list the partition layout and all block devices information using “parted -l” command, it will give you similar error too:

Error: /dev/sdb: unrecognised disk label

Apparently Webmin cannot manage a new drive without any existing partition table. The resolution is to make a label on the disk first, with “parted” command.

Login to the server’s terminal which you want to install the new disk via console or SSH if remotely, and run the following command (replace the name of the disk with actual one assigned by Linux to the new disk):

$ sudo parted /dev/sdb
(parted) mklabel msdos
(parted) quit
If you prefer to use GTP GUID partition table, or have a large hard disk exceeding 2TB, or want to create a large partition exceeding 2TB, you can create a GPT partition with the following command instead of “mklabel msdos”:

(parted) mklabel gpt

Steps above create a blank table on the hard disk. Then, you can continue to add new partition using Webmin’s “Partitions on Local Disks” module.

Alternatively, you can continue to manually create the filesystem on the new partition created with parted, mkfs, and other commands. For example:

mkfs -t ext4 -q /dev/sdb1

Then, create a mount point for the new filesystem and mount the new file system:

mkdir /newdisk
mount /dev/sdb1 /newdisk

Ensure that the entry for the new filesystem and hard disk is recorded inside /etc/fstab so that it will mount automatically on system startup.

/dev/sdb1 /newdisk ext4 defaults 0 2

Where you can modify the parameters according to your need, with explanation below:

/dev/sdb1: Name for the partition
/newdisk: Mount point
ext4: Filesystem (fs) type
defaults : Mount options
0: Zero indicates to exclude this filesystem from dump command backup.
2: Second indicates the order which fsck filesystem check at boot. Only the root (/) filesystem should be specified with 1, all others should be 2.

By |2016-12-09T08:39:14+00:00December 9th, 2016|Categories: Linux|Tags: , |0 Comments

About the Author:

LK is a technology writer for Tech Journey with background of system and network administrator. He has be documenting his experiences in digital and technology world for over 15 years.Connect with LK through Tech Journey on Facebook, Twitter or Google+.