ExtraHD bug - can't remove mount point

Hi,

I set up a mount point for a usb drive that was formatted with exfat for a samba share. However I coun’t write on this samba share. I wanted to delete the mount point, but it doesn’t work:

"Konnte /mnt/harddisknicht mounten. Vielleicht wird das Gerät bereits verwendet? "

What stupid message for a not mounted drive!

I removed the drive and restarted IPFire. Nothing changed! This must be a bug, because it can’t be a feature.

How do I get rid of the dead mount point?

1 Like

Hi @xperimental.

It happens to me always. I hit the delete button and nothing happens. It is not erased. I have to access via ssh and delete it by hand.

Greetings.

1 Like

It might be a good idea to raise a bug report on this so that it gets documented.

https://wiki.ipfire.org/devel/bugzilla

https://bugzilla.ipfire.org/

Your ipfire people email address and password also work as your ipfire bugzilla credentials.

1 Like

Hi, can you tell me the console command please? That’s what I’m looking for.

Good Morning @xperimental.

Yes, i access “/var/ipfire/extrahd” and now I don’t remember what I modified but in the files of this path, I edit them and remove all reference to the ExtraHD that I want to delete.

When I can I try it again and report the bug.

Greetings.

1 Like

Yes you are right. The entries are defined in the file ‘/var/ipfire/extrahd/devices’. I deleted it manually. That works.

1 Like

The code is also not fine in another way. If there are empty lines in the config file, they are also seen to be an entry, In my opinion functions sould alway check the file entries for the right syntax first.

To unmount you can try the command
/var/ipfire/extrahd/bin/extrahd.pl umount /mnt/harddisk

Usage: /var/ipfire/extrahd/bin/extrahd.pl (mount|umount|scanhd) mountpoint

https://bugzilla.ipfire.org/show_bug.cgi?id=12863

Is your /etc/fstab file empty?

Nope.

I have the same issue.

This command looks correct but it did not correct the issue.

[**root@ipfire** ~] # /var/ipfire/extrahd/bin/extrahd.pl umount /mnt/ssd
umount: /mnt/ssd: not mounted.
Successfully umounted /mnt/ssd.
[**root@ipfire** ~] #

After running this command it did not update the /var/ipfire/extrahd/devices file. So no joy…

Looks like I will be deleting the devices file!

I did insert a USB some time ago and found it via ExtraHD, but got stuck with how to use it for anything and forgot about it.

Reading this I guess there is no interface way to manage it properly, like storing logs or backups on it and having them sent via e-mail for reporting or something like that.

I find this a bit annoying and frustrating, half made interface do not work and have little practical usage. “go to ssh” for the fix… yeah sure, I could just as well use fdisk like back in 1995.

There is no WUI way to do that. No one has come forward and offered to do the coding for that.

There is however a wiki page about doing backups to an ext usb hard disk that uses the command line.

https://wiki.ipfire.org/optimization/usb-harddisk

The page was created back in 2014/2015. It would be good if there is anyone who has followed it and can feedback if it works.

The problem that was being raised in this thread was not about using a usb hdd that had been inserted but the fact that the mount point does not get removed after the hdd is no longer being used but a bug report for that has already been raised and a link is in an earlier post in this thread.

4 Likes

I played with the code for a few hours but I could not figure out the error/issue. As mentioned above it seems like the devices (/var/ipfire/extrahd/devices) file is not being updated.

(I am trying to figure out how to get perl into a verbose or debug mode)

1 Like

As a hint: #use warnings and similiar in .cgi files let them talk about errors. .cgi files write to /var/log/httpd/error_log.

Sorry, don’t have an device connected to my IPFire, yet. Will try tomorrow with an USB stick.

1 Like

At the moment I am thinking it is in the perl code of extrahd.pl and in the umount section.

That is the area I wanted to debug

This is the command that didn’t update the devices file.

[root@ipfire ~] # /var/ipfire/extrahd/bin/extrahd.pl umount /mnt/hdd
Successfully umounted /mnt/hdd.
[root@ipfire ~] # 

The devices file is populated during extrahd.pl mount but the devices file is not changed during extrahd.pl umount. I am not sure what this file is for. Maybe to display data on the extrahd.cgi webGUI?!?

thinking out loud… The settings file has not changed since 2017. But it looks like it should be used in extrahd.cgi

[root@ipfire ~] # ls -al /var/ipfire/extrahd/settings
-rw-r--r-- 1 nobody nobody 0 Jun 10  2017 /var/ipfire/extrahd/settings
[root@ipfire ~] # 

@jon is it possible that the device is not unmounted by extrahd.pl (contrary to the message) because there is a process running that still uses it (maybe extrahd.cgi itself)?