Skip to content

BUG: /dev/mapper mount paths incorrectly parsed #329

@jaschiu

Description

@jaschiu

On my system, I have use LVM for my filesystem and one logical volume I have is named var-log since it's mounted in /var/log. This causes duf to incorrectly display it as /dev/vg-var-/log due to the regex at

re := regexp.MustCompile(`^/dev/mapper/(.*)-(.*)`)
, when it really should be /dev/vg/var-log. I suggest that if more than 1 hyphen is detected, just display the full /dev/mapper path since it could be possible that the volume group also contains a hyphen, so using a lazy quantifier is not necessarily the solution.

EDIT: its full path is /dev/mapper/vg-var--log, so a regex of ^/dev/mapper/(.*?[^-])?-([^-].*)?$ should work (haven't tested this)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions