Switch to full style
Data recovery and disk repair questions and discussions related to old-fashioned SATA, SAS, SCSI, IDE, MFM hard drives - any type of storage device that has moving parts
Post a reply

What is the factor/formula?

September 27th, 2018, 9:38

Dear Experts,

One question came to my mind once about How HDD/OS writes, i was thinking about How or Who decides this Specific File (for example) will be written to that specific sector?
Anyone knows?

is it based on a formula/OS/FS? or how its been calculated?

sometimes you see the HDD is filled with data from the beginning then Empty Space (zeros) then again data

i was wondering how?

Thank you :wink:

Re: What is the factor/formula?

September 30th, 2018, 2:46

None? :heeey:

:shock:

Re: What is the factor/formula?

October 2nd, 2018, 12:14

That formula is well hidden inside the filesystems (or more specifically the filesystem implementations). Every filesystem has its own formula. And that's the main job of a filesystem to decide where things go. For some filesystems there are even tools like defragmentation which can change the position afterwards.

Re: What is the factor/formula?

October 2nd, 2018, 14:43

And to add to this the drive itself will decide what LBA (sector) will belong to each physical location ...

Meaning the file system will tell what LBAs a file will be stored to and the drive itself will "translate" those LBAs to physical place on platter.

Re: What is the factor/formula?

October 3rd, 2018, 2:32

sourcerer wrote:That formula is well hidden inside the filesystems (or more specifically the filesystem implementations). Every filesystem has its own formula. And that's the main job of a filesystem to decide where things go. For some filesystems there are even tools like defragmentation which can change the position afterwards.



Spildit wrote:And to add to this the drive itself will decide what LBA (sector) will belong to each physical location ...

Meaning the file system will tell what LBAs a file will be stored to and the drive itself will "translate" those LBAs to physical place on platter.


Any Base/Ref. to all of this? prefer if Technical Doc. not some sort of essay written by some dump or none-tech. person.

Am asking in general because am doing some research about something else, but this Question came to my mind

I tried reading many articles/docs none was helpful..

Thank you

Re: What is the factor/formula?

October 3rd, 2018, 4:49

In case of Linux filesystems, you can get the sourcecode on www.kernel.org :

For FAT:
https://git.kernel.org/pub/scm/linux/ke ... 9-rc6#n263

For EXT2:
https://git.kernel.org/pub/scm/linux/ke ... =v4.19-rc6
https://git.kernel.org/pub/scm/linux/ke ... 9-rc6#n259
Post a reply