2018-01-17 19:08 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001876openmediavaultBugpublic2018-01-05 12:13
ReporterAlex131089 
Assigned Tovotdev 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version3
Product Version 
Target VersionFixed in VersionErasmus (3.x) 
Summary0001876: OMV3 doesn't use label but disk id to mount FS while it should
DescriptionAka : getPredictableDeviceFile doesn't work correctly when fs label contain space

https://github.com/openmediavault/openmediavault/blob/3.x/deb/openmediavault/usr/share/openmediavault/engined/rpc/filesystemmgmt.inc#L832
is used to get the fsname and to built the dir/mountpoint, but
https://github.com/openmediavault/openmediavault/blob/3.x/deb/openmediavault/usr/share/php/openmediavault/system/filesystem/filesystem.inc#L389 called by https://github.com/openmediavault/openmediavault/blob/3.x/deb/openmediavault/usr/share/php/openmediavault/system/filesystem/filesystem.inc#L459
doesn't seems to work correctly when label contain space.

udev use it's ID_FS_LABEL_ENC to populate /dev/disk/by-label/, so it'll be populated with "My\x20label" instead of "My label", and the check (https://github.com/openmediavault/openmediavault/blob/3.x/deb/openmediavault/usr/share/php/openmediavault/system/filesystem/filesystem.inc#L393) fails.
Additional Informationroot@omv3:/srv# udevadm info /dev/sdd
[..]
S: disk/by-label/My\x20label
E: ID_FS_LABEL=My_label
E: ID_FS_LABEL_ENC=My\x20label
[..]

root@omv3:/srv# ls -la "/dev/disk/by-label/My\x20label"
lrwxrwxrwx 1 root root 9 Jan 4 17:25 /dev/disk/by-label/My\x20label -> ../../sdd

root@omv3:/srv# ls -la "/dev/disk/by-label/My label"
ls: cannot access /dev/disk/by-label/My\x20label: No such file or directory
TagsNo tags attached.
Product build3.0.95
Attached Files

-Relationships
+Relationships

-Notes

~0005097

votdev (administrator)

Fixed in openmediavault 3.0.96, see https://github.com/openmediavault/openmediavault/commit/12cbec444a8bfcd4addc5bdebb936a58b15b215f and https://github.com/openmediavault/openmediavault/commit/9398705b1c970b589e2a406e8376f19b267a6235.

P.S.: Using whitespaces in file system labels, files and directories is a really bad idea in my opinion.
+Notes

-Issue History
Date Modified Username Field Change
2018-01-04 18:30 Alex131089 New Issue
2018-01-04 18:30 Alex131089 Status new => assigned
2018-01-04 18:30 Alex131089 Assigned To => votdev
2018-01-05 12:13 votdev Status assigned => resolved
2018-01-05 12:13 votdev Resolution open => fixed
2018-01-05 12:13 votdev Fixed in Version => Erasmus (3.x)
2018-01-05 12:13 votdev Note Added: 0005097
+Issue History