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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
02-20-2024, 03:41 AM
|
#1
|
Member
Registered: Oct 2022
Posts: 88
Rep:
|
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.)
|
|
|
02-20-2024, 05:12 AM
|
#2
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,390
|
If you want control, don't use proprietary on FOSS.
You want to know details, go look on Windows
|
|
|
02-20-2024, 05:51 AM
|
#3
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,316
|
looks like this is the current situation: https://wiki.archlinux.org/title/NTFS
|
|
|
02-20-2024, 06:00 AM
|
#4
|
Senior Member
Registered: Jul 2020
Posts: 1,547
|
|
|
1 members found this post helpful.
|
02-20-2024, 09:23 AM
|
#5
|
Member
Registered: Oct 2022
Posts: 88
Original Poster
Rep:
|
NTFS on Linux
Quote:
Originally Posted by syg00
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
|
Interesting article (I was already aware of it), however, it has no mention of cluster sizes.
Quote:
Originally Posted by lvm_
|
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
|
|
|
02-21-2024, 06:44 PM
|
#6
|
LQ Newbie
Registered: Jun 2017
Posts: 8
Rep: 
|
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.
|
|
|
02-22-2024, 01:37 AM
|
#7
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,316
|
Quote:
Originally Posted by exerceo
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)
|
|
|
02-22-2024, 08:28 AM
|
#8
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,820
|
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.
|
05-09-2025, 02:40 AM
|
#9
|
Member
Registered: Oct 2022
Posts: 88
Original Poster
Rep:
|
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.
|
|
|
05-09-2025, 07:06 AM
|
#10
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,256
|
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.
|
All times are GMT -5. The time now is 03:53 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|