I have a hard drive (either spinning or pen drive) which gets auto-mounted to /media/pi/ (where the PID varies from one drive to another but is fixed for any given drive). However the /dev/sd1 raw device changes from sda1 to sdb1 to sdc1 etc if the device gets disconnected and reconnected, which precludes auto-mounting /dev/sda1 to the path where I want it.
I tried making a symbolic link from the /media/pi/ location to the mount point that I wanted (doesn't have to be below /mnt), but unfortunately the software that will be writing to this location (TVheadend PVR software) doesn't want to write if I specify the symbolic link or even the /media/pi/ location, even though ownership and chmods are correct. The same thing happened with bind-mounting. For some bizarre reason, only a proper mount (mount /dev/sda -t exfat /mnt/recordings) allows the software to write.
Any suggestions. On Windows, you can be pretty damn certain that once a device has been plugged in and the relevant "always use this drive letter" box (or however it is stated) has been ticked, you will always get the drive on that letter, and so you can refer to it as "D:\" in pathnames. With UNIX it seems that the /dev/sd1 (the equivalent of the drive letter) is not fixed.
This is for a Pi that has no other disk-like devices - only keyboard, mouse and DVB-T TV decoders - so it's not a case of two different disks jockeying for first position /dev/sda1.
I suppose I *could* write to the SD card instead of an external drive, and hope that I don't record too much to it before I have chance to move recordings to the computer where they will live permanently. I'm reluctant to specify a network share in case the network happens to go down: my experience with //server/sharename Samba paths is that they are not quite100% reliable. And the whole point of using the Pi as the recording device is that is will be the only device that is powered on 24/7, removing the need to leave another computer on to be the receiving point for network-shared files.