Page 1 of 1

Unable to umount USB drive

PostPosted: Sun Dec 02, 2018 10:58 pm
by rp1428
I have a couple of backup external USB drives. lsof shows that serviio is accessing them:

java 11584 32382 java root 305r DIR 8,49 4096 5 /area11usb
java 11584 32383 java root 304r DIR 8,49 4096 5 /area11usb
java 11584 32383 java root 305r DIR 8,49 4096 5 /area11usb
java 11584 32384 java root 304r DIR 8,49 4096 5 /area11usb
java 11584 32384 java root 305r DIR 8,49 4096 5 /area11usb
[root@spectre Videos]# ps -ef | grep 11584
root 11584 1825 1 Dec01 pts/1 00:18:48 java -Xmx512M -Xms20M -XX:+UseG1GC -XX:GCTimeRatio=1 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dorg.restlet.engine.loggerFacadeClass=org.restlet.ext.slf4j.Slf4jLoggerFacade -Dderby.system.home=/opt/serviio-1.10/library -Dserviio.home=/opt/serviio-1.10 -Dffmpeg.location=ffmpeg -Ddcraw.location=dcraw -classpath /opt/serviio-1.10/lib/*:/opt/serviio-1.10/config org.serviio.MediaServer
root 27158 18895 0 17:56 pts/5 00:00:00 grep --color=auto 11584

I cannot umount them without forcing it since the OS reports they are busy.

My shared folders are on internal drives and there are no links to these.

lsof also shows nearly 80K entries for serviio.

Why is serviio accessing them and is there some config aspect I'm overlooking?

Re: Unable to umount USB drive

PostPosted: Mon Dec 03, 2018 12:21 am
by atc98092
I believe you're running Linux, but could you list your distro?

Re: Unable to umount USB drive

PostPosted: Mon Dec 03, 2018 11:09 am
by rp1428
It is Fedora 29.

4.19.4-300.fc29.x86_64

Re: Unable to umount USB drive

PostPosted: Mon Dec 03, 2018 4:35 pm
by atc98092
Thanks, now Zip knows where to begin looking.

Re: Unable to umount USB drive

PostPosted: Mon Dec 03, 2018 9:08 pm
by rp1428
I had to reboot the server. Looking at it now it no longer has those USB's listed under lsof - I'll keep a watch on it.

Re: Unable to umount USB drive

PostPosted: Tue Dec 04, 2018 2:02 pm
by rp1428
The problem occurs as a result of the console. If I restart serviio the usb mountpoints are not listed in lsof. If I go into the console and select to add a folder, it shows "+ /" for the root. Expanding this, it lists all the folders under root. All of these are now shown as serviio having them open in lsof. It includes the 3 mountpoints I have for usb drives and also /etc, /usr/ etc.

Further, if I cancel and then select Browse again and expand the root, the lsof file count doubles. In between each of the below, I did not select any folder, just Browse, expand the root folder, Cancel

[root@spectre ~]# lsof | grep area11usb | wc -l
266
[root@spectre ~]# lsof | grep area11usb | wc -l
528
[root@spectre ~]# lsof | grep area11usb | wc -l
792
[root@spectre ~]# lsof | grep area11usb | wc -l
1064

Re: Unable to umount USB drive

PostPosted: Thu Dec 06, 2018 9:28 pm
by zip
thanks for the tip. I did have a look and was able to reproduce this. Unfortunately I didn't find a way to avoid this - it's done inside the Java core.