LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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: 34

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


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,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
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: 21,855

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

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
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: 34

Original Poster
Rep: Reputation: 7
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: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
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,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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
 
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:07 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