LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-07-2015, 08:07 AM   #1
wtdedula
LQ Newbie
 
Registered: Feb 2015
Posts: 14

Rep: Reputation: Disabled
Ubuntu 4 tb partitioning confusion - need advice


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.

Thanks.

Tim
 
Old 03-07-2015, 08:22 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
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.
 
Old 03-07-2015, 08:28 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,838

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
If parted says it's aligned, believe it. In future use "-a optimal" when starting parted.
 
Old 03-07-2015, 08:34 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,838

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Quote:
Originally Posted by wtdedula View Post
Also, is there a Ubuntu utility to display the sector size of a disk?
Forgot to answer this - parted will list this data. Issue "p" in interactive mode, or
Code:
parted /dev/sda "print all"
 
Old 03-07-2015, 08:43 AM   #5
wtdedula
LQ Newbie
 
Registered: Feb 2015
Posts: 14

Original Poster
Rep: Reputation: Disabled
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

Tim
 
Old 03-07-2015, 08:59 AM   #6
wtdedula
LQ Newbie
 
Registered: Feb 2015
Posts: 14

Original Poster
Rep: Reputation: Disabled
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 ?

Tim
 
Old 03-07-2015, 09:12 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,838

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Quick search found this - seems pretty good.

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 ...
 
Old 03-07-2015, 09:22 AM   #8
wtdedula
LQ Newbie
 
Registered: Feb 2015
Posts: 14

Original Poster
Rep: Reputation: Disabled
Great link, syg00 and thanks for all of your great advice today and in the past.

Tim
 
Old 03-07-2015, 10:29 AM   #9
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 939

Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by syg00 View Post
Quick search found this - seems pretty good.

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.
 
Old 03-07-2015, 06:52 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,838

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
I meant at the (very) begining, and potentially the very end of the disk - outside of allocated space.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Dual boot install partitioning confusion potmo Linux From Scratch 2 11-17-2013 12:32 PM
[SOLVED] Partitioning advice for a 500GB HD - Ubuntu 11.04 64-bit Stefaans Linux - Newbie 4 06-16-2011 08:57 AM
Partitioning help/advice drlinux Linux - General 12 08-25-2006 07:06 AM
partitioning confusion new2server Linux - General 3 03-28-2004 08:36 PM
A small partitioning confusion concoran Linux - General 4 01-07-2002 02:59 PM


All times are GMT -5. The time now is 12:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration