Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detailed report of space usage #6

Open
Harvie opened this issue Feb 12, 2017 · 3 comments
Open

Detailed report of space usage #6

Harvie opened this issue Feb 12, 2017 · 3 comments

Comments

@Harvie
Copy link

Harvie commented Feb 12, 2017

Hello, i want to write munin plugin to monitor nilfs space with more detail. Is there easy and fast way to tell following?:

total size of volume (100%)
% of free/used space in total
% of space used by files in latest checkpoint
% of space used by files in older checkpoints (reclaimable + non-reclaimable)
% of space used by reclaimable checkpoints
% of space used by non-reclaimable checkpoints (checkpoints under protection period + snapshots)
% of space used by non-reclaimable checkpoints (checkpoints under protection period only)
% of space used by non-reclaimable checkpoints (snapshots only)

beside of % it would also be interesting to get absolute numbers in bytes and human readable format.

It should somehow add up. like:

TOTAL = files stored + deleted/overwrited files + free space
deleted/overwrited files = reclaimable checkpoints + non-reclaimable checkpoints
non-reclaimable checkpoints = pp cp + snapshots

Because right now if i do "df -h" on NILFS i can only see that there's some occupied space, but i can't directly tell if the occupied space is used by latest versions of files or by old versions that can/cannot be reclaimed.

@Harvie
Copy link
Author

Harvie commented Feb 12, 2017

I also tought that i might somehow postprocess output of lssu, but i need the results rather quickly as i plan to graph it every minute or so. And i don't want it to hit performance too badly.

@a8underscore
Copy link

yes, it would be great to easily see how much space can be used

@konis
Copy link
Member

konis commented Mar 21, 2022

The block count used by the latest checkpoint is printed by "lscp -r -n 1".
The block count used by the older checkpoint is printed by "lscp". Note that this number does not mean the increment of each checkpoint, but the number of block counts used at that time. The sum of block counts of every checkpoint doesn't give the total block counts.

For reclaimable space information, "lssu -l" command outputs the count and percentage of live blocks for disk 'segments'. This command can take "-p" option which is to specify the protection period. (It depends on the protection period and snasphot status whether a block is reclaimable or not).

Unfortunately, there is no interface that gives information on the reclaimable space in per-file-basis or per-checkpoint-basis. At this point, these sound technically difficult because the reclaimable space dynamically changes over time and depends on snapshot status as well.

But, I think it's good point of view from the users's point of view. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants