IceTV Forum

IceTV IceBox => Getting Help => Topic started by: Hati on October 16, 2023, 08:20:03 AM

Title: USB HDD disappearing act
Post by: Hati on October 16, 2023, 08:20:03 AM
I opted to go for the preconfigured SSD replacement for my IceBox. Prior to it (the SSD) arriving, I've spent some time copying the recordings over my home network from the Icebox's "Recordings" folder to a USB3 hard drive attached to my laptop.

Once the SSD swap was done, I plugged that HDD into the side-front USB port while the box was on. The HDD showed up in the media section and I could play any/all of the recordings copied the same way as I can the recordings the box makes.

Meanwhile I realised that my remote's USB receiver is being disturbed by the rather large USB plug of the HDD, so I stopped the recording we were watching, unplugged the HDD and replugged it to the free USB port on the back (I run a powered USB3 hub for the three dual tuners I use, so I have two USB ports left free on the box).

From this moment on, I am unable to get to the HDD no matter what I try. I have rebooted the box, I have powered it down and relocated where it plugs in, including the original location, but no joy.

At first I was able to see the HDD over the network, appearing as another folder when opening the network address of the IceBox on a Windows machine. This is also gone.

However, every time I unplug the HDD, I get the notification on the IceBox that the drive was removed.

Does anyone have any idea why this is? It was a very convenient way to watch the recordings off the old SSD...

Thanks in advance.
Title: Re: USB HDD disappearing act
Post by: DeltaMikeCharlie on October 16, 2023, 08:33:29 AM
If you plug the USB3 hard drive back into your laptop, is it 1) recognised; and 2) are the files still there?
Title: Re: USB HDD disappearing act
Post by: Hati on October 16, 2023, 09:26:39 AM
Quote from: DeltaMikeCharlie on October 16, 2023, 08:33:29 AMIf you plug the USB3 hard drive back into your laptop, is it 1) recognised; and 2) are the files still there?

Yes and yes.
Title: Re: USB HDD disappearing act
Post by: DeltaMikeCharlie on October 16, 2023, 09:32:01 AM
If you plug another USB device, like a flash drive, into the IceBox, is it recognised?
Title: Re: USB HDD disappearing act
Post by: IanL-S on October 16, 2023, 10:59:32 AM
Linux boxes can get uppity if you remove a USB drive before unmounting it. Most PVRs have a safe-unmount routine (my Toppys and Beyonwiz included). Not sure if KODI has one.

If you look at this thread https://www.reddit.com/r/kodi/comments/c5yh2p/safely_unmount_your_external_usb_storage_from/ you will find out how to unmount USB drive in KODI.

Ian
Title: Re: USB HDD disappearing act
Post by: Hati on October 16, 2023, 01:41:03 PM
Quote from: DeltaMikeCharlie on October 16, 2023, 09:32:01 AMIf you plug another USB device, like a flash drive, into the IceBox, is it recognised?

Yes. Based on IanL-S' post I looked for the test USB stick's option menu and found a "Remove safely" button.

I think the "why" of my predicament is answered, I definitely did not do this to the HDD. Should have known damn it, I played with various flavours of Linux in the past, but have not touched it for some years now.

I haven't had a chance yet to read that reddit thread, but I'll ask anyway.

Is there a config file or something I can edit and remove the remains of the HDD's exitance? Now that I am aware of the safe removal procedure...
Title: Re: USB HDD disappearing act
Post by: prl on October 16, 2023, 04:15:17 PM
Quote from: Hati on October 16, 2023, 01:41:03 PMIs there a config file or something I can edit and remove the remains of the HDD's exitance?

Reboot. The HDD is still mounted as far as the kernel's internal tables are concerned, and I don't think that it can be unmounted, because any unmount request is likely to fail.
Title: Re: USB HDD disappearing act
Post by: DeltaMikeCharlie on October 16, 2023, 04:37:00 PM
Quote from: prl on October 16, 2023, 04:15:17 PMReboot. The HDD is still mounted as far as the kernel's internal tables are concerned, and I don't think that it can be unmounted, because any unmount request is likely to fail.
umount -f /var/media/<my_external_drive>
Title: Re: USB HDD disappearing act
Post by: Hati on October 16, 2023, 05:02:32 PM
Quote from: DeltaMikeCharlie on October 16, 2023, 04:37:00 PMumount -f /var/media/<my_external_drive>

That's great, thank you, but how do I do that? Can I telnet from a Windows machine into the IceBox?
Title: Re: USB HDD disappearing act
Post by: Hati on October 16, 2023, 05:04:48 PM
Quote from: prl on October 16, 2023, 04:15:17 PMReboot. The HDD is still mounted as far as the kernel's internal tables are concerned, and I don't think that it can be unmounted, because any unmount request is likely to fail.

I did, but made no difference. If it would still be mounted, it would show up in the list of media available to browse, just be inaccessible. Right?

Title: Re: USB HDD disappearing act
Post by: DeltaMikeCharlie on October 16, 2023, 05:08:01 PM
Quote from: Hati on October 16, 2023, 05:02:32 PMThat's great, thank you, but how do I do that? Can I telnet from a Windows machine into the IceBox?
Kodi: Settings -> LibreELEC -> Services -> SSH
Windows: PuTTY

Once you login (root/icebox) type 'mount' to see if it is still mounted.
Title: Re: USB HDD disappearing act
Post by: Hati on October 16, 2023, 05:34:59 PM
Quote from: DeltaMikeCharlie on October 16, 2023, 05:08:01 PMKodi: Settings -> LibreELEC -> Services -> SSH
Windows: PuTTY

Once you login (root/icebox) type 'mount' to see if it is still mounted.

Thank you kindly. I got in fine and "mount" showed me that the drive is not listed (currently unplugged). Plugged it in to the laptop again and lo and behold, a drive problem was picked up by Windows. After letting it get fixed, the drive showed up on IceBox again.

It looks like some files on the drive got corrupted when I unplugged it, causing it to not mount properly. Strange that the box \was still reporting removal though...

The lesson is that you need to use the options menu and click on "Remove safely" to unmount properly.

Thank you gentlemen, could not have done it without your help.