how to unmount/eject external USB drive/stick

cdmackay

Active Member
Apologies if this should be obvious, but I couldn't see any mention of it in the wiki, or Things Every... sections.

How do I safely remove an external USB device, like an HDD, or memory stick, from the HDR?

I'm primarily thinking of ext2 sticks and ext3 HDDs, used with the Custom Firmware; is the only safe way to ssh in and umount it?

Or is there something in the WebIF or Humax UI that does this?

thanks much indeed...
 
Last edited:
Thanks both - that's interesting, seems to be an explicit USB eject, rather than a filesystem unmount.

As a UNIX sysadmin of 25 years, the idea of ripping out a physical device providing a mounted filesystem seems extremely risky.

It's interesting that few people (if any?) see problems doing this, esp with ext2 (no journal) on sticks. Perhaps it's because that the external device isn't being written to all the time. As long as you don't rip it out whilst it's writing, or soon after, then one might hope that all was OK. Although the fs "clean" flag wouldn't be set, of course.

I wonder if the Humax kernel has been tweaked slightly to be less aggressive in metadata write caching...?
 
Last edited:
When the Media display doesn't show "copying" in the top right corner any more, or the access LED on the UPD/HDD has stopped flashing, you will be OK. Ease of use in a domestic environment. Bearing in mind most of the user interface functionality is handled within the humaxtv executable, we can reasonably assume it has been taken care of.
 
This has been niggling me too. Mounting/accessing USB drives is just about the only thing that crashes my T2 and so lately I've unplugged only in stand-by just in case this includes any unmounting. Anyway, thanks OP for asking and to the respondents for answering.
 
When the Media display doesn't show "copying" in the top right corner any more, or the access LED on the UPD/HDD has stopped flashing, you will be OK. Ease of use in a domestic environment. Bearing in mind most of the user interface functionality is handled within the humaxtv executable, we can reasonably assume it has been taken care of.

I wonder if Humax assumed that any external USB drive would be FAT-based?

I would imagine that it's much more risky to pull the plug on an ext-based fs, given the amount of metadata cached by the Linux kernel.

Still, perhaps they thought of that, too :)
 
The Humax will format an external hard disk drive (and a USB flash device of at least 32GB) as EXT3, so presumably they would expect to find that format on a USB device
 
Would they not turn caching off for writes to USB, to prevent such problems?

Well, there's data caching, which could be turned off, although that might severely affect write performance. Then there's the ext filesystem metadata which I thought was traditionally stored in kernel. Although with the filesystem journal in ext3 and above, that does at least concentrate the changes, so perhaps it's less of an issue.

I suppose that popular experience is the key: if lots of people are using ext on USB devices, and merrily pulling the plug without unmounting, and no-one is reporting issue, then perhaps it is indeed safe enough.
 
I very much doubt that is the case. The most likely scenarios for a non-technical user to be using Ext are that they are recording on a HD-FOX or archiving on a HDR-FOX, in which case they have plugged a HDD in and formatted it on-box, and the HDD generally remains plugged in at all times.
 
I've had to reformat a USB pen drive to ext3 several times which I think was related to me having teething problems with BootHDR or whatever its called on the HD box. That means you reformat to FAT on a PC then ext3 on the Humax which is a pain. So on the HDR I wait for the internal drive to stop spinning then power down an external drive or yank out the pen, whatever is connected.
 
A couple of days ago I was upgrading a HDR-FOX by installing a 2TB disk. The old disk was attached to the front USB port using a SATA to USB docking station: while the disk is being accessed, the light on the docking station flashes a different colour. When finished, although the light was not blinking, I used the USB eject function to be on the safe-side and noticed that doing this caused the disk to be accessed. The light carried on flashing for about 10 seconds after the message that it is safe to disconnect the device appeared. In future, if I use this feature, I will not rush to physically unplug the device.
 
Tedious as it is, I think I shall stick with logging in via ssh and running an explicit umount.

I've asked in the WebIF thread for something (e.g. button, diag script) to do this, too.
 
Back
Top