Score:0

Attempting to create partition in parted gives Error: Can't have the end before the start!

cn flag

This is a server without a GUI and I need to create a partition with the command line.

Here is the output of fdisk to show the disk structure:

Disk /dev/sdd: 447.13 GiB, 480103981056 bytes, 937703088 sectors
Disk model: SAMSUNG MZ7LM480
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 6E79FEC6-5E0A-5D44-B6E6-EEA7E252FFA3

Device         Start       End   Sectors  Size Type
/dev/sdd7  201328640 243271679  41943040   20G Linux filesystem
/dev/sdd8  243271680 285214719  41943040   20G Linux filesystem
/dev/sdd10 327157760 369100799  41943040   20G Linux filesystem
/dev/sdd11 369100800 411043839  41943040   20G Linux filesystem
/dev/sdd12 411043840 935331839 524288000  250G Linux filesystem

I want to create partition exactly in the space between /dev/sdd8 and /dev/sdd10

I'm trying the following command:

parted /dev/sdd -- mkpart primary ext3 285214720s 41943040s

But I receive an error:

Error: Can't have the end before the start! (start sector=285214720 length=-243271679)

Why am I getting an error? What is the mistake?

Score:2
in flag

That last number needs to be the final sector from the start of the device, not the number of sectors to use:

parted /dev/sdd -- mkpart primary ext3 285214720 327157759

As an aside, it may make sense to begin transitioning to ext4, as ext3 has long since been superseded

Alex16 avatar
cn flag
parted /dev/sdd -- mkpart primary ext4 285214720s 327157759s
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.