LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-20-2024, 03:41 AM   #1
exerceo
Member
 
Registered: Oct 2022
Posts: 88

Rep: Reputation: 20
Question How to view the cluster size of an NTFS file system?


[Log in to get rid of this advertisement]
For other file systems, the "fsck" tool can be used with the -n (read-only) and -v (verbose) switches, to show the cluster size. For example:

Code:
fsck.exfat -n -v /dev/mmcblk0p1
However, given that NTFS is a proprietary Microsoft file system, support by operating systems outside Windows relies on reverse-engineering and has therefore been limited for a long time. File system checking is even more difficult to implement than normal reading and writing, so appears to be no "fsck.ntfs" so far.

Is there any tool which just shows the cluster size of NTFS?

(Yes, I know, "NTFS file system" is a redundant acronym, but I have to write it like this for clarity.)
 
Old 02-20-2024, 05:12 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,390

Rep: Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191Reputation: 4191
If you want control, don't use proprietary on FOSS.
You want to know details, go look on Windows
 
Old 02-20-2024, 05:51 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,316

Rep: Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985
looks like this is the current situation: https://wiki.archlinux.org/title/NTFS
 
Old 02-20-2024, 06:00 AM   #4
lvm_
Senior Member
 
Registered: Jul 2020
Posts: 1,547

Rep: Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531
ntfsinfo should do it https://linux.die.net/man/8/ntfsinfo
 
1 members found this post helpful.
Old 02-20-2024, 09:23 AM   #5
exerceo
Member
 
Registered: Oct 2022
Posts: 88

Original Poster
Rep: Reputation: 20
Exclamation NTFS on Linux

Quote:
Originally Posted by syg00 View Post
If you want control, don't use proprietary on FOSS.
You want to know details, go look on Windows
That's understandable for complicated stuff like file system repair (chkdsk, fsck), but something as simple as seeing the cluster size should be doable on Linux.

I am trying to use as little proprietary stuff as possible. Unfortunately, much of the world is stuck with Windows and MacOS. Android OS only recently implemented read-only NTFS support.

Thankfully, external HDD and SSD manufacturers have switched from NTFS to exFAT. Until the mid-2010s, external hard disks were commonly pre-formatted with NTFS. Why not FAT32? Because 4 GiB.

Now that Microsoft has open-sourced exFAT (thanks alot!), it has become the de-facto standard for file systems without a garbage 4 G file size limitation.

Quote:
Originally Posted by pan64 View Post
looks like this is the current situation: https://wiki.archlinux.org/title/NTFS
Interesting article (I was already aware of it), however, it has no mention of cluster sizes.

Quote:
Originally Posted by lvm_ View Post
Haven't tried it yet. I will check it out. Thanks, lvm_.

Last edited by exerceo; 02-20-2024 at 11:49 AM. Reason: wording
 
Old 02-21-2024, 06:44 PM   #6
kreemoweet
LQ Newbie
 
Registered: Jun 2017
Posts: 8

Rep: Reputation: Disabled
The cluster size of an NTFS filesystem is one of the filesystem parameters found in the VBR (Volume Boot Record), and is pretty well documented and discussed, such as
at http://kcall.co.uk/ntfs/index.html.
 
Old 02-22-2024, 01:37 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,316

Rep: Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985Reputation: 7985
Quote:
Originally Posted by exerceo View Post

Interesting article (I was already aware of it), however, it has no mention of cluster sizes.
But it contains a link to the official documentation where you can find related information (especially paragon have not yet developed any tools for that).
Anyway the other way is to use the ntfs-3g tools, like ntfsinfo (which was mentioned too). It is documented here: https://github.com/tuxera/ntfs-3g (but I think you know that)
 
Old 02-22-2024, 08:28 AM   #8
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,820

Rep: Reputation: 2239Reputation: 2239Reputation: 2239Reputation: 2239Reputation: 2239Reputation: 2239Reputation: 2239Reputation: 2239Reputation: 2239Reputation: 2239Reputation: 2239
The "file" command will report the sectors/cluster for an NTFS volume. Example (line breaks added):
Code:
# file -s /dev/sda2
/dev/sda2: DOS/MBR boot sector, code offset 0x52+2, OEM-ID "NTFS    ",
 sectors/cluster 8, Media descriptor 0xf8,
 sectors/track 63, heads 255, hidden sectors 206848,
 dos < 4.0 BootSector (0x80), FAT (1Y bit by descriptor);
 NTFS, sectors/track 63, sectors 143903295,
 $MFT start cluster 786432, $MFTMirror start cluster 2,
 bytes/RecordSegment 2^(-1*246), clusters/index block 1,
 serial number 0e6f00230f002080f; containsMicrosoft Windows XP/VISTA bootloader BOOTMGR
 
2 members found this post helpful.
Old 05-09-2025, 02:40 AM   #9
exerceo
Member
 
Registered: Oct 2022
Posts: 88

Original Poster
Rep: Reputation: 20
Lightbulb fsstat

Adding this for the sake of completeness:

fsstat from the Sleuth Kit can view the cluster size on several file systems, including NTFS. But NTFS cluster size is almost always 4K. I have never seen a drive performatted differently.

Code:
fsstat /dev/sdd1 |grep "Cluster Size"
Quote:
Please note that this thread has not been replied to in over 6 months. Please ensure your reply is still relevant and timely.
Yes, it is.

Last edited by exerceo; 05-09-2025 at 02:42 AM.
 
Old 05-09-2025, 07:06 AM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,256
Blog Entries: 4

Rep: Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140
Actually, Microsoft hasn't been "coy" about the particulars of NTFS. They know that it has now become a very important system to be able to share.

(Although I would still advise "letting Windows handle it," treating it as a remote file system.)
 
1 members found this post helpful.
  


Reply

Tags
file systems, ntfs



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
Linux Virtual Memory size; Page size; Resident Data Size; DB2Database; Explanation ANanalanalyzer Linux - Newbie 1 09-28-2018 04:50 PM
[SOLVED] Starting File System .. Starting File System .. Starting File System .. Starting File rmknox Linux - Newbie 3 08-15-2010 11:30 PM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM
me wants cluster me wants cluster me wants cluster funkymunky Linux - Networking 3 01-06-2004 07:51 AM
NTFS Mount Error - "Cluster Size Not Supported" dougweiser Linux - Software 2 01-22-2002 08:57 AM

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

All times are GMT -5. The time now is 03:53 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