3

Just bought a new external drive. Plugged it in, erased current partition using fdisk and created a new extended partition using fdisk. Used all the defaults for start and end blocks:

enter image description here

I then try to format the new partition using the following:

sudo mkfs.ext4 /dev/sdb1

However, I received the following error:

mke2fs 1.42 (29-Nov-2011)
/dev/sdb1: Not enough space to build proposed filesystem while setting up superblock

Any ideas what could be wrong? Should I have created a primary partition? If so, why?

7
  • Why don't you try to create a partition via gparted? Feb 25, 2014 at 4:22
  • @AvinashRaj I already know how to partition it using gparted. I am trying to expand my knowledge.
    – dtmland
    Feb 25, 2014 at 4:23
  • You are trying to expand via terminal not in GUI way.Am i correct? Feb 25, 2014 at 4:24
  • You should initially create logical disk inside Extended partition, then run mkfs for that disk.
    – Danatela
    Feb 25, 2014 at 4:27
  • 1
    Extended partition is 'special partition'. It only should contain logical partitions, not filesystems.
    – Danatela
    Feb 25, 2014 at 4:31

2 Answers 2

2

Danatela is correct; however:

  • It's common practice to use a primary partition for a single-partition disk like this. Although a logical partition will work for this purpose, it involves somewhat more complex data structures than a primary partition, those data structures end up reducing the size of the partition (by an admittedly minuscule amount), and there really is no need for a logical partition on a 1-partition disk, so you get no advantages from these small disadvantages.
  • Your disk is 3TB in size. fdisk reports that it uses 4096-byte logical sectors, and on such disks, the MBR partition table that fdisk manipulates can handle disks that are up to 16TiB in size; however, most disks today still use 512-byte sectors, and on such disks, MBR isn't really good beyond 2TiB (or 4TiB if you push things and are willing to accept some limitations). As a general rule, on larger disks, you should use the GUID Partition Table (GPT), which you can create and manipulate with GParted, parted, or gdisk. (The very latest versions of fdisk can also handle GPT, but AFAIK no version of Ubuntu yet ships with GPT-enabled versions of fdisk.) Note also that GPT doesn't distinguish between primary, extended, and logical partitions, so if you were to use GPT, the preceding bullet point would become irrelevant.

Overall, there's no compelling reason to change what you've got; but I wanted you to be aware of these issues because the path you've taken is becoming obsolete.

2
  • Useful information. I was unaware of the GPT. I'm guessing gdisk is simply fdisk with the GPT functionaliy added?
    – dtmland
    Feb 25, 2014 at 19:10
  • Sort of gdisk is a written-from-scratch partitioning tool for GPT with a user interface modeled after that of fdisk. See the gdisk home page for more information.
    – Rod Smith
    Feb 26, 2014 at 0:20
2

Extended partition is 'special partition'. It only should contain logical partitions, there is no filesystem format for extended partition. So, to make filesystem, you should initially create logical disk then run

sudo mkfs.ext4 /dev/sdb5

Note that logical partitions start from 5.

What is Extended Partition

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .