I wanted to backup some files on my external hard disk and just barely managed to do so, because it randomly unmounted and mounted again. My first thought was that the hard disk's life is about to end. But then I also inserted my usb stick, which is brand new, and the same thing happened. Does anyone have any idea what to do to fix this? Sorry if this has already been asked, but I really searched a lot to no avail, before posting here.
It actually sounds more like an issue with your computer's hardware than an Ubuntu specific issue. Do you have issues with all USB devices, or is it just disk drives?
You could plug something in and use lsusb
to check if the device is actually there and unmounted or if it's physically becoming disconnected due to some fault with the USB ports.
You could also try it in a different USB port. Sorry if this sounds obvious, but sometimes the simplest solutions are the best.