Discussion:
Bytes per sector
(too old to reply)
Ashish
2010-01-30 08:09:18 UTC
Permalink
From hard disk geometry i can get bytes per sectors from a disk. Generally
this value is in power of 2 like (512,1024...)

My question is
If i have a hard disk where bytes per sector are 512. Suppose hard disk has
4 partitions. Will each partition contains 512 bytes per sectors?
Or is it possible first 2 partitions contain value 512 and other partitions
contain value 1024 for bytes per sector?
Can i change bytes per sector for any partition?

One more question is how to get disk name? disk geometry does not contain
disk name. It contains cylinder,track per sectors etc.
Pegasus [MVP]
2010-01-30 11:28:32 UTC
Permalink
Post by Ashish
From hard disk geometry i can get bytes per sectors from a disk. Generally
this value is in power of 2 like (512,1024...)
My question is
If i have a hard disk where bytes per sector are 512. Suppose hard disk
has 4 partitions. Will each partition contains 512 bytes per sectors?
Or is it possible first 2 partitions contain value 512 and other
partitions contain value 1024 for bytes per sector?
Can i change bytes per sector for any partition?
One more question is how to get disk name? disk geometry does not contain
disk name. It contains cylinder,track per sectors etc.
The number of bytes per sector is partition specific. It is determined when
formatting the partition. Type format /? to see if your format command
allows you to set this parameter.

Disks don't have names. Partitions get a name at format time.
Jonathan de Boyne Pollard
2010-01-31 04:45:34 UTC
Permalink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote
cite="mid:B8174B38-450A-4D23-83C0-***@microsoft.com"
type="cite">
<p>The number of bytes per sector is partition specific. It is
determined when formatting the partition. Type <code>format /?</code>
to see if your format command allows you to set this parameter.
</p>
</blockquote>
<p>No.&nbsp; That's the number of bytes per <em>cluster</em>.&nbsp; The number
of bytes per <em>sector</em> is uniform across the entire disc.</p>
<blockquote
cite="mid:B8174B38-450A-4D23-83C0-***@microsoft.com"
type="cite">
<p>Disks don't have names. Partitions get a name at format time. </p>
</blockquote>
<p>... and what discs have are vendor IDs (available through the disc
command interface, SCSI or ATA), unit serial numbers (available the
same way), disc signatures (in the MBR), and disc GUIDs (in the header
of an EFI partition table).</p>
</body>
</html>
ashish
2010-02-01 20:01:14 UTC
Permalink
Thanks. So Bytes per sector is not depend on partition. It's unique for all partitions of a disk.
In NTFS file system i found 0x400 bytes for each MFT record. Does this 0x400 means 2 sectors where sector size = 0x200?
OR NTFS file system always allocates 0x400 bytes for each mft record whether bytes per sector are 0x200,0x1000 etc?
"Jonathan de Boyne Pollard" <J.deBoynePollard-***@NTLWorld.COM> wrote in message news:***@J.de.Boyne.Pollard.localhost...
The number of bytes per sector is partition specific. It is determined when formatting the partition. Type format /? to see if your format command allows you to set this parameter.

No. That's the number of bytes per cluster. The number of bytes per sector is uniform across the entire disc.

Disks don't have names. Partitions get a name at format time.

... and what discs have are vendor IDs (available through the disc command interface, SCSI or ATA), unit serial numbers (available the same way), disc signatures (in the MBR), and disc GUIDs (in the header of an EFI partition table).
ashish
2010-02-01 20:01:14 UTC
Permalink
Thanks. So Bytes per sector is not depend on partition. It's unique for all partitions of a disk.
In NTFS file system i found 0x400 bytes for each MFT record. Does this 0x400 means 2 sectors where sector size = 0x200?
OR NTFS file system always allocates 0x400 bytes for each mft record whether bytes per sector are 0x200,0x1000 etc?
"Jonathan de Boyne Pollard" <J.deBoynePollard-***@NTLWorld.COM> wrote in message news:***@J.de.Boyne.Pollard.localhost...
The number of bytes per sector is partition specific. It is determined when formatting the partition. Type format /? to see if your format command allows you to set this parameter.

No. That's the number of bytes per cluster. The number of bytes per sector is uniform across the entire disc.

Disks don't have names. Partitions get a name at format time.

... and what discs have are vendor IDs (available through the disc command interface, SCSI or ATA), unit serial numbers (available the same way), disc signatures (in the MBR), and disc GUIDs (in the header of an EFI partition table).
ashish
2010-02-01 20:04:40 UTC
Permalink
Thanks. So Bytes per sector is not depend on partition. It's unique for all partitions of a disk.
In NTFS file system i found 0x400 bytes for each MFT record. Does this 0x400 means 2 sectors where sector size = 0x200?
OR NTFS file system always allocates 0x400 bytes for each mft record whether bytes per sector are 0x200,0x1000 etc?
"Jonathan de Boyne Pollard" <J.deBoynePollard-***@NTLWorld.COM> wrote in message news:***@J.de.Boyne.Pollard.localhost...
The number of bytes per sector is partition specific. It is determined when formatting the partition. Type format /? to see if your format command allows you to set this parameter.

No. That's the number of bytes per cluster. The number of bytes per sector is uniform across the entire disc.

Disks don't have names. Partitions get a name at format time.

... and what discs have are vendor IDs (available through the disc command interface, SCSI or ATA), unit serial numbers (available the same way), disc signatures (in the MBR), and disc GUIDs (in the header of an EFI partition table).
Jonathan de Boyne Pollard
2010-02-03 22:49:39 UTC
Permalink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote cite="mid:%***@TK2MSFTNGP06.phx.gbl"
type="cite">
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1">
<meta content="MSHTML 6.00.2900.3640" name="GENERATOR">
<style></style>
<div>
<p>In NTFS file system i found 0x400 bytes for each MFT record. Does
this 0x400 means 2 sectors where sector size = 0x200? </p>
</div>
</blockquote>
<p>Are you <em>really</em> asking me to confirm for you what 0x400
divided by 0x200 is?</p>
<blockquote cite="mid:%***@TK2MSFTNGP06.phx.gbl"
type="cite">
<div>
<p>OR NTFS file system always allocates 0x400 bytes for each mft
record whether bytes per sector are 0x200,0x1000 etc?</p>
</div>
</blockquote>
<p>MFT record size is in theory variable, specified either as a number
of <em>bytes</em> or as a number of <em>clusters</em>, and fixed at
the time that one (re-)formats the volume.&nbsp; In practice, it's almost
always 2<small><sup>10</sup></small> bytes (0xF6 as the "clusters per
MFT record" value in the BPB).&nbsp; Whether this changes when the disc
unit's sector size is itself greater than 2<small><sup>10</sup></small>
bytes is an interesting question.&nbsp; Certainly it does for the Linux NTFS
formatting utility, which enforces the MFT record size to be no smaller
than the disc unit's sector size and no smaller than 1024, apparently
because the Linux filesystem driver for NTFS cannot handle the
filesystem format otherwise.<br>
</p>
</body>
</html>
Ashish
2010-02-04 11:53:37 UTC
Permalink
Sorry i did not your reply properly.
I think mft record size is n*sector size where n =1,2...
If i format a drive then how to change mft record size?
Also mft record size is not related with cluster size. Please correct me if i am wrong
"Jonathan de Boyne Pollard" <J.deBoynePollard-***@NTLWorld.COM> wrote in message news:***@J.de.Boyne.Pollard.localhost...
In NTFS file system i found 0x400 bytes for each MFT record. Does this 0x400 means 2 sectors where sector size = 0x200?

Are you really asking me to confirm for you what 0x400 divided by 0x200 is?

OR NTFS file system always allocates 0x400 bytes for each mft record whether bytes per sector are 0x200,0x1000 etc?

MFT record size is in theory variable, specified either as a number of bytes or as a number of clusters, and fixed at the time that one (re-)formats the volume. In practice, it's almost always 210 bytes (0xF6 as the "clusters per MFT record" value in the BPB). Whether this changes when the disc unit's sector size is itself greater than 210 bytes is an interesting question. Certainly it does for the Linux NTFS formatting utility, which enforces the MFT record size to be no smaller than the disc unit's sector size and no smaller than 1024, apparently because the Linux filesystem driver for NTFS cannot handle the filesystem format otherwise.
Jonathan de Boyne Pollard
2010-02-05 01:49:18 UTC
Permalink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote cite="mid:%***@TK2MSFTNGP05.phx.gbl"
type="cite">
<div>
<blockquote dir="ltr"
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<p>MFT record size is in theory variable, specified either as a
number of <em>bytes</em> or as a number of <em>clusters</em>, and
fixed at the time that one (re-)formats the volume.&nbsp; In practice, it's
almost always 2<small><sup>10</sup></small> bytes (0xF6 as the
"clusters per MFT record" value in the BPB).&nbsp; Whether this changes when
the disc unit's sector size is itself greater than 2<small><sup>10</sup></small>
bytes is an interesting question.&nbsp; Certainly it does for the Linux NTFS
formatting utility, which enforces the MFT record size to be no smaller
than the disc unit's sector size and no smaller than 1024, apparently
because the Linux filesystem driver for NTFS cannot handle the
filesystem format otherwise.</p>
</blockquote>
</div>
<div>
<p>I think mft record size is n*sector size where n =1,2...</p>
</div>
</blockquote>
<p>That is wrong.&nbsp; As I said, MFT record size is recorded in one of two
ways, either as a number of <em>bytes</em> (which is additionally
always a power of 2) or as a number of <em>clusters</em>.&nbsp; It's not
specified in terms of sectors.&nbsp; For the common MFT record size of 1KiB,
if the cluster size is greater than 1KiB, it has to be specified as a
number of bytes, but if the cluster size is an even divisor of 1024, it
can be specified as an integral number of clusters.<br>
</p>
<blockquote cite="mid:%***@TK2MSFTNGP05.phx.gbl"
type="cite">
<div>
<p>If i format a drive then how to change mft record size?</p>
</div>
</blockquote>
<p>There may be one, but I know of no NTFS formatting utility that
permits one to have direct control over this.&nbsp; As I said, the Linux
NTFS formatting utility hardwires the size selection.&nbsp; It just picks a
size itself, and writes it to the on-disc data structures that it is
creating.<br>
</p>
</body>
</html>

Loading...