7
33
Fork
You've already forked sentryshot
7

Improve disk usage limit? #83

Open
opened 2025年08月10日 04:55:48 +02:00 by acd2048 · 1 comment

Currently, the user can supply any size for max_disk_usage, and oldest recordings are not deleted unless and until they reach that limit. If the drive somehow becomes full (because, for example, the drive is shared with other users, or the user overestimated the drive capacity, or [cough] didn't mount his bulk storage drive correctly), new footage fails to save, while old footage remains.

If max_disk_usage was also (automatically or manually) capped at a percent, or a minimum free space, this would not happen.

I do get that it may not always be ideal -- sometimes it may be better to loose new footage than to loose old footage unexpectedly early -- what do you think?

Currently, the user can supply any size for _max_disk_usage_, and oldest recordings are not deleted unless and until they reach that limit. **If the drive somehow becomes full** (because, for example, the drive is shared with other users, or the user overestimated the drive capacity, or [cough] didn't mount his bulk storage drive correctly), **new footage fails to save, while old footage remains.** If _max_disk_usage_ was also (automatically or manually) capped at a percent, or a minimum free space, this would not happen. I do get that it may not always be ideal -- sometimes it may be better to loose new footage than to loose old footage unexpectedly early -- what do you think?
Owner
Copy link

I don't think there's a reliable way to get the available space in a directory if the file system supports directory level quotas.

Should we assume that the whole storage directory is on the same drive and that people wont mount a different drive to storage/logs for example?

because, for example, the drive is shared with other users

you generally want to prevent other users from taking your cameras offline by completely filling the disk

or the user overestimated the drive capacity, or [cough] didn't mount his bulk storage drive correctly

this should be noticed pretty quickly, but I guess we could warn on start if max_disk_usage is larger than the disk size

I don't think there's a reliable way to get the available space in a directory if the file system supports directory level quotas. Should we assume that the whole storage directory is on the same drive and that people wont mount a different drive to `storage/logs` for example? > because, for example, the drive is shared with other users you generally want to prevent other users from taking your cameras offline by completely filling the disk > or the user overestimated the drive capacity, or [cough] didn't mount his bulk storage drive correctly this should be noticed pretty quickly, but I guess we could warn on start if `max_disk_usage` is larger than the disk size
Sign in to join this conversation.
No Branch/Tag specified
master
sub_rec
recdb_v2
vino
sidebar
temp
range-streamer
logdb
v0.3.11
v0.3.10
v0.3.9
v0.3.8
v0.3.7
v0.3.6
v0.3.5
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.26
v0.2.25
v0.2.24
v0.2.23
v0.2.22
v0.2.21
v0.2.20
v0.2.19
v0.2.18
v0.2.17
v0.2.16
v0.2.15
v0.2.14
v0.2.13
v0.2.12
v0.2.11
v0.2.10
v0.2.9
v0.2.8
v0.2.7
v0.2.6
v0.2.5
v0.2.4
v0.2.3
v0.2.2
v0.2.1
v0.2.0
v0.1.3
v0.1.2
v0.1.1
v0.1.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SentryShot/sentryshot#83
Reference in a new issue
SentryShot/sentryshot
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?