Thanks for the tips.
/"//I thought you had to use NTFS-3g to write to NTFS. Also, don't these things have labels? It's much more readable and simpler to mount a thing with a label than a UUID if you can. //"
/I used the UUID based on a Pluralsight course I watched on Raspberry Pi. I like it better than a label, since labels can be easily changed (esp. in Windows) whereas a partition UUID would only change if the drive were re-partitioned (highly unlikely). And I'm not terribly concerned about "unsightly-ness" in a config file (a simple comment will tell me what it is). I have the ntfs-3g package loaded and the mount -t ntfs is actually using ntfs-3g behind the scenes.
/"Backup script should check whether the disks are mounted or not? "/
Any suggestions on how I could check whether a drive is mounted? Some kind of combination of lsblk & grep??
Thanks
Peter
On 9/9/2020 3:52 PM, Matt Graham via PLUG-discuss wrote:
>> AZ Pete via PLUG-discuss wrote:
>>> However, currently I have to manually mount each of the external
>>> drives. This isn't a terribly big issue since the drives are
>>> rotated to offsite storage only once per month. But, if the Pi
>>> gets rebooted, the drives are not being auto-mounted and the
>>> backups will then fail.
>
> Backup script should check whether the disks are mounted or not? But read on.
>
>>> /etc/fstab to auto-mount them at boot, but if they drives are
>>> not connected at boot time, I've found the the Pi doesn't boot
>>> (it just seems to hang).
>
> If a thing may not be there, it is not recommended to auto-mount it on boot.
>
>>> mount -t ntfs PARTUUID=c6040663-9321-4d28-91f0-2f3eb35f72b7 /mnt/Ext3TB_Data1/
>
> I thought you had to use NTFS-3g to write to NTFS. Also, don't these things have labels? It's much more readable and simpler to mount a thing with a label than a UUID if you can.
>
>>> How can I "conditionally" mount an external drive based on if
>>> the drive is currently connected?
> On 2020-09-09 14:13, James Mcphee via PLUG-discuss wrote:
>> autofs or udev rules would be your best bet.
>
> https://wiki.archlinux.org/index.php/Udev#Mounting_drives_in_rules explains how to do this sort of thing using udev and systemd (yeck!). udev is not really meant for starting a long-running process, so there is a workaround.
>
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss