Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi All;
Can someone give me some guidance on partitioning a 4TB drive into one partition ?
My goal is to align the partition for best performance. I searched the net for advice and I've found a lot of information on it but am still confused.
After setting the label to gpt,
I tried mkpart primary 0% 100%
and I get the warning that the partition isn't aligned
then I tried mkpart primary 1 -1 (which I really hoped would get me completed)
and when I do an align-check on partition 1, it reports 1 aligned
but then when I do an fdisk -l,
I get the warning that partition 1 does not start on a physical sector boundary
I read that sector size is usually 512 bytes but on some (or perhaps all) larger disks, the sector size is 4096.
I am really not knowledgable in this area and not sure if the above message about partition 1 not starting on a physical sector boundary is important or what impact this will have to my performance. Since these 4tb drives are being used in a media server, I'd like them to be as fast and efficient as possible.
Can you offer some guidance or perhaps some commands on how to partition my (full) 4tb drive into one partition so it is aligned and also so the partition table starts on a physical sector boundary ?
Also, is there a Ubuntu utility to display the sector size of a disk?
I have been researching this issue off and on for a few weeks and would like to finally get this partitioning completed this weekend so I can get on with setting up my system.
fdisk doesn't always output accurate information on GPT disks so you might try using GParted which should be on the Ubuntu installation medium or parted. I don't use GPT myself so can't give any more detail.
Hi syg00;
I actually did use -a optimal when starting parted ... I just left this out in an effort not to make my message too wordy :-).
Here are the commands I used ... that I finally found doing an extensive search ...
parted -a optimal /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
(parted) mkpart primary 1 -1
(parted) align-check
alignment type(min/opt) [optimal]/minimal? optimal
Partition number? 1
1 aligned
(parted) quit
sug00 (and others);
I tried the command to list the sector size and I get
sector size (logical/physical) 512B/4096b
Does this means that my partitioning is using 512b sectors but my disk actually uses 4096b? With one disk and one partition, shouldn't these be the same ? Should I be concerned with the discrepancy ?
Also, before setting the filesystem and before formatting, parted reports a file size of 4001gb - and yet my disk is 4tb - Does this seem correct ?
No, you don't need to be concerned. Was a (potential) problem when the advanced format disks first came out, but the utilities accommodate them now. Alignment may cause some (a couple of megabytes) wasted space - don't worry, be happy ...
No, you don't need to be concerned. Was a (potential) problem when the advanced format disks first came out, but the utilities accommodate them now. Alignment may cause some (a couple of megabytes) wasted space - don't worry, be happy ...
I disagree.
Your partitions should start and end on a multiple of 4KB - if not a disk write - even of 4KB - means reading two adjacent 4KB sectors and rewriting portions of the adjacent sectors.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.