Is there a way to make ext-filesystems use less space for themselves in Linux?
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
up vote
7
down vote
favorite
I have a bunch of external and internal HDDs that I use on a Linux system. I only have Linux systems, so using a Linux file-system would only make sense, right? However I'm currently using NTFS everywhere, because it gives me the most usable space out of HDDs.
I would like to switch to Linux file-systems now though, mostly because of permissions and compability (e.g. I can't get my LUKS encrypted NTFS partition to resize under Linux, keeps telling me to chkdsk under Windows).
However when I formatted those HDDs I tried out a bunch of different filesystems and every Linux filesystem, even ext2 which as far as I know has no journaling, used a lot of space for itself. I don't recall exact values, but it was over 100GB that NTFS got me more on a 2TB HDD, which is a lot.
So my question is: Is there a way to make ext-filesystems use less space for themselves? Or is there another filesystem (I've tried ext2, ext3, ext4, NTFS and vfat - None of them came even close to the usable space NTFS offered me) with perfect Linux support and great usable space?
I'd love to hear about how and why filesystems (especially ext2 which has no journaling) use that much more space than NTFS and I don't know where else to ask. I'd mostly prefer a way to use ext4 without journaling and anything else that uses up this much space, if that's possible.
linux filesystems ntfs ext4 ext2
add a comment |Â
up vote
7
down vote
favorite
I have a bunch of external and internal HDDs that I use on a Linux system. I only have Linux systems, so using a Linux file-system would only make sense, right? However I'm currently using NTFS everywhere, because it gives me the most usable space out of HDDs.
I would like to switch to Linux file-systems now though, mostly because of permissions and compability (e.g. I can't get my LUKS encrypted NTFS partition to resize under Linux, keeps telling me to chkdsk under Windows).
However when I formatted those HDDs I tried out a bunch of different filesystems and every Linux filesystem, even ext2 which as far as I know has no journaling, used a lot of space for itself. I don't recall exact values, but it was over 100GB that NTFS got me more on a 2TB HDD, which is a lot.
So my question is: Is there a way to make ext-filesystems use less space for themselves? Or is there another filesystem (I've tried ext2, ext3, ext4, NTFS and vfat - None of them came even close to the usable space NTFS offered me) with perfect Linux support and great usable space?
I'd love to hear about how and why filesystems (especially ext2 which has no journaling) use that much more space than NTFS and I don't know where else to ask. I'd mostly prefer a way to use ext4 without journaling and anything else that uses up this much space, if that's possible.
linux filesystems ntfs ext4 ext2
Have you seen this thread?
â JakeGould
8 hours ago
1
I have, and it explained what uses up the extra space but the difference between NTFS and ext is MUCH bigger than between reiserfs and ext, and I'm wondering if there is any way to make it smaller. For example on a 1TB HDD I'm able to use 989GB with NTFS. ext4 would give me around 909GB.
â confetti
8 hours ago
Fair enough. Decent question and the answer is enlightening too.
â JakeGould
4 hours ago
add a comment |Â
up vote
7
down vote
favorite
up vote
7
down vote
favorite
I have a bunch of external and internal HDDs that I use on a Linux system. I only have Linux systems, so using a Linux file-system would only make sense, right? However I'm currently using NTFS everywhere, because it gives me the most usable space out of HDDs.
I would like to switch to Linux file-systems now though, mostly because of permissions and compability (e.g. I can't get my LUKS encrypted NTFS partition to resize under Linux, keeps telling me to chkdsk under Windows).
However when I formatted those HDDs I tried out a bunch of different filesystems and every Linux filesystem, even ext2 which as far as I know has no journaling, used a lot of space for itself. I don't recall exact values, but it was over 100GB that NTFS got me more on a 2TB HDD, which is a lot.
So my question is: Is there a way to make ext-filesystems use less space for themselves? Or is there another filesystem (I've tried ext2, ext3, ext4, NTFS and vfat - None of them came even close to the usable space NTFS offered me) with perfect Linux support and great usable space?
I'd love to hear about how and why filesystems (especially ext2 which has no journaling) use that much more space than NTFS and I don't know where else to ask. I'd mostly prefer a way to use ext4 without journaling and anything else that uses up this much space, if that's possible.
linux filesystems ntfs ext4 ext2
I have a bunch of external and internal HDDs that I use on a Linux system. I only have Linux systems, so using a Linux file-system would only make sense, right? However I'm currently using NTFS everywhere, because it gives me the most usable space out of HDDs.
I would like to switch to Linux file-systems now though, mostly because of permissions and compability (e.g. I can't get my LUKS encrypted NTFS partition to resize under Linux, keeps telling me to chkdsk under Windows).
However when I formatted those HDDs I tried out a bunch of different filesystems and every Linux filesystem, even ext2 which as far as I know has no journaling, used a lot of space for itself. I don't recall exact values, but it was over 100GB that NTFS got me more on a 2TB HDD, which is a lot.
So my question is: Is there a way to make ext-filesystems use less space for themselves? Or is there another filesystem (I've tried ext2, ext3, ext4, NTFS and vfat - None of them came even close to the usable space NTFS offered me) with perfect Linux support and great usable space?
I'd love to hear about how and why filesystems (especially ext2 which has no journaling) use that much more space than NTFS and I don't know where else to ask. I'd mostly prefer a way to use ext4 without journaling and anything else that uses up this much space, if that's possible.
linux filesystems ntfs ext4 ext2
edited 8 hours ago
JakeGould
28.5k1085125
28.5k1085125
asked 8 hours ago
confetti
3309
3309
Have you seen this thread?
â JakeGould
8 hours ago
1
I have, and it explained what uses up the extra space but the difference between NTFS and ext is MUCH bigger than between reiserfs and ext, and I'm wondering if there is any way to make it smaller. For example on a 1TB HDD I'm able to use 989GB with NTFS. ext4 would give me around 909GB.
â confetti
8 hours ago
Fair enough. Decent question and the answer is enlightening too.
â JakeGould
4 hours ago
add a comment |Â
Have you seen this thread?
â JakeGould
8 hours ago
1
I have, and it explained what uses up the extra space but the difference between NTFS and ext is MUCH bigger than between reiserfs and ext, and I'm wondering if there is any way to make it smaller. For example on a 1TB HDD I'm able to use 989GB with NTFS. ext4 would give me around 909GB.
â confetti
8 hours ago
Fair enough. Decent question and the answer is enlightening too.
â JakeGould
4 hours ago
Have you seen this thread?
â JakeGould
8 hours ago
Have you seen this thread?
â JakeGould
8 hours ago
1
1
I have, and it explained what uses up the extra space but the difference between NTFS and ext is MUCH bigger than between reiserfs and ext, and I'm wondering if there is any way to make it smaller. For example on a 1TB HDD I'm able to use 989GB with NTFS. ext4 would give me around 909GB.
â confetti
8 hours ago
I have, and it explained what uses up the extra space but the difference between NTFS and ext is MUCH bigger than between reiserfs and ext, and I'm wondering if there is any way to make it smaller. For example on a 1TB HDD I'm able to use 989GB with NTFS. ext4 would give me around 909GB.
â confetti
8 hours ago
Fair enough. Decent question and the answer is enlightening too.
â JakeGould
4 hours ago
Fair enough. Decent question and the answer is enlightening too.
â JakeGould
4 hours ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
13
down vote
By default, ext2 and its successors reserve 5% of the filesystem for use by the root user. This reduces fragmentation, and makes it less likely that the administrator or any root-owned daemons will be left with no space to work in.
These reserved blocks prevent programs not running as root from filling your disk.
Whether these considerations justify the loss of capacity depends on what the filesystem is used for.
The 5% amount was set in the 1980s when disks were much smaller, but was just left as-is. Nowadays 1% is probably enough for system stability.
The reservation can be changed using the -m
option of the tune2fs
command:
tune2fs -m 0 /dev/sda1
This will set the reserved blocks percentage to 0% (0 blocks).
To get the current value (among others), use the command :
tune2fs -l <device>
This would explain the immense difference in usable space perfectly (as 5% of 2TB are 100GB). The disks won't be used for anything as root or system-file related, so I think it would be save to disable this. I got a question though: How do root-owned programs know there is more free space than non-root programs? Runningdf
as non-root vs. root shows no difference.
â confetti
8 hours ago
3
@confetti: Because the VFS doesn't reject their attempts to write to the disk with an error (until the volume is actually full, of course).
â Ignacio Vazquez-Abrams
8 hours ago
Linux handles this internally by the process uid or its group. I suppose that this is done in the disk driver when allocating space, on a much lower level than the onedf
operates in.
â harrymc
8 hours ago
So there is no way, as the root user, to tell how much free space I actually have? What happens when root actually makes use of these 5%? Is there no way to "track" this?
â confetti
8 hours ago
gnome-system-monitor
has a column calledfree
in its file system monitor. That shows me26.5GB
for a 59GB ext4 SSD partition at the moment, whileavailable
reports23.5GB
. I assume this is the 5% difference?
â confetti
8 hours ago
 |Â
show 2 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
13
down vote
By default, ext2 and its successors reserve 5% of the filesystem for use by the root user. This reduces fragmentation, and makes it less likely that the administrator or any root-owned daemons will be left with no space to work in.
These reserved blocks prevent programs not running as root from filling your disk.
Whether these considerations justify the loss of capacity depends on what the filesystem is used for.
The 5% amount was set in the 1980s when disks were much smaller, but was just left as-is. Nowadays 1% is probably enough for system stability.
The reservation can be changed using the -m
option of the tune2fs
command:
tune2fs -m 0 /dev/sda1
This will set the reserved blocks percentage to 0% (0 blocks).
To get the current value (among others), use the command :
tune2fs -l <device>
This would explain the immense difference in usable space perfectly (as 5% of 2TB are 100GB). The disks won't be used for anything as root or system-file related, so I think it would be save to disable this. I got a question though: How do root-owned programs know there is more free space than non-root programs? Runningdf
as non-root vs. root shows no difference.
â confetti
8 hours ago
3
@confetti: Because the VFS doesn't reject their attempts to write to the disk with an error (until the volume is actually full, of course).
â Ignacio Vazquez-Abrams
8 hours ago
Linux handles this internally by the process uid or its group. I suppose that this is done in the disk driver when allocating space, on a much lower level than the onedf
operates in.
â harrymc
8 hours ago
So there is no way, as the root user, to tell how much free space I actually have? What happens when root actually makes use of these 5%? Is there no way to "track" this?
â confetti
8 hours ago
gnome-system-monitor
has a column calledfree
in its file system monitor. That shows me26.5GB
for a 59GB ext4 SSD partition at the moment, whileavailable
reports23.5GB
. I assume this is the 5% difference?
â confetti
8 hours ago
 |Â
show 2 more comments
up vote
13
down vote
By default, ext2 and its successors reserve 5% of the filesystem for use by the root user. This reduces fragmentation, and makes it less likely that the administrator or any root-owned daemons will be left with no space to work in.
These reserved blocks prevent programs not running as root from filling your disk.
Whether these considerations justify the loss of capacity depends on what the filesystem is used for.
The 5% amount was set in the 1980s when disks were much smaller, but was just left as-is. Nowadays 1% is probably enough for system stability.
The reservation can be changed using the -m
option of the tune2fs
command:
tune2fs -m 0 /dev/sda1
This will set the reserved blocks percentage to 0% (0 blocks).
To get the current value (among others), use the command :
tune2fs -l <device>
This would explain the immense difference in usable space perfectly (as 5% of 2TB are 100GB). The disks won't be used for anything as root or system-file related, so I think it would be save to disable this. I got a question though: How do root-owned programs know there is more free space than non-root programs? Runningdf
as non-root vs. root shows no difference.
â confetti
8 hours ago
3
@confetti: Because the VFS doesn't reject their attempts to write to the disk with an error (until the volume is actually full, of course).
â Ignacio Vazquez-Abrams
8 hours ago
Linux handles this internally by the process uid or its group. I suppose that this is done in the disk driver when allocating space, on a much lower level than the onedf
operates in.
â harrymc
8 hours ago
So there is no way, as the root user, to tell how much free space I actually have? What happens when root actually makes use of these 5%? Is there no way to "track" this?
â confetti
8 hours ago
gnome-system-monitor
has a column calledfree
in its file system monitor. That shows me26.5GB
for a 59GB ext4 SSD partition at the moment, whileavailable
reports23.5GB
. I assume this is the 5% difference?
â confetti
8 hours ago
 |Â
show 2 more comments
up vote
13
down vote
up vote
13
down vote
By default, ext2 and its successors reserve 5% of the filesystem for use by the root user. This reduces fragmentation, and makes it less likely that the administrator or any root-owned daemons will be left with no space to work in.
These reserved blocks prevent programs not running as root from filling your disk.
Whether these considerations justify the loss of capacity depends on what the filesystem is used for.
The 5% amount was set in the 1980s when disks were much smaller, but was just left as-is. Nowadays 1% is probably enough for system stability.
The reservation can be changed using the -m
option of the tune2fs
command:
tune2fs -m 0 /dev/sda1
This will set the reserved blocks percentage to 0% (0 blocks).
To get the current value (among others), use the command :
tune2fs -l <device>
By default, ext2 and its successors reserve 5% of the filesystem for use by the root user. This reduces fragmentation, and makes it less likely that the administrator or any root-owned daemons will be left with no space to work in.
These reserved blocks prevent programs not running as root from filling your disk.
Whether these considerations justify the loss of capacity depends on what the filesystem is used for.
The 5% amount was set in the 1980s when disks were much smaller, but was just left as-is. Nowadays 1% is probably enough for system stability.
The reservation can be changed using the -m
option of the tune2fs
command:
tune2fs -m 0 /dev/sda1
This will set the reserved blocks percentage to 0% (0 blocks).
To get the current value (among others), use the command :
tune2fs -l <device>
edited 8 hours ago
answered 8 hours ago
harrymc
232k9234512
232k9234512
This would explain the immense difference in usable space perfectly (as 5% of 2TB are 100GB). The disks won't be used for anything as root or system-file related, so I think it would be save to disable this. I got a question though: How do root-owned programs know there is more free space than non-root programs? Runningdf
as non-root vs. root shows no difference.
â confetti
8 hours ago
3
@confetti: Because the VFS doesn't reject their attempts to write to the disk with an error (until the volume is actually full, of course).
â Ignacio Vazquez-Abrams
8 hours ago
Linux handles this internally by the process uid or its group. I suppose that this is done in the disk driver when allocating space, on a much lower level than the onedf
operates in.
â harrymc
8 hours ago
So there is no way, as the root user, to tell how much free space I actually have? What happens when root actually makes use of these 5%? Is there no way to "track" this?
â confetti
8 hours ago
gnome-system-monitor
has a column calledfree
in its file system monitor. That shows me26.5GB
for a 59GB ext4 SSD partition at the moment, whileavailable
reports23.5GB
. I assume this is the 5% difference?
â confetti
8 hours ago
 |Â
show 2 more comments
This would explain the immense difference in usable space perfectly (as 5% of 2TB are 100GB). The disks won't be used for anything as root or system-file related, so I think it would be save to disable this. I got a question though: How do root-owned programs know there is more free space than non-root programs? Runningdf
as non-root vs. root shows no difference.
â confetti
8 hours ago
3
@confetti: Because the VFS doesn't reject their attempts to write to the disk with an error (until the volume is actually full, of course).
â Ignacio Vazquez-Abrams
8 hours ago
Linux handles this internally by the process uid or its group. I suppose that this is done in the disk driver when allocating space, on a much lower level than the onedf
operates in.
â harrymc
8 hours ago
So there is no way, as the root user, to tell how much free space I actually have? What happens when root actually makes use of these 5%? Is there no way to "track" this?
â confetti
8 hours ago
gnome-system-monitor
has a column calledfree
in its file system monitor. That shows me26.5GB
for a 59GB ext4 SSD partition at the moment, whileavailable
reports23.5GB
. I assume this is the 5% difference?
â confetti
8 hours ago
This would explain the immense difference in usable space perfectly (as 5% of 2TB are 100GB). The disks won't be used for anything as root or system-file related, so I think it would be save to disable this. I got a question though: How do root-owned programs know there is more free space than non-root programs? Running
df
as non-root vs. root shows no difference.â confetti
8 hours ago
This would explain the immense difference in usable space perfectly (as 5% of 2TB are 100GB). The disks won't be used for anything as root or system-file related, so I think it would be save to disable this. I got a question though: How do root-owned programs know there is more free space than non-root programs? Running
df
as non-root vs. root shows no difference.â confetti
8 hours ago
3
3
@confetti: Because the VFS doesn't reject their attempts to write to the disk with an error (until the volume is actually full, of course).
â Ignacio Vazquez-Abrams
8 hours ago
@confetti: Because the VFS doesn't reject their attempts to write to the disk with an error (until the volume is actually full, of course).
â Ignacio Vazquez-Abrams
8 hours ago
Linux handles this internally by the process uid or its group. I suppose that this is done in the disk driver when allocating space, on a much lower level than the one
df
operates in.â harrymc
8 hours ago
Linux handles this internally by the process uid or its group. I suppose that this is done in the disk driver when allocating space, on a much lower level than the one
df
operates in.â harrymc
8 hours ago
So there is no way, as the root user, to tell how much free space I actually have? What happens when root actually makes use of these 5%? Is there no way to "track" this?
â confetti
8 hours ago
So there is no way, as the root user, to tell how much free space I actually have? What happens when root actually makes use of these 5%? Is there no way to "track" this?
â confetti
8 hours ago
gnome-system-monitor
has a column called free
in its file system monitor. That shows me 26.5GB
for a 59GB ext4 SSD partition at the moment, while available
reports 23.5GB
. I assume this is the 5% difference?â confetti
8 hours ago
gnome-system-monitor
has a column called free
in its file system monitor. That shows me 26.5GB
for a 59GB ext4 SSD partition at the moment, while available
reports 23.5GB
. I assume this is the 5% difference?â confetti
8 hours ago
 |Â
show 2 more comments
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1346350%2fis-there-a-way-to-make-ext-filesystems-use-less-space-for-themselves-in-linux%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Have you seen this thread?
â JakeGould
8 hours ago
1
I have, and it explained what uses up the extra space but the difference between NTFS and ext is MUCH bigger than between reiserfs and ext, and I'm wondering if there is any way to make it smaller. For example on a 1TB HDD I'm able to use 989GB with NTFS. ext4 would give me around 909GB.
â confetti
8 hours ago
Fair enough. Decent question and the answer is enlightening too.
â JakeGould
4 hours ago