LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-17-2016, 10:56 AM   #1
gtaylor828
LQ Newbie
 
Registered: Jan 2015
Posts: 23

Rep: Reputation: Disabled
How to format a disk such that it's System is HPFS/NTFS/exFAT rather than GPT


Platform: A product that runs Ubuntu and streams to/from external drives.
When an external drive is connected, it's mounted and tested for throughput. A benchmark value is listed for each drive. Both ext4 and NTFS formats are supported. The GUI provides the option to format either ext4 or NTFS (so I don't know how it's done). Drives formatted NTFS on the system have very low benchmark (400 kB/s).
Issue: I have an NTFS drive that gets a benchmark of 1600 MB/s but I don't know how it was formatted. I'm looking for differences.

fdisk -l lists the drive's "System" as GPT on slow drives and as HPFS/NTFS/exFAT on the "good" drive.

Q1: Is System type the performance issue?
Q2: If yes, how do I format a drive with the right System?
If not, what else might be the problem?
 
Old 08-17-2016, 12:43 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,231

Rep: Reputation: Disabled
GPT is partition type, NTFS, Ext4 and so on are filesystems. What kind of benchmark are you using, 1600 MB/s is unreal.
 
Old 08-17-2016, 01:02 PM   #3
gtaylor828
LQ Newbie
 
Registered: Jan 2015
Posts: 23

Original Poster
Rep: Reputation: Disabled
Oops. That should be 160 MB/s. (Shouldn't have used a slide rule to calculate it ;-)
The benchmark tool is internal to the system; I don't know what it is or (much about) how it works.
I just know the it rates this "golden" drive much higher than identical drives (SSDs) that were formatted by the system.
 
Old 08-17-2016, 01:09 PM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,231

Rep: Reputation: Disabled
What kind of hardware is used to connect external drives?
 
Old 08-17-2016, 01:17 PM   #5
gtaylor828
LQ Newbie
 
Registered: Jan 2015
Posts: 23

Original Poster
Rep: Reputation: Disabled
The numbers I quoted were for a USB3 interface. On the eSATA interface the "slow" disks are still 100 kB/s, the golden unit is over 300 MB/s
 
Old 08-17-2016, 01:24 PM   #6
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,231

Rep: Reputation: Disabled
Is this benchmark doing write or read tests? SSD drives may need "trimmed" to restore the write speed, also if the drive is partitioned it is possible the partition is misaligned. Won't happen with Ext4 if you do not partition the drive.
 
Old 08-17-2016, 02:12 PM   #7
gtaylor828
LQ Newbie
 
Registered: Jan 2015
Posts: 23

Original Poster
Rep: Reputation: Disabled
The benchmark does both read and write tests (and bypasses the cache, I'm told). There is only one partition on the drives.
The question remains, why is the benchmark rating so different on two identical SSDs formatted NTFS?

Thanks for your suggestions.
 
Old 08-17-2016, 02:47 PM   #8
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 3,544
Blog Entries: 1

Rep: Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186
It seems to me there is some kind of mis-identification going on. Linux operating systems' access to NTFS is always inferior to native filesystems, and compared to Windows access to NTFS, and by multiple orders of magnitude. IOW, Linux access to NTFS is downright slow regardless of bus type. There's simply less difference to notice on slower buses because the bus is the ultimate bottleneck rather than the media. Is that faster "NTFS" SDD really NTFS?
 
Old 08-17-2016, 02:52 PM   #9
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 3,544
Blog Entries: 1

Rep: Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186
Quote:
Originally Posted by gtaylor828 View Post
fdisk -l lists the drive's "System" as GPT on slow drives and as HPFS/NTFS/exFAT on the "good" drive.
When GPT disks are involved, gdisk -l should be used rather than fdisk -l.
 
Old 08-17-2016, 03:14 PM   #10
gtaylor828
LQ Newbie
 
Registered: Jan 2015
Posts: 23

Original Poster
Rep: Reputation: Disabled
Yes. Connected to a Windows PC, its format is listed as NTFS
And remember that the benchmark is running on the Ubuntu system.

Here's what fdisk -l returns for the "good" drive:

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000f10cb

Device Boot Start End Blocks Id System
/dev/sdc1 2048 1953521663 976759808 7 HPFS/NTFS/exFAT


For an identical SSD formatted by the system, fdisk returns:

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdc1 1 1953525167 976762583+ ee GPT
 
Old 08-17-2016, 03:27 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,920

Rep: Reputation: 4305Reputation: 4305Reputation: 4305Reputation: 4305Reputation: 4305Reputation: 4305Reputation: 4305Reputation: 4305Reputation: 4305Reputation: 4305Reputation: 4305
So what is the make and model number of these drives?

ee GPT is the boot partition and as suggested we need to see the output of the

gdisk -l /dev/sdc
or
parted /dev/sdc print

The first drive is a legacy MBR formatted drive and the second is a GPT. In a nutshell GPT allows bootable drives larger then 2TB and almost an unlimited number of primary partitions.

What version of Ubuntu are you running? Does it support GPT? Now that was a stupid question...

Is this the first GPT drive you have tested?

Last edited by michaelk; 08-17-2016 at 04:04 PM.
 
Old 08-17-2016, 03:27 PM   #12
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 3,544
Blog Entries: 1

Rep: Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186
Data that might explain the difference is missing for the "bad" ee GPT device because you didn't show us gdisk -l. The "bad" might actually be using a less efficient (smaller than 4k) I/O blocksize, while the "good" has clearly been partitioned in alignment with its 4k physical sectors.
 
Old 08-17-2016, 03:43 PM   #13
gtaylor828
LQ Newbie
 
Registered: Jan 2015
Posts: 23

Original Poster
Rep: Reputation: Disabled
They are Crucial MX200 (1TB SSD)

parted print results: (both results with the SSD in the same docking station)

"slow"

Model: ATA Crucial_CT1024MX (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 1000GB 1000GB ntfs primary


"fast"

Model: ATA Crucial_CT1024MX (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 1000GB 1000GB primary ntfs


Thanks for your effort to help.
 
Old 08-17-2016, 06:32 PM   #14
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,231

Rep: Reputation: Disabled
Quote:
For an identical SSD formatted by the system, fdisk returns:

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
This 512 sector size is certainly bogus, the real sector size is 4096. Thus, the partition is misaligned.
 
Old 08-17-2016, 07:05 PM   #15
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 3,544
Blog Entries: 1

Rep: Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186Reputation: 1186
Quote:
Originally Posted by Emerson View Post
This 512 sector size is certainly bogus, the real sector size is 4096. Thus, the partition is misaligned.
While misalignment is a probable explanation for poor reported performance, I cannot believe fdisk output is reliable when an unknown version of it reports both ee as only partition and 512 physical block size on a 1T device. We need to know parted and/or gdisk output to be sure what the reality is.
 
  


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] How do I format a GPT disk using Linux command-line? [SOLVED] ajnabi Linux - Hardware 3 04-07-2015 07:33 PM
[SOLVED] Unable to Format brand new HPFS/NTFS drive JeffC1 Linux - Newbie 49 02-17-2011 08:01 PM
how can i format my hard disk in fedora9 as ntfs or fat system v4u_2k722k10 Linux - Newbie 4 11-26-2008 08:39 PM
Hpfs/ntfs Bobymc Linux - Software 2 04-22-2006 10:58 PM
how to moutn hpfs/ntfs farhan Linux - General 3 03-10-2003 08:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:34 AM.

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