USB external hard drive -- mounting
- Date: Mon, 28 Aug 2017 14:25:15 -0700
- From: "James H. H. Lampert" <jamesl@xxxxxxxxxxxxxxxxx>
- Subject: USB external hard drive -- mounting
I'm in the process of setting up a new server, running Debian Jessie
8.9, replacing a Windows Server 2003 box (the same physical hardware).
One of the functions of this server is to automatically (via a script
run from cron) back up data (mostly on other servers, via FTP and SCP)
from other servers in the network, to a USB external hard drive.
I was pleasantly shocked when the NTFS-formatted USB drive auto-mounted
as read/write, as soon as I plugged it in, without my having to apt-get
So far, I've got one of these auto-backup scripts working, after a
fashion. But there are problems: because the external drive is currently
auto-mounted, (1) the location of the drive in the file system is
dependent on what user was signed on to the Gnome desktop when it
auto-mounted, and (2) if no user signs on to the Gnome desktop, it
doesn't get mounted anywhere.
In addition, it mounts as "/media/<user>/Seagate Expansion Drive". Not
only is this a bit of a mouthful when specifying a pathname in a script,
and dependent on what user is signed on when it auto-mounts; it's also
dependent on that physical drive (or another self-identifying the same),
which would make swapping it out for a new drive potentially problematic.
And when it is unmounted, the mountpoint goes away.
I can't even determine *what* is doing the auto-mounting, and the more I
read, the more confused I get: I see automount; I see usbmount; I see
pmount; I've barely figured out how to see what packages are installed,
and nothing jumps out at me as being what's auto-mounting the drive.
Can anybody advise me on how to set this thing up so that if it's
plugged in, it will mount, to a consistent mountpoint, whether anybody's
signed on to Gnome or not? And when it's inevitably replaced, its
replacement will continue to do so?
James H. H. Lampert