What's the use of providing number of partitions when partitioning a hard disk?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I'm trying to partition my hard disk to make it usable. I'm following the steps given in this link to partition my hard disk. I'm doing this by providing the number of partitions as 1 and choosing the default options for next two prompts when it asks me to enter the beginning and ending sector number. Now this makes the hard disk usable but the hard disk speed is terribly slow. I could see the significant difference in I/O time taken between my primary (which has five partitions in it as sda1, sda2... sda5) and secondary partition (which has only one partition sdb1) in it.
- Why do we need to partition the hard disk before using it? Why do we really do it?
- Will the number of partitions impact the I/O speed? From my understanding, the number of partitions is to having different disks in Windows like
C:
,D:
,E:
which helps the user to organize the content well. Please correct me if I'm wrong. - Last but not the least, how to improve the I/O speed with secondary partition? And what value should we input in the place of beginning and ending partition number?
linux ubuntu hard-drive partitioning io
add a comment |
I'm trying to partition my hard disk to make it usable. I'm following the steps given in this link to partition my hard disk. I'm doing this by providing the number of partitions as 1 and choosing the default options for next two prompts when it asks me to enter the beginning and ending sector number. Now this makes the hard disk usable but the hard disk speed is terribly slow. I could see the significant difference in I/O time taken between my primary (which has five partitions in it as sda1, sda2... sda5) and secondary partition (which has only one partition sdb1) in it.
- Why do we need to partition the hard disk before using it? Why do we really do it?
- Will the number of partitions impact the I/O speed? From my understanding, the number of partitions is to having different disks in Windows like
C:
,D:
,E:
which helps the user to organize the content well. Please correct me if I'm wrong. - Last but not the least, how to improve the I/O speed with secondary partition? And what value should we input in the place of beginning and ending partition number?
linux ubuntu hard-drive partitioning io
1
What exactly are your "primary (which has five partitions in it as sda1, sda2 .. sda5) and secondary partition (which has only one partition sdb1)"? It sounds & looks like they're different physical drives, I'm not at all surprised they would have different speeds.
– Xen2050
Mar 2 at 12:32
Yes they are different physical drives. One comes along with the machine by default. Another one is added my me which I meant as secondary hard disk.
– rm -rf star
Mar 2 at 12:36
add a comment |
I'm trying to partition my hard disk to make it usable. I'm following the steps given in this link to partition my hard disk. I'm doing this by providing the number of partitions as 1 and choosing the default options for next two prompts when it asks me to enter the beginning and ending sector number. Now this makes the hard disk usable but the hard disk speed is terribly slow. I could see the significant difference in I/O time taken between my primary (which has five partitions in it as sda1, sda2... sda5) and secondary partition (which has only one partition sdb1) in it.
- Why do we need to partition the hard disk before using it? Why do we really do it?
- Will the number of partitions impact the I/O speed? From my understanding, the number of partitions is to having different disks in Windows like
C:
,D:
,E:
which helps the user to organize the content well. Please correct me if I'm wrong. - Last but not the least, how to improve the I/O speed with secondary partition? And what value should we input in the place of beginning and ending partition number?
linux ubuntu hard-drive partitioning io
I'm trying to partition my hard disk to make it usable. I'm following the steps given in this link to partition my hard disk. I'm doing this by providing the number of partitions as 1 and choosing the default options for next two prompts when it asks me to enter the beginning and ending sector number. Now this makes the hard disk usable but the hard disk speed is terribly slow. I could see the significant difference in I/O time taken between my primary (which has five partitions in it as sda1, sda2... sda5) and secondary partition (which has only one partition sdb1) in it.
- Why do we need to partition the hard disk before using it? Why do we really do it?
- Will the number of partitions impact the I/O speed? From my understanding, the number of partitions is to having different disks in Windows like
C:
,D:
,E:
which helps the user to organize the content well. Please correct me if I'm wrong. - Last but not the least, how to improve the I/O speed with secondary partition? And what value should we input in the place of beginning and ending partition number?
linux ubuntu hard-drive partitioning io
linux ubuntu hard-drive partitioning io
edited Mar 3 at 1:33
JakeGould
32.7k10100142
32.7k10100142
asked Mar 2 at 9:36
rm -rf starrm -rf star
1084
1084
1
What exactly are your "primary (which has five partitions in it as sda1, sda2 .. sda5) and secondary partition (which has only one partition sdb1)"? It sounds & looks like they're different physical drives, I'm not at all surprised they would have different speeds.
– Xen2050
Mar 2 at 12:32
Yes they are different physical drives. One comes along with the machine by default. Another one is added my me which I meant as secondary hard disk.
– rm -rf star
Mar 2 at 12:36
add a comment |
1
What exactly are your "primary (which has five partitions in it as sda1, sda2 .. sda5) and secondary partition (which has only one partition sdb1)"? It sounds & looks like they're different physical drives, I'm not at all surprised they would have different speeds.
– Xen2050
Mar 2 at 12:32
Yes they are different physical drives. One comes along with the machine by default. Another one is added my me which I meant as secondary hard disk.
– rm -rf star
Mar 2 at 12:36
1
1
What exactly are your "primary (which has five partitions in it as sda1, sda2 .. sda5) and secondary partition (which has only one partition sdb1)"? It sounds & looks like they're different physical drives, I'm not at all surprised they would have different speeds.
– Xen2050
Mar 2 at 12:32
What exactly are your "primary (which has five partitions in it as sda1, sda2 .. sda5) and secondary partition (which has only one partition sdb1)"? It sounds & looks like they're different physical drives, I'm not at all surprised they would have different speeds.
– Xen2050
Mar 2 at 12:32
Yes they are different physical drives. One comes along with the machine by default. Another one is added my me which I meant as secondary hard disk.
– rm -rf star
Mar 2 at 12:36
Yes they are different physical drives. One comes along with the machine by default. Another one is added my me which I meant as secondary hard disk.
– rm -rf star
Mar 2 at 12:36
add a comment |
2 Answers
2
active
oldest
votes
You don't provide a number of partitions when partitioning a hard disk. Some specific partitioning tool might ask that for their own purpose, but most don't and I don't know any one that does. In the link there's also absolutely no mention of the number of partitions, only the partition number which is... just the numbering for the partition you want to work with. There are 4 entries for the partitions in the MBR, that's the reason for the number 1-4 in the line Partition number (1-4):
.
Why do we need to partition the hard disk before using it? Why do we really do it?
Because a disk is just a surface with random magnetized data. HDD manufacturers do a low-level formatting first to divide that surface to fixed areas containing data blocks. When you buy the HDD home you'll have access to those blocks, which is basically like pages in a notebook. Now to write data you need a defined structure to store what you've written, otherwise you don't know which pages you wrote the physics lessons, or data sheet for this month...
So the partitions is like sections in the notebook, and each partition has its own metadata to record whether a specific block is blank or used for what data
Will the number of partitions impact the I/O speed?
No. Probably yes in the ancient times when you didn't have enough memory to store information about partitions in RAM, but that's pretty much nonsense nowadays. The position of a partition will, however. But only on rotational disks, not on solid storage devices (flash memory)
how to improve the I/O speed with secondary partition? And what value should we input in the place of beginning and ending partition number?
You generally can't do anything. If it's much slower, there was probably some issues with your partitioning process, like misalignment. Older partitioning software uses the CHS system (cluster - head - sector), so they align partitions to the begin of each track or head. Modern drives use LBA which result in a different alignment. Calculated the sector number manually might also result in a misalignment if you don't know the correct way to do that
- Techie Tuesday: Understanding partition alignment
- Speed Up Your SSD By Correctly Aligning Your Partitions
The Impact of Misalignment
So what you need to do is use a GUI tool instead of command line like that. Partitioning is a risky process if you don't know what to do. Even when I'm well-versed in CLI, I always use a GUI partitioner for a better visualized view while partitioning. You might want to do that if you need to do a mass automatic partitioning on multiple machines, which is not your case
Just open a 3rd party disk partitioning software like Gparted, MiniTool® Partition Wizard Home Edition or EaseUS® Partition Master, select resize partition and they'll automatically align it correctly
That link from 2006 is also very old and outdated, use a newer one. But you also shouldn't even need to partition before installing like that, unless you want to repartition the disk. For any OSes in the last decades you already have the option to partition the disk during installation. They can create the necessary partitions, align them properly and add more partitions if you want
- How to use manual partitioning during installation?
- Ubuntu 18.04 LTS Desktop Installation Guide with Screenshots
Edit:
sda
and sdb
are different drives, thus obviously there might big differences between them due to the properties in interface, cache, disk type... For example if the first drive is an SSD and the second one is HDD then there would be a huge difference in speed (400-4000 MB/s vs 100-200 MB/s), IOPS (~100000 IOPS vs 50-100 IOPS) and latency (10-100 μs vs 10-15 ms)
Besides, secondary partition (which has only one partition sdb1) in it
doesn't make sense, because a partition can't contain another partition (except extended partition which is a container for logical partitions)
add a comment |
1) Why do we need to partition the hard disk before using it? Why do we really do it?
Multiple partitions are used for various reasons:
Disk space reservation: partitions are fixed-size; if you accidentally fill up /home to the brim and it's a separate partition, it will not affect the '/' partition and the OS will still have space for itself.
Ability to use different filesystems: e.g. you can use traditional ext4 for '/' but something fancy for '/var' or '/home'.
Usually the firmware and/or the bootloader only understand a very limited set of filesystems – e.g. UEFI machines only understand FAT32, but you certainly don't want to make the entire disk FAT32, so you have a small FAT32 partition with just the EFI-related files in it. Same goes for BIOS systems; many bootloaders only understand simple things like ext2 and wouldn't be able to load the kernel from zfs or btrfs.
Ability to have multiple operating systems on a single disk.
Taking advantage of the disk's physical properties, as described in more detail later.
Why partition a disk when you only want to have one partition? Well, that's not technically required for the disk to work, but it's usually done for consistency. When you already have a partition table and everything, going from 1 partition to multiple (or back) is easy. But if the entire disk is unpartitioned and simply mkfs'd, trying to partition it later can be very troublesome.
On BIOS/MBR systems, having a partition table also generally has the side effect that there's some unused space between the table and the 1st partition. Historically, the GRUB bootloader installed itself into that space. It's not really neat, but... that's what GRUB expects to be able to do on MBR disks. (Fortunately it no longer does the same on GPT disks, taking a regular partition instead.)
I'm doing this by providing the number of partitions as 1
That's not the total partition count; that's the ordinal number of the partition you're creating. The total doesn't need to be specified upfront.
I could see the significant difference in I/O time taken between my primary (which has five partitions in it as sda1, sda2 .. sda5) and secondary partition (which has only one partition sdb1) in it.
Do you mean primary and secondary disks? sda
and sdb
represent disks, not partitions. (And partitions having their own partitions won't make much sense.)
Most of it is likely caused by the disks themselves being physically different. Check what models they are, etc.. For example, a 7200rpm disk will be faster than a 5400rpm disk of the same age, and a modern 5400rpm disk will still be faster than a 15-year-old 5400rpm disk due to increased data density, and a "healthy" disk will be faster than a disk with many reallocated bad sectors due to the latter needing to make many detours when reading data. I'd expect a SATA/AHCI-connected disk to work faster than an IDE-connected disk as well.
But...
2) Will the number of partitions impact the I/O speed?
The number of partitions, by itself, will not. Neither will the partition type ("primary" vs "secondary" is just a hack to get around limitations in the old MBR partitioning format, it doesn't affect the working of a partition itself).
But as you've noticed, areas closer to the "beginning" of the disk work faster than areas near the "end" of the disk, because they tend to physically correspond to the outer and inner areas of the actual spinning disk.
So when you have one large partition across the entire disk, the OS will distribute files more or less evenly throughout the physical disk area; some of them will be in the 'fast' end, some in the 'slow' end. But when you have several small partitions, the 1st partition (first by starting sector, not by list position) will get all the benefits.
(disclaimer: this is probably total nonsense)
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1410702%2fwhats-the-use-of-providing-number-of-partitions-when-partitioning-a-hard-disk%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You don't provide a number of partitions when partitioning a hard disk. Some specific partitioning tool might ask that for their own purpose, but most don't and I don't know any one that does. In the link there's also absolutely no mention of the number of partitions, only the partition number which is... just the numbering for the partition you want to work with. There are 4 entries for the partitions in the MBR, that's the reason for the number 1-4 in the line Partition number (1-4):
.
Why do we need to partition the hard disk before using it? Why do we really do it?
Because a disk is just a surface with random magnetized data. HDD manufacturers do a low-level formatting first to divide that surface to fixed areas containing data blocks. When you buy the HDD home you'll have access to those blocks, which is basically like pages in a notebook. Now to write data you need a defined structure to store what you've written, otherwise you don't know which pages you wrote the physics lessons, or data sheet for this month...
So the partitions is like sections in the notebook, and each partition has its own metadata to record whether a specific block is blank or used for what data
Will the number of partitions impact the I/O speed?
No. Probably yes in the ancient times when you didn't have enough memory to store information about partitions in RAM, but that's pretty much nonsense nowadays. The position of a partition will, however. But only on rotational disks, not on solid storage devices (flash memory)
how to improve the I/O speed with secondary partition? And what value should we input in the place of beginning and ending partition number?
You generally can't do anything. If it's much slower, there was probably some issues with your partitioning process, like misalignment. Older partitioning software uses the CHS system (cluster - head - sector), so they align partitions to the begin of each track or head. Modern drives use LBA which result in a different alignment. Calculated the sector number manually might also result in a misalignment if you don't know the correct way to do that
- Techie Tuesday: Understanding partition alignment
- Speed Up Your SSD By Correctly Aligning Your Partitions
The Impact of Misalignment
So what you need to do is use a GUI tool instead of command line like that. Partitioning is a risky process if you don't know what to do. Even when I'm well-versed in CLI, I always use a GUI partitioner for a better visualized view while partitioning. You might want to do that if you need to do a mass automatic partitioning on multiple machines, which is not your case
Just open a 3rd party disk partitioning software like Gparted, MiniTool® Partition Wizard Home Edition or EaseUS® Partition Master, select resize partition and they'll automatically align it correctly
That link from 2006 is also very old and outdated, use a newer one. But you also shouldn't even need to partition before installing like that, unless you want to repartition the disk. For any OSes in the last decades you already have the option to partition the disk during installation. They can create the necessary partitions, align them properly and add more partitions if you want
- How to use manual partitioning during installation?
- Ubuntu 18.04 LTS Desktop Installation Guide with Screenshots
Edit:
sda
and sdb
are different drives, thus obviously there might big differences between them due to the properties in interface, cache, disk type... For example if the first drive is an SSD and the second one is HDD then there would be a huge difference in speed (400-4000 MB/s vs 100-200 MB/s), IOPS (~100000 IOPS vs 50-100 IOPS) and latency (10-100 μs vs 10-15 ms)
Besides, secondary partition (which has only one partition sdb1) in it
doesn't make sense, because a partition can't contain another partition (except extended partition which is a container for logical partitions)
add a comment |
You don't provide a number of partitions when partitioning a hard disk. Some specific partitioning tool might ask that for their own purpose, but most don't and I don't know any one that does. In the link there's also absolutely no mention of the number of partitions, only the partition number which is... just the numbering for the partition you want to work with. There are 4 entries for the partitions in the MBR, that's the reason for the number 1-4 in the line Partition number (1-4):
.
Why do we need to partition the hard disk before using it? Why do we really do it?
Because a disk is just a surface with random magnetized data. HDD manufacturers do a low-level formatting first to divide that surface to fixed areas containing data blocks. When you buy the HDD home you'll have access to those blocks, which is basically like pages in a notebook. Now to write data you need a defined structure to store what you've written, otherwise you don't know which pages you wrote the physics lessons, or data sheet for this month...
So the partitions is like sections in the notebook, and each partition has its own metadata to record whether a specific block is blank or used for what data
Will the number of partitions impact the I/O speed?
No. Probably yes in the ancient times when you didn't have enough memory to store information about partitions in RAM, but that's pretty much nonsense nowadays. The position of a partition will, however. But only on rotational disks, not on solid storage devices (flash memory)
how to improve the I/O speed with secondary partition? And what value should we input in the place of beginning and ending partition number?
You generally can't do anything. If it's much slower, there was probably some issues with your partitioning process, like misalignment. Older partitioning software uses the CHS system (cluster - head - sector), so they align partitions to the begin of each track or head. Modern drives use LBA which result in a different alignment. Calculated the sector number manually might also result in a misalignment if you don't know the correct way to do that
- Techie Tuesday: Understanding partition alignment
- Speed Up Your SSD By Correctly Aligning Your Partitions
The Impact of Misalignment
So what you need to do is use a GUI tool instead of command line like that. Partitioning is a risky process if you don't know what to do. Even when I'm well-versed in CLI, I always use a GUI partitioner for a better visualized view while partitioning. You might want to do that if you need to do a mass automatic partitioning on multiple machines, which is not your case
Just open a 3rd party disk partitioning software like Gparted, MiniTool® Partition Wizard Home Edition or EaseUS® Partition Master, select resize partition and they'll automatically align it correctly
That link from 2006 is also very old and outdated, use a newer one. But you also shouldn't even need to partition before installing like that, unless you want to repartition the disk. For any OSes in the last decades you already have the option to partition the disk during installation. They can create the necessary partitions, align them properly and add more partitions if you want
- How to use manual partitioning during installation?
- Ubuntu 18.04 LTS Desktop Installation Guide with Screenshots
Edit:
sda
and sdb
are different drives, thus obviously there might big differences between them due to the properties in interface, cache, disk type... For example if the first drive is an SSD and the second one is HDD then there would be a huge difference in speed (400-4000 MB/s vs 100-200 MB/s), IOPS (~100000 IOPS vs 50-100 IOPS) and latency (10-100 μs vs 10-15 ms)
Besides, secondary partition (which has only one partition sdb1) in it
doesn't make sense, because a partition can't contain another partition (except extended partition which is a container for logical partitions)
add a comment |
You don't provide a number of partitions when partitioning a hard disk. Some specific partitioning tool might ask that for their own purpose, but most don't and I don't know any one that does. In the link there's also absolutely no mention of the number of partitions, only the partition number which is... just the numbering for the partition you want to work with. There are 4 entries for the partitions in the MBR, that's the reason for the number 1-4 in the line Partition number (1-4):
.
Why do we need to partition the hard disk before using it? Why do we really do it?
Because a disk is just a surface with random magnetized data. HDD manufacturers do a low-level formatting first to divide that surface to fixed areas containing data blocks. When you buy the HDD home you'll have access to those blocks, which is basically like pages in a notebook. Now to write data you need a defined structure to store what you've written, otherwise you don't know which pages you wrote the physics lessons, or data sheet for this month...
So the partitions is like sections in the notebook, and each partition has its own metadata to record whether a specific block is blank or used for what data
Will the number of partitions impact the I/O speed?
No. Probably yes in the ancient times when you didn't have enough memory to store information about partitions in RAM, but that's pretty much nonsense nowadays. The position of a partition will, however. But only on rotational disks, not on solid storage devices (flash memory)
how to improve the I/O speed with secondary partition? And what value should we input in the place of beginning and ending partition number?
You generally can't do anything. If it's much slower, there was probably some issues with your partitioning process, like misalignment. Older partitioning software uses the CHS system (cluster - head - sector), so they align partitions to the begin of each track or head. Modern drives use LBA which result in a different alignment. Calculated the sector number manually might also result in a misalignment if you don't know the correct way to do that
- Techie Tuesday: Understanding partition alignment
- Speed Up Your SSD By Correctly Aligning Your Partitions
The Impact of Misalignment
So what you need to do is use a GUI tool instead of command line like that. Partitioning is a risky process if you don't know what to do. Even when I'm well-versed in CLI, I always use a GUI partitioner for a better visualized view while partitioning. You might want to do that if you need to do a mass automatic partitioning on multiple machines, which is not your case
Just open a 3rd party disk partitioning software like Gparted, MiniTool® Partition Wizard Home Edition or EaseUS® Partition Master, select resize partition and they'll automatically align it correctly
That link from 2006 is also very old and outdated, use a newer one. But you also shouldn't even need to partition before installing like that, unless you want to repartition the disk. For any OSes in the last decades you already have the option to partition the disk during installation. They can create the necessary partitions, align them properly and add more partitions if you want
- How to use manual partitioning during installation?
- Ubuntu 18.04 LTS Desktop Installation Guide with Screenshots
Edit:
sda
and sdb
are different drives, thus obviously there might big differences between them due to the properties in interface, cache, disk type... For example if the first drive is an SSD and the second one is HDD then there would be a huge difference in speed (400-4000 MB/s vs 100-200 MB/s), IOPS (~100000 IOPS vs 50-100 IOPS) and latency (10-100 μs vs 10-15 ms)
Besides, secondary partition (which has only one partition sdb1) in it
doesn't make sense, because a partition can't contain another partition (except extended partition which is a container for logical partitions)
You don't provide a number of partitions when partitioning a hard disk. Some specific partitioning tool might ask that for their own purpose, but most don't and I don't know any one that does. In the link there's also absolutely no mention of the number of partitions, only the partition number which is... just the numbering for the partition you want to work with. There are 4 entries for the partitions in the MBR, that's the reason for the number 1-4 in the line Partition number (1-4):
.
Why do we need to partition the hard disk before using it? Why do we really do it?
Because a disk is just a surface with random magnetized data. HDD manufacturers do a low-level formatting first to divide that surface to fixed areas containing data blocks. When you buy the HDD home you'll have access to those blocks, which is basically like pages in a notebook. Now to write data you need a defined structure to store what you've written, otherwise you don't know which pages you wrote the physics lessons, or data sheet for this month...
So the partitions is like sections in the notebook, and each partition has its own metadata to record whether a specific block is blank or used for what data
Will the number of partitions impact the I/O speed?
No. Probably yes in the ancient times when you didn't have enough memory to store information about partitions in RAM, but that's pretty much nonsense nowadays. The position of a partition will, however. But only on rotational disks, not on solid storage devices (flash memory)
how to improve the I/O speed with secondary partition? And what value should we input in the place of beginning and ending partition number?
You generally can't do anything. If it's much slower, there was probably some issues with your partitioning process, like misalignment. Older partitioning software uses the CHS system (cluster - head - sector), so they align partitions to the begin of each track or head. Modern drives use LBA which result in a different alignment. Calculated the sector number manually might also result in a misalignment if you don't know the correct way to do that
- Techie Tuesday: Understanding partition alignment
- Speed Up Your SSD By Correctly Aligning Your Partitions
The Impact of Misalignment
So what you need to do is use a GUI tool instead of command line like that. Partitioning is a risky process if you don't know what to do. Even when I'm well-versed in CLI, I always use a GUI partitioner for a better visualized view while partitioning. You might want to do that if you need to do a mass automatic partitioning on multiple machines, which is not your case
Just open a 3rd party disk partitioning software like Gparted, MiniTool® Partition Wizard Home Edition or EaseUS® Partition Master, select resize partition and they'll automatically align it correctly
That link from 2006 is also very old and outdated, use a newer one. But you also shouldn't even need to partition before installing like that, unless you want to repartition the disk. For any OSes in the last decades you already have the option to partition the disk during installation. They can create the necessary partitions, align them properly and add more partitions if you want
- How to use manual partitioning during installation?
- Ubuntu 18.04 LTS Desktop Installation Guide with Screenshots
Edit:
sda
and sdb
are different drives, thus obviously there might big differences between them due to the properties in interface, cache, disk type... For example if the first drive is an SSD and the second one is HDD then there would be a huge difference in speed (400-4000 MB/s vs 100-200 MB/s), IOPS (~100000 IOPS vs 50-100 IOPS) and latency (10-100 μs vs 10-15 ms)
Besides, secondary partition (which has only one partition sdb1) in it
doesn't make sense, because a partition can't contain another partition (except extended partition which is a container for logical partitions)
edited Mar 3 at 1:11
answered Mar 2 at 10:27
phuclvphuclv
10.6k64297
10.6k64297
add a comment |
add a comment |
1) Why do we need to partition the hard disk before using it? Why do we really do it?
Multiple partitions are used for various reasons:
Disk space reservation: partitions are fixed-size; if you accidentally fill up /home to the brim and it's a separate partition, it will not affect the '/' partition and the OS will still have space for itself.
Ability to use different filesystems: e.g. you can use traditional ext4 for '/' but something fancy for '/var' or '/home'.
Usually the firmware and/or the bootloader only understand a very limited set of filesystems – e.g. UEFI machines only understand FAT32, but you certainly don't want to make the entire disk FAT32, so you have a small FAT32 partition with just the EFI-related files in it. Same goes for BIOS systems; many bootloaders only understand simple things like ext2 and wouldn't be able to load the kernel from zfs or btrfs.
Ability to have multiple operating systems on a single disk.
Taking advantage of the disk's physical properties, as described in more detail later.
Why partition a disk when you only want to have one partition? Well, that's not technically required for the disk to work, but it's usually done for consistency. When you already have a partition table and everything, going from 1 partition to multiple (or back) is easy. But if the entire disk is unpartitioned and simply mkfs'd, trying to partition it later can be very troublesome.
On BIOS/MBR systems, having a partition table also generally has the side effect that there's some unused space between the table and the 1st partition. Historically, the GRUB bootloader installed itself into that space. It's not really neat, but... that's what GRUB expects to be able to do on MBR disks. (Fortunately it no longer does the same on GPT disks, taking a regular partition instead.)
I'm doing this by providing the number of partitions as 1
That's not the total partition count; that's the ordinal number of the partition you're creating. The total doesn't need to be specified upfront.
I could see the significant difference in I/O time taken between my primary (which has five partitions in it as sda1, sda2 .. sda5) and secondary partition (which has only one partition sdb1) in it.
Do you mean primary and secondary disks? sda
and sdb
represent disks, not partitions. (And partitions having their own partitions won't make much sense.)
Most of it is likely caused by the disks themselves being physically different. Check what models they are, etc.. For example, a 7200rpm disk will be faster than a 5400rpm disk of the same age, and a modern 5400rpm disk will still be faster than a 15-year-old 5400rpm disk due to increased data density, and a "healthy" disk will be faster than a disk with many reallocated bad sectors due to the latter needing to make many detours when reading data. I'd expect a SATA/AHCI-connected disk to work faster than an IDE-connected disk as well.
But...
2) Will the number of partitions impact the I/O speed?
The number of partitions, by itself, will not. Neither will the partition type ("primary" vs "secondary" is just a hack to get around limitations in the old MBR partitioning format, it doesn't affect the working of a partition itself).
But as you've noticed, areas closer to the "beginning" of the disk work faster than areas near the "end" of the disk, because they tend to physically correspond to the outer and inner areas of the actual spinning disk.
So when you have one large partition across the entire disk, the OS will distribute files more or less evenly throughout the physical disk area; some of them will be in the 'fast' end, some in the 'slow' end. But when you have several small partitions, the 1st partition (first by starting sector, not by list position) will get all the benefits.
(disclaimer: this is probably total nonsense)
add a comment |
1) Why do we need to partition the hard disk before using it? Why do we really do it?
Multiple partitions are used for various reasons:
Disk space reservation: partitions are fixed-size; if you accidentally fill up /home to the brim and it's a separate partition, it will not affect the '/' partition and the OS will still have space for itself.
Ability to use different filesystems: e.g. you can use traditional ext4 for '/' but something fancy for '/var' or '/home'.
Usually the firmware and/or the bootloader only understand a very limited set of filesystems – e.g. UEFI machines only understand FAT32, but you certainly don't want to make the entire disk FAT32, so you have a small FAT32 partition with just the EFI-related files in it. Same goes for BIOS systems; many bootloaders only understand simple things like ext2 and wouldn't be able to load the kernel from zfs or btrfs.
Ability to have multiple operating systems on a single disk.
Taking advantage of the disk's physical properties, as described in more detail later.
Why partition a disk when you only want to have one partition? Well, that's not technically required for the disk to work, but it's usually done for consistency. When you already have a partition table and everything, going from 1 partition to multiple (or back) is easy. But if the entire disk is unpartitioned and simply mkfs'd, trying to partition it later can be very troublesome.
On BIOS/MBR systems, having a partition table also generally has the side effect that there's some unused space between the table and the 1st partition. Historically, the GRUB bootloader installed itself into that space. It's not really neat, but... that's what GRUB expects to be able to do on MBR disks. (Fortunately it no longer does the same on GPT disks, taking a regular partition instead.)
I'm doing this by providing the number of partitions as 1
That's not the total partition count; that's the ordinal number of the partition you're creating. The total doesn't need to be specified upfront.
I could see the significant difference in I/O time taken between my primary (which has five partitions in it as sda1, sda2 .. sda5) and secondary partition (which has only one partition sdb1) in it.
Do you mean primary and secondary disks? sda
and sdb
represent disks, not partitions. (And partitions having their own partitions won't make much sense.)
Most of it is likely caused by the disks themselves being physically different. Check what models they are, etc.. For example, a 7200rpm disk will be faster than a 5400rpm disk of the same age, and a modern 5400rpm disk will still be faster than a 15-year-old 5400rpm disk due to increased data density, and a "healthy" disk will be faster than a disk with many reallocated bad sectors due to the latter needing to make many detours when reading data. I'd expect a SATA/AHCI-connected disk to work faster than an IDE-connected disk as well.
But...
2) Will the number of partitions impact the I/O speed?
The number of partitions, by itself, will not. Neither will the partition type ("primary" vs "secondary" is just a hack to get around limitations in the old MBR partitioning format, it doesn't affect the working of a partition itself).
But as you've noticed, areas closer to the "beginning" of the disk work faster than areas near the "end" of the disk, because they tend to physically correspond to the outer and inner areas of the actual spinning disk.
So when you have one large partition across the entire disk, the OS will distribute files more or less evenly throughout the physical disk area; some of them will be in the 'fast' end, some in the 'slow' end. But when you have several small partitions, the 1st partition (first by starting sector, not by list position) will get all the benefits.
(disclaimer: this is probably total nonsense)
add a comment |
1) Why do we need to partition the hard disk before using it? Why do we really do it?
Multiple partitions are used for various reasons:
Disk space reservation: partitions are fixed-size; if you accidentally fill up /home to the brim and it's a separate partition, it will not affect the '/' partition and the OS will still have space for itself.
Ability to use different filesystems: e.g. you can use traditional ext4 for '/' but something fancy for '/var' or '/home'.
Usually the firmware and/or the bootloader only understand a very limited set of filesystems – e.g. UEFI machines only understand FAT32, but you certainly don't want to make the entire disk FAT32, so you have a small FAT32 partition with just the EFI-related files in it. Same goes for BIOS systems; many bootloaders only understand simple things like ext2 and wouldn't be able to load the kernel from zfs or btrfs.
Ability to have multiple operating systems on a single disk.
Taking advantage of the disk's physical properties, as described in more detail later.
Why partition a disk when you only want to have one partition? Well, that's not technically required for the disk to work, but it's usually done for consistency. When you already have a partition table and everything, going from 1 partition to multiple (or back) is easy. But if the entire disk is unpartitioned and simply mkfs'd, trying to partition it later can be very troublesome.
On BIOS/MBR systems, having a partition table also generally has the side effect that there's some unused space between the table and the 1st partition. Historically, the GRUB bootloader installed itself into that space. It's not really neat, but... that's what GRUB expects to be able to do on MBR disks. (Fortunately it no longer does the same on GPT disks, taking a regular partition instead.)
I'm doing this by providing the number of partitions as 1
That's not the total partition count; that's the ordinal number of the partition you're creating. The total doesn't need to be specified upfront.
I could see the significant difference in I/O time taken between my primary (which has five partitions in it as sda1, sda2 .. sda5) and secondary partition (which has only one partition sdb1) in it.
Do you mean primary and secondary disks? sda
and sdb
represent disks, not partitions. (And partitions having their own partitions won't make much sense.)
Most of it is likely caused by the disks themselves being physically different. Check what models they are, etc.. For example, a 7200rpm disk will be faster than a 5400rpm disk of the same age, and a modern 5400rpm disk will still be faster than a 15-year-old 5400rpm disk due to increased data density, and a "healthy" disk will be faster than a disk with many reallocated bad sectors due to the latter needing to make many detours when reading data. I'd expect a SATA/AHCI-connected disk to work faster than an IDE-connected disk as well.
But...
2) Will the number of partitions impact the I/O speed?
The number of partitions, by itself, will not. Neither will the partition type ("primary" vs "secondary" is just a hack to get around limitations in the old MBR partitioning format, it doesn't affect the working of a partition itself).
But as you've noticed, areas closer to the "beginning" of the disk work faster than areas near the "end" of the disk, because they tend to physically correspond to the outer and inner areas of the actual spinning disk.
So when you have one large partition across the entire disk, the OS will distribute files more or less evenly throughout the physical disk area; some of them will be in the 'fast' end, some in the 'slow' end. But when you have several small partitions, the 1st partition (first by starting sector, not by list position) will get all the benefits.
(disclaimer: this is probably total nonsense)
1) Why do we need to partition the hard disk before using it? Why do we really do it?
Multiple partitions are used for various reasons:
Disk space reservation: partitions are fixed-size; if you accidentally fill up /home to the brim and it's a separate partition, it will not affect the '/' partition and the OS will still have space for itself.
Ability to use different filesystems: e.g. you can use traditional ext4 for '/' but something fancy for '/var' or '/home'.
Usually the firmware and/or the bootloader only understand a very limited set of filesystems – e.g. UEFI machines only understand FAT32, but you certainly don't want to make the entire disk FAT32, so you have a small FAT32 partition with just the EFI-related files in it. Same goes for BIOS systems; many bootloaders only understand simple things like ext2 and wouldn't be able to load the kernel from zfs or btrfs.
Ability to have multiple operating systems on a single disk.
Taking advantage of the disk's physical properties, as described in more detail later.
Why partition a disk when you only want to have one partition? Well, that's not technically required for the disk to work, but it's usually done for consistency. When you already have a partition table and everything, going from 1 partition to multiple (or back) is easy. But if the entire disk is unpartitioned and simply mkfs'd, trying to partition it later can be very troublesome.
On BIOS/MBR systems, having a partition table also generally has the side effect that there's some unused space between the table and the 1st partition. Historically, the GRUB bootloader installed itself into that space. It's not really neat, but... that's what GRUB expects to be able to do on MBR disks. (Fortunately it no longer does the same on GPT disks, taking a regular partition instead.)
I'm doing this by providing the number of partitions as 1
That's not the total partition count; that's the ordinal number of the partition you're creating. The total doesn't need to be specified upfront.
I could see the significant difference in I/O time taken between my primary (which has five partitions in it as sda1, sda2 .. sda5) and secondary partition (which has only one partition sdb1) in it.
Do you mean primary and secondary disks? sda
and sdb
represent disks, not partitions. (And partitions having their own partitions won't make much sense.)
Most of it is likely caused by the disks themselves being physically different. Check what models they are, etc.. For example, a 7200rpm disk will be faster than a 5400rpm disk of the same age, and a modern 5400rpm disk will still be faster than a 15-year-old 5400rpm disk due to increased data density, and a "healthy" disk will be faster than a disk with many reallocated bad sectors due to the latter needing to make many detours when reading data. I'd expect a SATA/AHCI-connected disk to work faster than an IDE-connected disk as well.
But...
2) Will the number of partitions impact the I/O speed?
The number of partitions, by itself, will not. Neither will the partition type ("primary" vs "secondary" is just a hack to get around limitations in the old MBR partitioning format, it doesn't affect the working of a partition itself).
But as you've noticed, areas closer to the "beginning" of the disk work faster than areas near the "end" of the disk, because they tend to physically correspond to the outer and inner areas of the actual spinning disk.
So when you have one large partition across the entire disk, the OS will distribute files more or less evenly throughout the physical disk area; some of them will be in the 'fast' end, some in the 'slow' end. But when you have several small partitions, the 1st partition (first by starting sector, not by list position) will get all the benefits.
(disclaimer: this is probably total nonsense)
answered Mar 2 at 10:04
grawitygrawity
243k37512570
243k37512570
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1410702%2fwhats-the-use-of-providing-number-of-partitions-when-partitioning-a-hard-disk%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
What exactly are your "primary (which has five partitions in it as sda1, sda2 .. sda5) and secondary partition (which has only one partition sdb1)"? It sounds & looks like they're different physical drives, I'm not at all surprised they would have different speeds.
– Xen2050
Mar 2 at 12:32
Yes they are different physical drives. One comes along with the machine by default. Another one is added my me which I meant as secondary hard disk.
– rm -rf star
Mar 2 at 12:36