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

disk name alias for display when mountpoint too long #3

Open
Darkentik opened this issue Sep 25, 2022 · 2 comments
Open

disk name alias for display when mountpoint too long #3

Darkentik opened this issue Sep 25, 2022 · 2 comments

Comments

@Darkentik
Copy link

Hey,
my mountpoint for my disk is "srv/disks/cameras" and now i only see this string on the oled display but no disk space usage. :D
Can you build in a function to declare an alias name?
This would be nice!

Thanks!

Best regards,
Darkentik

@ChandlerSwift
Copy link
Owner

I'd received another email with similar questions some time ago, as well, excerpted here for reference:

But I cannot display the storage capacities on the last line of the display, because the installation of Openmediavault creates the mount point /srv/dev-disk-by-uuid-4499c877-477f-4b33-9541-fb54cf8a2f5c for /dev/md0.

I only see on the display: /srv/dev-disk-by-u

Would it be possible to display the name of the filesystem /dev/md0 instead of the mount point?

An idea, in the last line, to display the status of the RAID would be good, for example:
RAID: clean [UU] or RAID: degraded [U _]

But it would be necessary to delete a less important line: Addr IP maybe or the Date...

@ChandlerSwift
Copy link
Owner

At the time (just under a year ago) I'd responded with a patch that displays the device instead of the mount point, which was a step in the right direction, at least:

diff --git a/main.go b/main.go
index 079656c..61e707f 100644
--- a/main.go
+++ b/main.go
@@ -66,7 +66,7 @@ func getHDDString() string {
        for _, partition := range partitions {
                d, _ := disk.Usage(partition.Mountpoint)
                if d.Total > biggestDiskSize {
-                       biggestDiskName = partition.Mountpoint
+                       biggestDiskName = partition.Device
                        biggestDiskUsed = d.Used
                        biggestDiskSize = d.Total
                }

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

2 participants