# ExtraHD bug - can't remove mount point

**URL:** <https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920>\
**Category:** Add-Ons\
**Created:** [14 May 2022 12:54 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920 "2022-05-14T12:54:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![xperimental](https://community.ipfire.org/user_avatar/community.ipfire.org/xperimental/32/16702_2.png) [@xperimental](https://community.ipfire.org/u/xperimental)\
**Post date:** [14 May 2022 12:54 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/1 "2022-05-14T12:54:03Z")

</div>

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? "

 ![grafik](https://community.ipfire.org/uploads/default/original/2X/b/bf5d3d894467f75181962ccd46d66780e5fcc4f3.png)

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.

 ![grafik](https://community.ipfire.org/uploads/default/original/2X/3/3e776a77ab9d943ff5c573c70bcab45737cd645e.png)

How do I get rid of the dead mount point?

---

<div class="post-metadata">

**Author:** ![roberto](https://community.ipfire.org/user_avatar/community.ipfire.org/roberto/32/8265_2.png) [@roberto](https://community.ipfire.org/u/roberto)\
**Post date:** [14 May 2022 18:29 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/2 "2022-05-14T18:29:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [14 May 2022 19:45 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/3 "2022-05-14T19:45:56Z")

</div>

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://wiki.ipfire.org/devel/bugzilla)

[https://bugzilla.ipfire.org/](https://bugzilla.ipfire.org/)

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

---

<div class="post-metadata">

**Author:** ![xperimental](https://community.ipfire.org/user_avatar/community.ipfire.org/xperimental/32/16702_2.png) [@xperimental](https://community.ipfire.org/u/xperimental)\
**Post date:** [14 May 2022 22:54 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/4 "2022-05-14T22:54:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![roberto](https://community.ipfire.org/user_avatar/community.ipfire.org/roberto/32/8265_2.png) [@roberto](https://community.ipfire.org/u/roberto)\
**Post date:** [15 May 2022 07:46 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/5 "2022-05-15T07:46:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![xperimental](https://community.ipfire.org/user_avatar/community.ipfire.org/xperimental/32/16702_2.png) [@xperimental](https://community.ipfire.org/u/xperimental)\
**Post date:** [15 May 2022 08:32 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/6 "2022-05-15T08:32:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![xperimental](https://community.ipfire.org/user_avatar/community.ipfire.org/xperimental/32/16702_2.png) [@xperimental](https://community.ipfire.org/u/xperimental)\
**Post date:** [15 May 2022 08:39 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/7 "2022-05-15T08:39:31Z")

</div>

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.

 ![grafik](https://community.ipfire.org/uploads/default/original/2X/e/ec35c6fd77f1563246c72bb10546049fb37ca7f4.png)

 ![grafik](https://community.ipfire.org/uploads/default/original/2X/a/add72ef520b53e9206b552e757bb1b5cde4a967c.png)

---

<div class="post-metadata">

**Author:** ![tphz](https://community.ipfire.org/user_avatar/community.ipfire.org/tphz/32/16551_2.png) [@tphz](https://community.ipfire.org/u/tphz)\
**Post date:** [15 May 2022 08:45 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/8 "2022-05-15T08:45:22Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![xperimental](https://community.ipfire.org/user_avatar/community.ipfire.org/xperimental/32/16702_2.png) [@xperimental](https://community.ipfire.org/u/xperimental)\
**Post date:** [15 May 2022 09:14 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/9 "2022-05-15T09:14:04Z")

</div>

[https://bugzilla.ipfire.org/show\_bug.cgi?id=12863](https://bugzilla.ipfire.org/show_bug.cgi?id=12863)

---

<div class="post-metadata">

**Author:** ![tphz](https://community.ipfire.org/user_avatar/community.ipfire.org/tphz/32/16551_2.png) [@tphz](https://community.ipfire.org/u/tphz)\
**Post date:** [15 May 2022 09:20 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/10 "2022-05-15T09:20:45Z")

</div>

Is your `/etc/fstab` file empty?

---

<div class="post-metadata">

**Author:** ![xperimental](https://community.ipfire.org/user_avatar/community.ipfire.org/xperimental/32/16702_2.png) [@xperimental](https://community.ipfire.org/u/xperimental)\
**Post date:** [15 May 2022 09:55 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/11 "2022-05-15T09:55:51Z")

</div>

Nope.

 ![grafik](https://community.ipfire.org/uploads/default/original/2X/8/88119a61a48e7c3cac3288eb955e6509068e66e4.png)

---

<div class="post-metadata">

**Author:** ![jon](https://community.ipfire.org/user_avatar/community.ipfire.org/jon/32/15363_2.png) [@jon](https://community.ipfire.org/u/jon)\
**Post date:** [29 January 2023 22:19 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/12 "2023-01-29T22:19:25Z")

</div>

I have the same issue.

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

```auto
[**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!

---

<div class="post-metadata">

**Author:** ![sec-con](https://community.ipfire.org/user_avatar/community.ipfire.org/sec-con/32/16669_2.png) [@sec-con](https://community.ipfire.org/u/sec-con)\
**Post date:** [31 January 2023 15:53 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/13 "2023-01-31T15:53:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [31 January 2023 16:14 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/14 "2023-01-31T16:14:02Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![jon](https://community.ipfire.org/user_avatar/community.ipfire.org/jon/32/15363_2.png) [@jon](https://community.ipfire.org/u/jon)\
**Post date:** [31 January 2023 17:25 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/15 "2023-01-31T17:25:01Z")

</div>

> [@bonnietwin](#):
>
> mount point does not get removed after the hdd is no longer being used

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)

---

<div class="post-metadata">

**Author:** ![bbitsch](https://community.ipfire.org/user_avatar/community.ipfire.org/bbitsch/32/7420_2.png) [@bbitsch](https://community.ipfire.org/u/bbitsch)\
**Post date:** [31 January 2023 17:34 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/16 "2023-01-31T17:34:18Z")

</div>

> [@jon](#):
>
> > [@bonnietwin](#):
> >
> > mount point does not get removed after the hdd is no longer being used
> 
> (I am trying to figure out how to get perl into a verbose or debug mode)

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.

---

<div class="post-metadata">

**Author:** ![jon](https://community.ipfire.org/user_avatar/community.ipfire.org/jon/32/15363_2.png) [@jon](https://community.ipfire.org/u/jon)\
**Post date:** [31 January 2023 17:50 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/17 "2023-01-31T17:50:14Z")

</div>

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.

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

```

---

<div class="post-metadata">

**Author:** ![jon](https://community.ipfire.org/user_avatar/community.ipfire.org/jon/32/15363_2.png) [@jon](https://community.ipfire.org/u/jon)\
**Post date:** [31 January 2023 19:35 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/18 "2023-01-31T19:35:44Z")

</div>

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?!?

---

<div class="post-metadata">

**Author:** ![jon](https://community.ipfire.org/user_avatar/community.ipfire.org/jon/32/15363_2.png) [@jon](https://community.ipfire.org/u/jon)\
**Post date:** [31 January 2023 21:16 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/19 "2023-01-31T21:16:29Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![cfusco](https://community.ipfire.org/user_avatar/community.ipfire.org/cfusco/32/9213_2.png) [@cfusco](https://community.ipfire.org/u/cfusco)\
**Post date:** [1 February 2023 09:49 UTC](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920/20 "2023-02-01T09:49:03Z")

</div>

@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)?

[Next page](https://community.ipfire.org/t/extrahd-bug-cant-remove-mount-point/7920.md?page=2)
