USB Automount does not work on Boot (Pogoplug Pro) April 10, 2019 08:36PM |
Registered: 9 years ago Posts: 104 |
root@sch:/media# cat /etc/debian_version 9.8 root@sch:/media# uname -r 4.4.176-oxnas-tld-1 root@sch:/media# cat /etc/udev/rules.d/90-media-by-label-auto-mount.rules # NOTE: # 1. use pmount --sync if drive label ends with Sync/SYNC/sync in add action to allow removal without corruption # 2. avoid mounting EFI partition for a HFS+ drive # 3. force mount HFS+ partition as read-write # 4. mount USB hardrive (which is identified as SSCI) KERNEL!="sd*", GOTO="media_label_end" ENV{ID_TYPE}!="disk", GOTO="media_label_end" IMPORT{program}="/sbin/blkid -o udev -p %N", ENV{name}="%E{ID_FS_LABEL}" ENV{ID_FS_TYPE}=="", GOTO="media_label_end" ENV{ID_FS_LABEL}!="EFI", GOTO="continue" ENV{ID_PART_TABLE_TYPE}=="gpt", GOTO="media_label_end" LABEL="continue" ENV{name}=="", ENV{name}="%k" KERNEL=="sd*", SYMLINK+="usb-storage/%E{name}" ENV{name}=="*SYNC", ENV{mode}="--sync" ENV{name}=="*Sync", ENV{mode}="--sync" ENV{name}=="*sync", ENV{mode}="--sync" ENV{name}!="*SYNC", ENV{mode}="" ENV{ID_FS_TYPE}=="hfsplus", ENV{mode2}="--read-write" ENV{ID_FS_TYPE}=="hfsplus", ENV{mode3}="/bin/mount -v -o remount,force,rw /media/%E{name}" ENV{ID_FS_TYPE}!="hfsplus", ENV{mode3}="/usr/bin/pmount" ACTION=="add", RUN+="/usr/bin/pmount -t %E{ID_FS_TYPE} %E{mode} %E{mode2} --noatime --umask 000 %k %E{name}" ACTION=="add", RUN+="%E{mode3}" ACTION=="remove", RUN+="/usr/bin/pumount --yes-I-really-want-lazy-unmount %E{name}" LABEL="media_label_end"
[ 3.543672] sd 1:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB) [ 3.544506] sd 1:0:0:0: [sdb] Write Protect is off [ 3.544527] sd 1:0:0:0: [sdb] Mode Sense: 28 00 00 00 [ 3.545418] sd 1:0:0:0: [sdb] No Caching mode page found [ 3.545431] sd 1:0:0:0: [sdb] Assuming drive cache: write through [ 3.575503] sdb: sdb1 [ 3.582901] sd 1:0:0:0: [sdb] Attached SCSI disk
root@sch:/media# fsck /dev/sdb1 fsck from util-linux 2.29.2 e2fsck 1.43.4 (31-Jan-2017) /dev/sdb1 is in use. e2fsck: Cannot continue, aborting. root@sch:/media# umount /dev/sdb1 umount: /dev/sdb1: not mounted
root@schnas:/media/Data# ls -l total 8 drwxr-xr-x 2 root root 4096 Nov 3 2016 . drwxr-xr-x 4 root root 4096 Nov 3 2016 .. -rw------- 1 root root 0 Nov 3 2016 .created_by_pmountNote: not sure why the dates are set to 2016, probably during boot gets false datetime value
Re: USB Automount does not work on Boot (Pogoplug Pro) April 11, 2019 12:24AM |
Admin Registered: 13 years ago Posts: 19,092 |
Re: USB Automount does not work on Boot (Pogoplug Pro) April 11, 2019 03:09PM |
Registered: 9 years ago Posts: 104 |
Re: USB Automount does not work on Boot (Pogoplug Pro) April 11, 2019 04:32PM |
Admin Registered: 13 years ago Posts: 19,092 |
Re: USB Automount does not work on Boot (Pogoplug Pro) April 11, 2019 10:12PM |
Registered: 9 years ago Posts: 104 |
Re: USB Automount does not work on Boot (Pogoplug Pro) April 11, 2019 11:54PM |
Admin Registered: 13 years ago Posts: 19,092 |
Re: USB Automount does not work on Boot (Pogoplug Pro) April 14, 2019 12:10PM |
Registered: 9 years ago Posts: 104 |
.include /usr/lib/systemd/system/systemd-udevd.service [Service] MountFlags=sharedOption 1create a new directory and file /etc/systemd/system/systemd-udevd.service.d/myoverride.conf with contents
[Service] MountFlags=shared