LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 07: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, 07:22 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,541

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
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, 07:28 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

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

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
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, 07: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, 07: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, 08:12 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
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, 08: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, 09:29 AM   #9
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
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, 05:52 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

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


Reply



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 11:32 AM
[SOLVED] Partitioning advice for a 500GB HD - Ubuntu 11.04 64-bit Stefaans Linux - Newbie 4 06-16-2011 07:57 AM
Partitioning help/advice drlinux Linux - General 12 08-25-2006 06:06 AM
partitioning confusion new2server Linux - General 3 03-28-2004 07:36 PM
A small partitioning confusion concoran Linux - General 4 01-07-2002 01:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:25 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
Open Source Consulting | Domain Registration