Score:0

Issue while creating 2nd partition on NON-system drive: "not possible to create more than 1 primary partition"

pl flag

I have an empty drive disk for file storing it has no installed system image, I need to separate it on two partitions. I have Ubuntu 16 on another physical drive.

When I try via Gparted to

  1. Resize existent ext4
  2. Click 'New' on unallocated right part of gparted drive volume bar I am getting an error:

It is not possible to create more than 1 primary partition

If you want more partitions you should first create an extended partition. Such a partition can contain other partitions. Because an extended partition is also a primary partition it might be necessary to remove a primary partition first."

If there a another type of filesystem I need to reformat ext4 prior to creating 2nd partition? How it's called, what size does it have to be if I need two ext4 partitions afterwards?

Caution, questions: How to resize partitions? How to create partition on single partitioned disk are irrelevant, I've already proceeded through those receipts and getting an error DURING them.

Also Create partition from free space - cannot create more than 4 partitions is irrelevant, cause I have an empty drive which has no files, not the dual-boot case, not more than 4 partitions problem.

Update some comments answered:

I) > sudo apt-get install gparted

gparted is already the newest version (0.25.0-1)
libparted : 3.2

II) > lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 1,8T 0 disk nvme0n1 259:0 0 465,8G 0 disk ├─nvme0n1p1 259:1 0 128M 0 part ├─nvme0n1p2 259:2 0 512M 0 part /boot/efi ├─nvme0n1p3 259:3 0 449,5G 0 part / └─nvme0n1p4 259:4 0 15,7G 0 part [SWAP]

III) > sudo gdisk -l /dev/sda

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.
Disk /dev/sda: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 3A9249F3-291C-4F87-AE2C-72DF37A1302F
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3907029101 sectors (1.8 TiB)

IV) > df

Filesystem     1K-blocks      Used Available Use% Mounted on
udev             8010864         0   8010864   0% /dev
tmpfs            1609100     10072   1599028   1% /run
/dev/nvme0n1p3 463757104 255032720 185143816  58% /
tmpfs            8045484       936   8044548   1% /dev/shm
tmpfs               5120         4      5116   1% /run/lock
tmpfs            8045484         0   8045484   0% /sys/fs/cgroup
/dev/nvme0n1p2    523248      6260    516988   2% /boot/efi
tmpfs            1609100        48   1609052   1% /run/user/1000
guiverc avatar
cn flag
It might help if you clarify details; there is no Ubuntu 16, however [Ubuntu 16.04 LTS has reached the end of it's *standard* support life](https://fridge.ubuntu.com/2021/03/13/extended-security-maintenance-for-ubuntu-16-04-xenial-xerus-begins-april-30-2021/) thus is now off-topic here unless your question is specific to helping you move to a supported release of Ubuntu (https://askubuntu.com/help/on-topic). You haven't mentioned if you're asking about GPT or legacy partitioned disk (rules differ)
cc flag
Resizing the filesystem does nothing to the partition size. You then may (shrink) the partition without destroying files. After you shrink the partition, you then have room to add another partition.
MosQuan avatar
pl flag
Thanks you for clerifications, gdisk of this disk gives "GPT fdisk (gdisk) version 1.0.1". Should I add this info to the end of original post? Ubuntu 16 is used for compatibility reasons. It is used for example, the question don't looks like version-specific.
MosQuan avatar
pl flag
@ubfan1 I try to shrink ext4 the only partition that I have on this disk as 1st step. If I choose to create New partition on unallocated as 2nd step in gparted I am getting the error window described in the post. If I apply 1st step separately and apply it I just getting "...unallocated space within the partition. To grow the file system to fill the partition, select the partition and choose the menu item: Partition --> Check." and no option to create new partition.
PonJar avatar
in flag
It would be helpful to see the output of lsblk added to the question. Also have you been able to complete the first step to shrink the existing partition? What version of GParted are you using? Is the existing partition mounted? Have you tried using a recent GParted live to get the latest version? Best to add answers to the question so others will see them easily
MosQuan avatar
pl flag
@PonJar Yes, if I shrink as separate step it successful but further i can't create new due to massage "...unallocated space within the partition. To grow the file system to fill the partition, select the partition and choose the menu item: Partition --> Check.". lsblk output and versions are updated in original post due to formating. Disk is unmounted for shrinking in gparted if it was mounted.
cc flag
Please add to your original posting the whole outputs of the df and the gdisk -l /dev/sda commands
PonJar avatar
in flag
Your lsblk output is incomplete. It does not show us the partition(s) on sda. Your GParted version is very old, but consistent with an installation of 16.04 that has not been upgraded. GParted is at version 1.3.0 now. It might help to use a more recent live disk. If you have managed to shrink the original partition with GParted can you now create the new partition with fdisk on the command line?
MosQuan avatar
pl flag
@PonJar fdisk worked, can you write this suggestion to use fdisk as answer and i'll accept and rate it?
Score:1
in flag

If I make the assumption that you have a /dev/sda1 partition on your disk and that you have some unallocated space after it then the following should work using fdisk:

  1. Backup any data on the disk that you cannot afford to lose.
  2. Open a terminal and type sudo fdisk /dev/sda
  3. At the fdisk prompt type the letter p. This will show you what is currently on the disk you are working on and is just a check that it’s the right disk.
  4. At the fdisk prompt type the letter n followed by the letter p. This tells fdisk that you want a new primary partition.
  5. Accept the default for the partition number and the first sector. To use all of the remaining unallocated space accept the default for the last sector.
  6. At the fdisk prompt type the letter p. Again this is a check that the changes you are making are what you wanted.
  7. Finally at the fdisk prompt type the letter w to write the changes to the disk.

Exit fdisk and you should be done. Good luck!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.