# How many sectors or whole file rewritten?

**URL:** https://community.mp3tag.de/t/how-many-sectors-or-whole-file-rewritten/50325
**Category:** General Discussion
**Created:** [September 29, 2020, 5:14pm UTC](https://community.mp3tag.de/t/how-many-sectors-or-whole-file-rewritten/50325 "2020-09-29T17:14:54Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![skeleton](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/b5ac83/32.png) [@skeleton](https://community.mp3tag.de/u/skeleton)
#### Post date: [September 29, 2020, 5:14pm UTC](https://community.mp3tag.de/t/how-many-sectors-or-whole-file-rewritten/50325/1 "2020-09-29T17:14:54Z")

</div>

Just a curiosity question here today. When I update tags, are only certain sectors updated or is the whole file rewritten? In other words, are the sectors for tags already allocated if not used, or is the file expanded? I really haven't researched the file structure yet.

---

<div class="post-metadata">

### Author: ![MP3Freak\_Peter](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/c68b51/32.png) [@MP3Freak\_Peter](https://community.mp3tag.de/u/MP3Freak_Peter)
#### Post date: [September 29, 2020, 5:27pm UTC](https://community.mp3tag.de/t/how-many-sectors-or-whole-file-rewritten/50325/2 "2020-09-29T17:27:13Z")

</div>

id3v1 has fix lenth fields at the end of the file.  
Update ist possible with simply rewrite that area of the file.

id3v2 ist typically on beginning of the file, containing fields and field lenth is variable.  
id3v2 tag length is typically sum\_of\_fields + x. On small changes i is possible to rewrite just that area of the file but normally whole file is rewritten by most programs.  
Specially if you add fields within (empty fields normally not written) tag length expanding so there is no other way than rewrite the file.

For details: [https://id3.org/](https://id3.org/)

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [September 29, 2020, 5:33pm UTC](https://community.mp3tag.de/t/how-many-sectors-or-whole-file-rewritten/50325/3 "2020-09-29T17:33:36Z")

</div>

> [@MP3Freak\_Peter](#):
>
> On small changes i is possible to rewrite just that area

and / or the previously used padding is not big enough. If the part of the file is big enough then only the tag part is updated.  
You cannot set the amount of padding written by MP3tag.

---

<div class="post-metadata">

### Author: ![skeleton](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/b5ac83/32.png) [@skeleton](https://community.mp3tag.de/u/skeleton)
#### Post date: [September 30, 2020, 1:17pm UTC](https://community.mp3tag.de/t/how-many-sectors-or-whole-file-rewritten/50325/4 "2020-09-30T13:17:17Z")

</div>

Thanks guys for the comments. This leads me to expect that when I am finished with this round of tag updates which will affect most of around 70k tracks I will have fairly significant disc fragmentation that will need to be handled. I don't really like the regular defrag processes, so will likely just copy my whole library to a different reformatted disk, reformat my library disk, and then copy everything back.

Do we ever finish updating tag data? My wife uses Amazon Prime music and several FM stations, which might be far easier.

---

<div class="post-metadata">

### Author: ![MP3Freak\_Peter](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/c68b51/32.png) [@MP3Freak\_Peter](https://community.mp3tag.de/u/MP3Freak_Peter)
#### Post date: [September 30, 2020, 1:41pm UTC](https://community.mp3tag.de/t/how-many-sectors-or-whole-file-rewritten/50325/5 "2020-09-30T13:41:53Z")

</div>

Why? You can run defragmentation and anything will be ok. Look for defrag paramters by typing defrag /?.  
You can use /x to consolidate free space and move all files together.

Do you use an mechanical harddrive or ssd? On ssd fragmentation is not a problem. Btw: physical sectors are spreaded by harddisk algorithm to enhance ssd livetime.

Warning: DO NOT Defrag and ssd. SSD just need to be optimized / trim that can be done from drive context menu.

Btw: Any file that will be rewritten completely will not be fragmentet after writing.  
(@ohrenkino: is there an mp3tag option to force? but I still think that's not neede anyway)

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [September 30, 2020, 5:08pm UTC](https://community.mp3tag.de/t/how-many-sectors-or-whole-file-rewritten/50325/6 "2020-09-30T17:08:48Z")

</div>

> [@MP3Freak\_Peter](#):
>
> is there an mp3tag option to force? but I still think that's not neede anyway)

As I said:

> [@ohrenkino](#):
>
> You cannot set the amount of padding written by MP3tag.

and neither can you force MP3tag to rewrite the whole file while tagging.
