NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
sleepy06405
May 20, 2012Aspirant
Get back up to 50 GB missing space
WARNING: Using the information in this post WILL lead to denial of support and possibly void your warranty. In addition you may lose a good nights sleep if something goes wrong. Basically don't try this unless you understand what you're doing.
EXTRA WARNING: This is a particularly toxic tip as I don't work for netgear and can't predict if they'll use reserved space for something in the future. I'm using a Pro 6, flex-raid, raid0, no snapshots, your milage may vary. Stop reading now if you've never heard of the term "man page". Perhaps use this time to download a new iPhone app instead. Simply reading this post may fill you with the desire to reply and warn of loss of tech support and other horrors. All perfectly valid points.
Problem: Linux wastes up to 50 GB per volume for reserved space. On a standard single volume linux install, there is some benefit to reserving some of the available filesystem space for files owned by the root user group. If the OS can't write logs, it becomes very unhappy. However if you've got multiple volumes, it is not necessary to reserve space on a secondary storage volume since the files we're reserving space for are not being stored on that volume. In the case of the readynas, we're running off /dev/md0 which has its own reserved space limit of 5%. Snapshots are being stored on a separate partition, they do not require reserved space.
Solution: Use tune2fs and reduce reserved space. The value can be increased or decreased on a live system without worry.
At the hash # type the following:
tune2fs -m 1 /dev/c/c
That will reduce the reserved space on your C volume from 5% to 1%. On a 1 tb or larger volume, you should gain 37 GB of space. If you're brave you can reduce it to 0% and gain all 50 GB back.
If you're using flex-raid with multiple volumes, you can gain space on that volume with:
tune2fs -m 1 /dev/d/d
If you want to put it back exactly the way a default system is, use the command:
tune2fs -m 5 /dev/c/c
Now don't forget, I'm doing this on a Pro 6, flex-raid, raid0, no journaling.
EXTRA WARNING: This is a particularly toxic tip as I don't work for netgear and can't predict if they'll use reserved space for something in the future. I'm using a Pro 6, flex-raid, raid0, no snapshots, your milage may vary. Stop reading now if you've never heard of the term "man page". Perhaps use this time to download a new iPhone app instead. Simply reading this post may fill you with the desire to reply and warn of loss of tech support and other horrors. All perfectly valid points.
Problem: Linux wastes up to 50 GB per volume for reserved space. On a standard single volume linux install, there is some benefit to reserving some of the available filesystem space for files owned by the root user group. If the OS can't write logs, it becomes very unhappy. However if you've got multiple volumes, it is not necessary to reserve space on a secondary storage volume since the files we're reserving space for are not being stored on that volume. In the case of the readynas, we're running off /dev/md0 which has its own reserved space limit of 5%. Snapshots are being stored on a separate partition, they do not require reserved space.
Solution: Use tune2fs and reduce reserved space. The value can be increased or decreased on a live system without worry.
At the hash # type the following:
tune2fs -m 1 /dev/c/c
That will reduce the reserved space on your C volume from 5% to 1%. On a 1 tb or larger volume, you should gain 37 GB of space. If you're brave you can reduce it to 0% and gain all 50 GB back.
If you're using flex-raid with multiple volumes, you can gain space on that volume with:
tune2fs -m 1 /dev/d/d
If you want to put it back exactly the way a default system is, use the command:
tune2fs -m 5 /dev/c/c
Now don't forget, I'm doing this on a Pro 6, flex-raid, raid0, no journaling.
6 Replies
Replies have been turned off for this discussion
- Dewdman42VirtuosoVery interesting. That sort of explains the answer to my question here: http://www.readynas.com/forum/viewtopic.php?f=65&t=63337
Although its not clear to me yet why this 50gb of reserved spaced is not included by "df" report.
At any rate, 50gb of reserved space for root to be able to write to some logs should the os partition fill up, seems like a LOT of wasted space, but I definitely need to understand the complete ramifications of that before reducing it. Thanks a lot for this tip though! I guess this would definitely be a warranty ending configuration. ;-) - sleepy06405AspirantIt won't end your warranty but its not something to try without careful consideration.
Here are df results with setting "-m 0" giving me all available space:
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/c/c 460G 47G 413G 11% /c
This I execute tune2fs and put it back to default config:
# tune2fs -m 5 /dev/c/c
tune2fs 1.42.1 (17-Feb-2012)
Setting reserved blocks percentage to 5% (6044876 blocks)
Now df results again:
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/c/c 460G 47G 390G 11% /c
See how the Avail column drops 26 GB when I return to the default config? This creates the illusion of missing space :) - Dewdman42Virtuosooic. it doesn't show the space as used, but the available is lowered. Interesting. Its truly hidden in some little kernel corner I guess, where df can't see it, but it can see that there is less space left.
On the other hand, I have 3TB drive, its going to be a while before I need that extra space and frankly if the free space is getting that low I should probably expand my raid by then anyway. In some ways, having that 50gb reserved space available to keep linux happy is not a bad idea. I've read that some programs can easily fill up /var/log on the readynas's 4gb os partition, particularly if you're using something that is not a well crafted addon package. - sleepy06405AspirantIt was bugging me because it was 75 gb across two volumes. Each volume I add would waste 50 GB more. This doesn't really affect most people because they only have one large volume and may not even notice.
- Dewdman42Virtuosohehe yep. Anyway thanks for the information, at least now I know.
Now then, know any good iphone apps? - sleepy06405AspirantTheres this app called Sleep Cycle which is pretty good at determining when you've been sleep walking.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!