ext4 with journal, Does/can journal shrink as drive is filled |
- No Warez. This includes warez links, cracks and/or requests for help in getting illegal software or copyrighted music tracks!
- No Spamming or Trolling on the boards, this includes useless posts, trying to only increase post count or trying to deliberately create a flame war.
- No Hateful or Disrespectful posts. This includes: bashing, name-calling or insults directed at a board member.
- Click here for complete Hydrogenaudio Terms of Service
![]() ![]() |
ext4 with journal, Does/can journal shrink as drive is filled |
Oct 22 2010, 19:09
Post
#1
|
|
|
Group: Members Posts: 177 Joined: 16-July 03 Member No.: 7820 |
I recently bought a 1TB external drive. It was preformatted NTFS, and had 930GB available upon plugging in. As I use Linux, I formatted it to ext4 and it then had 870GB available. I assume the missing 60GB is used for the journal.
Does anyone know if I can reclaim that 60GB when the drive gets full. Or will it happen automatically? Or not at all? Cheers |
|
|
|
Oct 24 2010, 09:33
Post
#2
|
|
![]() Group: Members Posts: 3620 Joined: 14-May 03 From: Bad Herrenalb Member No.: 6613 |
It will not happen automatically. Your missing space is caused by the journal and the reserved blocks. Have a look at the tune2fs -m switch and adapt the value of your drive if necessary. Theoretically you could even set that to 0, but I am not sure if that's a good idea.
This post has been edited by Sebastian Mares: Oct 24 2010, 09:36 -------------------- http://listening-tests.hydrogenaudio.org/sebastian/
|
|
|
|
Nov 23 2010, 12:03
Post
#3
|
|
![]() Group: Members Posts: 648 Joined: 10-January 06 From: Zagreb Member No.: 27018 |
If using it just as storage, why not formatting it as EXT2?
|
|
|
|
Nov 23 2010, 21:47
Post
#4
|
|
![]() Group: Members Posts: 3620 Joined: 14-May 03 From: Bad Herrenalb Member No.: 6613 |
Well, I wouldn't... Unless you want to do a full HDD scan in case the drive was not plugged out correctly (which you would also have to do in case you disable the journal (or set it to 0 bytes) for ext3 / ext4).
This post has been edited by Sebastian Mares: Nov 23 2010, 21:48 -------------------- http://listening-tests.hydrogenaudio.org/sebastian/
|
|
|
|
Dec 3 2010, 13:29
Post
#5
|
|
![]() Server Admin Group: Admin Posts: 4808 Joined: 24-September 01 Member No.: 13 |
This is not only due to the journal (about 128M, certainly not several GB) and reserved space (by default 5%, or about 45G), but also due to the bookkeeping data (inodes), which is preallocated for ext4. NTFS does not preallocate it but assigns it on demand by expanding the MFT (which can then fragment, thereby degrading performance). You will also lose that diskspace on NTFS as you start adding more files.
There are other filesystems for Linux that do not preallocate (such as XFS and btrfs), but in general I wouldn't worry about it as this is really just a tradeoff between reserving space upfront or when it's needed. A small advantage of allocating on demand is that if you would only put a few big files, you'd lose less space, and if you want to store a gazillion tiny files, you can run out of inodes. But again, for normal usage, the defaults are perfectly fine. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 20th May 2013 - 06:19 |