LOCALDEV_DENY_INTERNAL_DISKS disabled WD Elements USB harddisk

Bug #1040638 reported by Jan Middelkoop
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
LTSP5
Expired
Undecided
Unassigned

Bug Description

It took some digging through the source, but I've figured out why my WD Elements 500 GB USB harddisk doesn't get mounted to the remote server desktop when it is attached to a thin client.

LOCALDEV_DENY_INTERNAL_DISKS is set to True by default. Somehow ltsfs_entry thinks my WD Elements 500 GB USB harddisk is an internal disk and therefor doesn't mount it. Setting LOCALDEV_DENY_INTERNAL_DISKS to False in lts.conf remedies this problem.

Please advise on what further information I could provide and how to obtain that information.

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Jan, is this still reproducible?
If you don't have the disk any more, just let this bug report expire.

Changed in ltsp:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for LTSP because there has been no activity for 60 days.]

Changed in ltsp:
status: Incomplete → Expired
Revision history for this message
vagk (vagk-p) wrote :

I don't know if i need to open a new bug, since this is expired, however I came across the same bug with the same external hard disk, a WD 500GB.

In my setup all usb disks were detected except this one. In my lts.conf file I have LOCALDEV_DENY_INTERNAL_DISKS=true

In the ltsp client I noticed in syslog that ltspfs_entry bash script failed with exit code 1 for this disk, so I run it manually as with -x to see what was the problem.

I have attached the output of bash -x ltspfs_entry add /dev/sdb1

The disk is detected as ata just like if it was an internal. I compared with an internal disk and saw one variable that could make a difference, $DEVPATH that had usb in its path.

I made the next patch. I don't know if it is the proper one but it worked well for me, mounting the external WD disk, while not mounting any internals.

--- ltspfs_entry.orig 2020-04-30 08:08:03.971810533 +0300
+++ ltspfs_entry.new 2020-04-30 08:13:58.267080415 +0300
@@ -158,6 +158,11 @@
             count=0
             IFS=+
             for deny_rule in $deny_ruleset; do
+ if ! boolean_is_true "$LOCALDEV_DENY_USB" && [ "$(echo $DEVPATH|grep usb)" ]; then
+ count=0
+ break
+ fi
                 var=$(echo $deny_rule|cut -d: -f1)
                 val=$(echo $deny_rule|cut -d: -f2)
                 eval test="\${$var}" 2>/dev/null

Revision history for this message
vagk (vagk-p) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.