Closed bdoona closed 9 years ago
Current automount already mounts all partitions of the device, it just uses 'raw' devices as /dev/da* and so.
Adding mounting by SERIAL and/or LABEL is not a bad idea, but I do not have /dev/diskid dir on FreeBSD 10.1-STABLE (r276175).
% ls /dev/diskid ls: /dev/diskid: No such file or directory
Is the /dev/diskid available only at FreeBSD 9.x?
Regards, vermaden
On 01/21/2015 03:30, bdoona wrote:
- Added new option USEDISKIDENT. When active, this allows for the newly mounted device to be mounted to //. This means that each time the same device is connected, it will appear at the same location regardless of the order that it was connected.
- Added new option MOUNTALL. Somehow I've messed up the partitioning on my USB drive so that my UFS partition is located at da0a. Enabling this option allows for the drive to be scanned and have all identified partitions mounted.
- Updated the usage message.
- Corrected log entries in check_already_mounted(), wait_for_device(), wait_for_boot() and random_wait() to use the local parameter instead of the global DEV variable when outputting their message.
- Added local DEV parameters to wait_for_boot() and random_wait() for logging.
- Updated the MNT variable to concatenate the last part of the device name (stored in MNTNAME) instead of the script argument ${1}.
- Updated the blacklist detection so that the script will continue when a blacklisted device is detected.
- Removed the exit 0 for default case option to allow for further partitions to be processed.
- Updated the grep in the detach action to check for the current mount point instead of the script argument ${1}.
On 01/21/2015 03:30, bdoona wrote:
Enabling this option allows for the drive to be scanned and have all identified partitions mounted.
Here, 8 partition automatically mounted and unmounted by current automount:
% gpart show da0 => 34 15131569 da0 GPT (7.2G) 34 2097152 1 freebsd-ufs (1.0G) 2097186 2097152 2 freebsd-ufs (1.0G) 4194338 2097152 3 freebsd-ufs (1.0G) 6291490 2097152 4 freebsd-ufs (1.0G) 8388642 2097152 5 freebsd-ufs (1.0G) 10485794 2097152 6 freebsd-ufs (1.0G) 12582946 2097152 7 freebsd-ufs (1.0G) 14680098 451505 8 freebsd-ufs (220M)
% tail -f /var/log/automount.log 2015-01-21 14:00:32 /dev/da0: random wait for '2.2' seconds before 'attach' action 2015-01-21 14:00:32 /dev/da0: attach 2015-01-21 14:00:32 /dev/da0: filesystem not supported or no filesystem 2015-01-21 14:00:34 /dev/da0p1: random wait for '2.3' seconds before 'attach' action 2015-01-21 14:00:34 /dev/da0p1: attach 2015-01-21 14:00:34 /dev/da0p1: fsck_msdosfs * /dev/da0p1 2015-01-21 14:00:34 /dev/da0p1: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:34 /dev/da0p1: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:34 /dev/da0p1: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:34 /dev/da0p1: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:34 /dev/da0p1: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:34 /dev/da0p1: mount (fat) 2015-01-21 14:00:35 /dev/da0p2: random wait for '0.4' seconds before 'attach' action 2015-01-21 14:00:35 /dev/da0p2: attach 2015-01-21 14:00:35 /dev/da0p2: fsck_msdosfs * /dev/da0p2 2015-01-21 14:00:35 /dev/da0p2: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:35 /dev/da0p2: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:35 /dev/da0p2: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:35 /dev/da0p2: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:35 /dev/da0p2: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:35 /dev/da0p2: mount (fat) 2015-01-21 14:00:36 /dev/da0p3: random wait for '1.1' seconds before 'attach' action 2015-01-21 14:00:36 /dev/da0p3: attach 2015-01-21 14:00:36 /dev/da0p3: fsck_msdosfs * /dev/da0p3 2015-01-21 14:00:36 /dev/da0p3: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:36 /dev/da0p3: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:36 /dev/da0p3: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:36 /dev/da0p3: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:36 /dev/da0p3: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:36 /dev/da0p3: mount (fat) 2015-01-21 14:00:37 /dev/da0p4: random wait for '0.6' seconds before 'attach' action 2015-01-21 14:00:37 /dev/da0p4: attach 2015-01-21 14:00:37 /dev/da0p4: fsck_msdosfs * /dev/da0p4 2015-01-21 14:00:37 /dev/da0p4: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:37 /dev/da0p4: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:37 /dev/da0p4: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:37 /dev/da0p4: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:37 /dev/da0p4: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:37 /dev/da0p4: mount (fat) 2015-01-21 14:00:39 /dev/da0p5: random wait for '2.1' seconds before 'attach' action 2015-01-21 14:00:39 /dev/da0p5: attach 2015-01-21 14:00:39 /dev/da0p5: fsck_msdosfs * /dev/da0p5 2015-01-21 14:00:39 /dev/da0p5: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:39 /dev/da0p5: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:39 /dev/da0p5: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:39 /dev/da0p5: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:39 /dev/da0p5: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:39 /dev/da0p5: mount (fat) 2015-01-21 14:00:41 /dev/da0p6: random wait for '1.4' seconds before 'attach' action 2015-01-21 14:00:41 /dev/da0p6: attach 2015-01-21 14:00:41 /dev/da0p6: fsck_msdosfs * /dev/da0p6 2015-01-21 14:00:41 /dev/da0p6: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:41 /dev/da0p6: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:41 /dev/da0p6: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:41 /dev/da0p6: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:41 /dev/da0p6: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:41 /dev/da0p6: mount (fat) 2015-01-21 14:00:43 /dev/da0p7: random wait for '1.8' seconds before 'attach' action 2015-01-21 14:00:43 /dev/da0p7: attach 2015-01-21 14:00:43 /dev/da0p7: fsck_msdosfs * /dev/da0p7 2015-01-21 14:00:43 /dev/da0p7: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:43 /dev/da0p7: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:43 /dev/da0p7: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:43 /dev/da0p7: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:43 /dev/da0p7: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:43 /dev/da0p7: mount (fat) 2015-01-21 14:00:43 /dev/da0p8: random wait for '0.5' seconds before 'attach' action 2015-01-21 14:00:43 /dev/da0p8: attach 2015-01-21 14:00:43 /dev/da0p8: fsck_msdosfs * /dev/da0p8 2015-01-21 14:00:43 /dev/da0p8: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:43 /dev/da0p8: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:43 /dev/da0p8: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:43 /dev/da0p8: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:43 /dev/da0p8: fsck_msdosfs 1 files, 225600 free (28200 clusters) 2015-01-21 14:00:43 /dev/da0p8: mount (fat)
% tail -f /var/log/automount.log 2015-01-21 14:01:00 /dev/da0: detach 2015-01-21 14:01:00 /dev/da0: mount point '/media/da0' removed 2015-01-21 14:01:00 /dev/da0p8: detach 2015-01-21 14:01:00 /dev/da0p8: umount 2015-01-21 14:01:00 /dev/da0p8: mount point '/media/da0p8' removed 2015-01-21 14:01:00 /dev/da0p8: removed '/media/da0p8' 2015-01-21 14:01:00 /dev/da0p7: detach 2015-01-21 14:01:00 /dev/da0p7: umount 2015-01-21 14:01:00 /dev/da0p7: mount point '/media/da0p7' removed 2015-01-21 14:01:00 /dev/da0p7: removed '/media/da0p7' 2015-01-21 14:01:00 /dev/da0p6: detach 2015-01-21 14:01:00 /dev/da0p6: umount 2015-01-21 14:01:00 /dev/da0p6: removed '/media/da0p6' 2015-01-21 14:01:00 /dev/da0p6: mount point '/media/da0p6' removed 2015-01-21 14:01:01 /dev/da0p5: detach 2015-01-21 14:01:01 /dev/da0p5: umount 2015-01-21 14:01:01 /dev/da0p5: mount point '/media/da0p5' removed 2015-01-21 14:01:01 /dev/da0p5: removed '/media/da0p5' 2015-01-21 14:01:01 /dev/da0p4: detach 2015-01-21 14:01:01 /dev/da0p4: umount 2015-01-21 14:01:01 /dev/da0p4: removed '/media/da0p4' 2015-01-21 14:01:01 /dev/da0p4: mount point '/media/da0p4' removed 2015-01-21 14:01:01 /dev/da0p3: detach 2015-01-21 14:01:01 /dev/da0p3: umount 2015-01-21 14:01:01 /dev/da0p3: removed '/media/da0p3' 2015-01-21 14:01:01 /dev/da0p3: mount point '/media/da0p3' removed 2015-01-21 14:01:01 /dev/da0p2: detach 2015-01-21 14:01:01 /dev/da0p2: umount 2015-01-21 14:01:01 /dev/da0p2: removed '/media/da0p2' 2015-01-21 14:01:01 /dev/da0p2: mount point '/media/da0p2' removed 2015-01-21 14:01:01 /dev/da0p1: detach 2015-01-21 14:01:01 /dev/da0p1: umount 2015-01-21 14:01:01 /dev/da0p1: removed '/media/da0p1' 2015-01-21 14:01:01 /dev/da0p1: mount point '/media/da0p1' removed
Same for MBR partitions:
% gpart show da0 => 63 15131573 da0 MBR (7.2G) 63 2097144 1 fat32 (1.0G) 2097207 2097144 2 fat32 (1.0G) 4194351 2097144 3 fat32 (1.0G) 6291495 2097144 4 fat32 (1.0G) 8388639 6742997 - free - (3.2G)
% tail -f /var/log/automount.log 2015-01-21 14:10:02 /dev/da0: random wait for '0.0' seconds before 'attach' action 2015-01-21 14:10:02 /dev/da0: attach 2015-01-21 14:10:02 /dev/da0: filesystem not supported or no filesystem 2015-01-21 14:10:03 /dev/da0s1: random wait for '0.7' seconds before 'attach' action 2015-01-21 14:10:03 /dev/da0s1: attach 2015-01-21 14:10:03 /dev/da0s1: fsck_msdosfs * /dev/da0s1 2015-01-21 14:10:03 /dev/da0s1: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:10:03 /dev/da0s1: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:10:03 /dev/da0s1: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:10:03 /dev/da0s1: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:10:03 /dev/da0s1: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:10:03 /dev/da0s1: mount (fat) 2015-01-21 14:10:04 /dev/da0s2: random wait for '0.2' seconds before 'attach' action 2015-01-21 14:10:04 /dev/da0s2: attach 2015-01-21 14:10:04 /dev/da0s2: fsck_msdosfs * /dev/da0s2 2015-01-21 14:10:04 /dev/da0s2: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:10:04 /dev/da0s2: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:10:04 /dev/da0s2: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:10:04 /dev/da0s2: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:10:04 /dev/da0s2: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:10:04 /dev/da0s2: mount (fat) 2015-01-21 14:10:05 /dev/da0s3: random wait for '1.7' seconds before 'attach' action 2015-01-21 14:10:05 /dev/da0s3: attach 2015-01-21 14:10:05 /dev/da0s3: fsck_msdosfs * /dev/da0s3 2015-01-21 14:10:05 /dev/da0s3: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:10:05 /dev/da0s3: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:10:05 /dev/da0s3: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:10:05 /dev/da0s3: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:10:05 /dev/da0s3: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:10:05 /dev/da0s3: mount (fat) 2015-01-21 14:10:07 /dev/da0s4: random wait for '1.4' seconds before 'attach' action 2015-01-21 14:10:07 /dev/da0s4: attach 2015-01-21 14:10:07 /dev/da0s4: fsck_msdosfs * /dev/da0s4 2015-01-21 14:10:07 /dev/da0s4: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:10:07 /dev/da0s4: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:10:07 /dev/da0s4: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:10:07 /dev/da0s4: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:10:07 /dev/da0s4: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:10:07 /dev/da0s4: mount (fat)
% tail -f /var/log/automount.log 2015-01-21 14:10:17 /dev/da0: detach 2015-01-21 14:10:17 /dev/da0: mount point '/media/da0' removed 2015-01-21 14:10:17 /dev/da0s4: detach 2015-01-21 14:10:17 /dev/da0s4: umount 2015-01-21 14:10:17 /dev/da0s4: mount point '/media/da0s4' removed 2015-01-21 14:10:17 /dev/da0s4: removed '/media/da0s4' 2015-01-21 14:10:17 /dev/da0s3: detach 2015-01-21 14:10:17 /dev/da0s3: umount 2015-01-21 14:10:17 /dev/da0s3: removed '/media/da0s3' 2015-01-21 14:10:17 /dev/da0s3: mount point '/media/da0s3' removed 2015-01-21 14:10:17 /dev/da0s2: detach 2015-01-21 14:10:17 /dev/da0s2: umount 2015-01-21 14:10:17 /dev/da0s2: removed '/media/da0s2' 2015-01-21 14:10:17 /dev/da0s2: mount point '/media/da0s2' removed 2015-01-21 14:10:17 /dev/da0s1: detach 2015-01-21 14:10:17 /dev/da0s1: umount 2015-01-21 14:10:17 /dev/da0s1: mount point '/media/da0s1' removed 2015-01-21 14:10:17 /dev/da0s1: removed '/media/da0s1'
On 01/21/2015 14:04, vermaden wrote:
On 01/21/2015 03:30, bdoona wrote:
Enabling this option allows for the drive to be scanned and have all identified partitions mounted.
Here, 8 partition automatically mounted and unmounted by current automount:
% gpart show da0 => 34 15131569 da0 GPT (7.2G) 34 2097152 1 freebsd-ufs (1.0G) 2097186 2097152 2 freebsd-ufs (1.0G) 4194338 2097152 3 freebsd-ufs (1.0G) 6291490 2097152 4 freebsd-ufs (1.0G) 8388642 2097152 5 freebsd-ufs (1.0G) 10485794 2097152 6 freebsd-ufs (1.0G) 12582946 2097152 7 freebsd-ufs (1.0G) 14680098 451505 8 freebsd-ufs (220M)
% tail -f /var/log/automount.log 2015-01-21 14:00:32 /dev/da0: random wait for '2.2' seconds before 'attach' action 2015-01-21 14:00:32 /dev/da0: attach 2015-01-21 14:00:32 /dev/da0: filesystem not supported or no filesystem 2015-01-21 14:00:34 /dev/da0p1: random wait for '2.3' seconds before 'attach' action 2015-01-21 14:00:34 /dev/da0p1: attach 2015-01-21 14:00:34 /dev/da0p1: fsck_msdosfs * /dev/da0p1 2015-01-21 14:00:34 /dev/da0p1: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:34 /dev/da0p1: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:34 /dev/da0p1: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:34 /dev/da0p1: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:34 /dev/da0p1: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:34 /dev/da0p1: mount (fat) 2015-01-21 14:00:35 /dev/da0p2: random wait for '0.4' seconds before 'attach' action 2015-01-21 14:00:35 /dev/da0p2: attach 2015-01-21 14:00:35 /dev/da0p2: fsck_msdosfs * /dev/da0p2 2015-01-21 14:00:35 /dev/da0p2: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:35 /dev/da0p2: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:35 /dev/da0p2: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:35 /dev/da0p2: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:35 /dev/da0p2: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:35 /dev/da0p2: mount (fat) 2015-01-21 14:00:36 /dev/da0p3: random wait for '1.1' seconds before 'attach' action 2015-01-21 14:00:36 /dev/da0p3: attach 2015-01-21 14:00:36 /dev/da0p3: fsck_msdosfs * /dev/da0p3 2015-01-21 14:00:36 /dev/da0p3: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:36 /dev/da0p3: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:36 /dev/da0p3: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:36 /dev/da0p3: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:36 /dev/da0p3: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:36 /dev/da0p3: mount (fat) 2015-01-21 14:00:37 /dev/da0p4: random wait for '0.6' seconds before 'attach' action 2015-01-21 14:00:37 /dev/da0p4: attach 2015-01-21 14:00:37 /dev/da0p4: fsck_msdosfs * /dev/da0p4 2015-01-21 14:00:37 /dev/da0p4: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:37 /dev/da0p4: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:37 /dev/da0p4: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:37 /dev/da0p4: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:37 /dev/da0p4: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:37 /dev/da0p4: mount (fat) 2015-01-21 14:00:39 /dev/da0p5: random wait for '2.1' seconds before 'attach' action 2015-01-21 14:00:39 /dev/da0p5: attach 2015-01-21 14:00:39 /dev/da0p5: fsck_msdosfs * /dev/da0p5 2015-01-21 14:00:39 /dev/da0p5: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:39 /dev/da0p5: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:39 /dev/da0p5: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:39 /dev/da0p5: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:39 /dev/da0p5: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:39 /dev/da0p5: mount (fat) 2015-01-21 14:00:41 /dev/da0p6: random wait for '1.4' seconds before 'attach' action 2015-01-21 14:00:41 /dev/da0p6: attach 2015-01-21 14:00:41 /dev/da0p6: fsck_msdosfs * /dev/da0p6 2015-01-21 14:00:41 /dev/da0p6: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:41 /dev/da0p6: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:41 /dev/da0p6: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:41 /dev/da0p6: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:41 /dev/da0p6: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:41 /dev/da0p6: mount (fat) 2015-01-21 14:00:43 /dev/da0p7: random wait for '1.8' seconds before 'attach' action 2015-01-21 14:00:43 /dev/da0p7: attach 2015-01-21 14:00:43 /dev/da0p7: fsck_msdosfs * /dev/da0p7 2015-01-21 14:00:43 /dev/da0p7: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:43 /dev/da0p7: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:43 /dev/da0p7: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:43 /dev/da0p7: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:43 /dev/da0p7: fsck_msdosfs 1 files, 1048288 free (65518 clusters) 2015-01-21 14:00:43 /dev/da0p7: mount (fat) 2015-01-21 14:00:43 /dev/da0p8: random wait for '0.5' seconds before 'attach' action 2015-01-21 14:00:43 /dev/da0p8: attach 2015-01-21 14:00:43 /dev/da0p8: fsck_msdosfs * /dev/da0p8 2015-01-21 14:00:43 /dev/da0p8: fsck_msdosfs * Phase 1 - Read and Compare FATs 2015-01-21 14:00:43 /dev/da0p8: fsck_msdosfs * Phase 2 - Check Cluster Chains 2015-01-21 14:00:43 /dev/da0p8: fsck_msdosfs * Phase 3 - Checking Directories 2015-01-21 14:00:43 /dev/da0p8: fsck_msdosfs * Phase 4 - Checking for Lost Files 2015-01-21 14:00:43 /dev/da0p8: fsck_msdosfs 1 files, 225600 free (28200 clusters) 2015-01-21 14:00:43 /dev/da0p8: mount (fat)
% tail -f /var/log/automount.log 2015-01-21 14:01:00 /dev/da0: detach 2015-01-21 14:01:00 /dev/da0: mount point '/media/da0' removed 2015-01-21 14:01:00 /dev/da0p8: detach 2015-01-21 14:01:00 /dev/da0p8: umount 2015-01-21 14:01:00 /dev/da0p8: mount point '/media/da0p8' removed 2015-01-21 14:01:00 /dev/da0p8: removed '/media/da0p8' 2015-01-21 14:01:00 /dev/da0p7: detach 2015-01-21 14:01:00 /dev/da0p7: umount 2015-01-21 14:01:00 /dev/da0p7: mount point '/media/da0p7' removed 2015-01-21 14:01:00 /dev/da0p7: removed '/media/da0p7' 2015-01-21 14:01:00 /dev/da0p6: detach 2015-01-21 14:01:00 /dev/da0p6: umount 2015-01-21 14:01:00 /dev/da0p6: removed '/media/da0p6' 2015-01-21 14:01:00 /dev/da0p6: mount point '/media/da0p6' removed 2015-01-21 14:01:01 /dev/da0p5: detach 2015-01-21 14:01:01 /dev/da0p5: umount 2015-01-21 14:01:01 /dev/da0p5: mount point '/media/da0p5' removed 2015-01-21 14:01:01 /dev/da0p5: removed '/media/da0p5' 2015-01-21 14:01:01 /dev/da0p4: detach 2015-01-21 14:01:01 /dev/da0p4: umount 2015-01-21 14:01:01 /dev/da0p4: removed '/media/da0p4' 2015-01-21 14:01:01 /dev/da0p4: mount point '/media/da0p4' removed 2015-01-21 14:01:01 /dev/da0p3: detach 2015-01-21 14:01:01 /dev/da0p3: umount 2015-01-21 14:01:01 /dev/da0p3: removed '/media/da0p3' 2015-01-21 14:01:01 /dev/da0p3: mount point '/media/da0p3' removed 2015-01-21 14:01:01 /dev/da0p2: detach 2015-01-21 14:01:01 /dev/da0p2: umount 2015-01-21 14:01:01 /dev/da0p2: removed '/media/da0p2' 2015-01-21 14:01:01 /dev/da0p2: mount point '/media/da0p2' removed 2015-01-21 14:01:01 /dev/da0p1: detach 2015-01-21 14:01:01 /dev/da0p1: umount 2015-01-21 14:01:01 /dev/da0p1: removed '/media/da0p1' 2015-01-21 14:01:01 /dev/da0p1: mount point '/media/da0p1' removed
Hi vermaden,
Thanks for your response.
Re: Mounting all partitions I'm assuming that you know how to set up a disk properly! I must have done something wrong when I set mine up.
Here is what I get:
# gpart show /dev/da0
=> 0 3906963456 da0 BSD (1.8T)
0 16 - free - (8.0K)
16 3906963440 1 !0 (1.8T)
# ./automount --version
automount 1.5.1 2014/08/06
# /usr/local/sbin/automount da0 attach
[: -eq: unexpected operator (I'm seeing a script error in v1.5.1 on line 253 - WAIT is undefined)
# tail /var/log/automount.log
2015-01-22 08:58:51 /dev/da0: random wait for '0.6' seconds before 'attach' action
2015-01-22 08:58:51 /dev/da0: attach
2015-01-22 08:58:51 /dev/da0: filesystem not supported or no filesystem
So some further digging from line 297:
# file -k -b -L -s /dev/da0
DOS/MBR boot sector, BSD disklabel DOS executable (COM), boot code
So nothing matches in the case statement and the script drops out.
Any thoughts?
Re: Using the disk ident I had a feeling that the /dev/diskid/DISK-30313233 wouldn't be supported in earlier releases but I had a thought last night about using diskinfo to create the mount point instead of relying on the /dev/diskid/... device. I'll have another look at it over the weekend.
Once again, thanks taking the time to look at this.
Regards,
Peter.
|What filesystem is here?
=> 0 3906963456 da0 BSD (1.8T) 0 16 - free - (8.0K) 16 3906963440 1 !0 (1.8T)
So some further digging from line 297:
# file -k -b -L -s /dev/da0 DOS/MBR boot sector, BSD disklabel DOS executable (COM), boot code |
---|
On 01/21/2015 23:22, bdoona wrote:
Hi vermaden,
Thanks for your response.
Re: Mounting all partitions I'm assuming that you know how to set up a disk properly! I must have done something wrong when I set mine up.
Here is what I get:
|# gpart show /dev/da0 => 0 3906963456 da0 BSD (1.8T) 0 16 - free - (8.0K) 16 3906963440 1 !0 (1.8T)
./automount --version
automount 1.5.1 2014/08/06
/usr/local/sbin/automount da0 attach
[: -eq: unexpected operator (I'm seeing a script error in v1.5.1 on line 253 - WAIT is undefined)
tail /var/log/automount.log
2015-01-22 08:58:51 /dev/da0: random wait for '0.6' seconds before 'attach' action 2015-01-22 08:58:51 /dev/da0: attach 2015-01-22 08:58:51 /dev/da0: filesystem not supported or no filesystem |
So some further digging from line 297:
# file -k -b -L -s /dev/da0 DOS/MBR boot sector, BSD disklabel DOS executable (COM), boot code So nothing matches in the case statement and the script drops out.
Any thoughts?
Re: Using the disk ident I had a feeling that the /dev/diskid/DISK-30313233 wouldn't be supported in earlier releases but I had a thought last night about using diskinfo to create the mount point instead of relying on the /dev/diskid/... device. I'll have another look at it over the weekend.
Once again, thanks taking the time to look at this.
Regards,
Peter.
— Reply to this email directly or view it on GitHub https://github.com/vermaden/automount/pull/5#issuecomment-70933929.
Hi vermaden,
I'm physically away from any machines but I've made some changes based on a machine I can get to with a disk attached.
I've removed the dependency on /dev/diskid.
I haven't tested with MSDOS/NTFS partitions but the man page indicates that it should work.
Let me know if it works for your devices.
Regards,
Pete.
I don’t know the filesystem. da0a is ufs. I thought I’d set up the disk from the handbook. I don’t format enough disks to know how to do it without using a reference.
From: vermaden [mailto:notifications@github.com] Sent: Thursday, 22 January 2015 19:25 To: vermaden/automount Cc: bdoona Subject: Re: [automount] New options for mount points per device and multiple partitions (#5)
|What filesystem is here?
=> 0 3906963456 da0 BSD (1.8T) 0 16 - free - (8.0K) 16 3906963440 1 !0 (1.8T)
So some further digging from line 297:
# file -k -b -L -s /dev/da0 DOS/MBR boot sector, BSD disklabel DOS executable (COM), boot code |
---|
On 01/21/2015 23:22, bdoona wrote:
Hi vermaden,
Thanks for your response.
Re: Mounting all partitions I'm assuming that you know how to set up a disk properly! I must have done something wrong when I set mine up.
Here is what I get:
|# gpart show /dev/da0 => 0 3906963456 da0 BSD (1.8T) 0 16 - free - (8.0K) 16 3906963440 1 !0 (1.8T)
./automount --version
automount 1.5.1 2014/08/06
/usr/local/sbin/automount da0 attach
[: -eq: unexpected operator (I'm seeing a script error in v1.5.1 on line 253 - WAIT is undefined)
tail /var/log/automount.log
2015-01-22 08:58:51 /dev/da0: random wait for '0.6' seconds before 'attach' action 2015-01-22 08:58:51 /dev/da0: attach 2015-01-22 08:58:51 /dev/da0: filesystem not supported or no filesystem |
So some further digging from line 297:
# file -k -b -L -s /dev/da0 DOS/MBR boot sector, BSD disklabel DOS executable (COM), boot code So nothing matches in the case statement and the script drops out.
Any thoughts?
Re: Using the disk ident I had a feeling that the /dev/diskid/DISK-30313233 wouldn't be supported in earlier releases but I had a thought last night about using diskinfo to create the mount point instead of relying on the /dev/diskid/... device. I'll have another look at it over the weekend.
Once again, thanks taking the time to look at this.
Regards,
Peter.
— Reply to this email directly or view it on GitHub https://github.com/vermaden/automount/pull/5#issuecomment-70933929.
— Reply to this email directly or view it on GitHub https://github.com/vermaden/automount/pull/5#issuecomment-70986269 . https://github.com/notifications/beacon/AEzG6RLCOCpJvqq6ywfIFfbk1wR6Jr2-ks5nkKtggaJpZM4DVAwP.gif
Automount moutns UFS with that setup without a problem, it says that there is no FS on da0 (which is true) and mount da0a ... does it work like that on Your system?
On 01/24/2015 09:28, bdoona wrote:
I don’t know the filesystem. da0a is ufs. I thought I’d set up the disk from the handbook. I don’t format enough disks to know how to do it without using a reference.
From: vermaden [mailto:notifications@github.com] Sent: Thursday, 22 January 2015 19:25 To: vermaden/automount Cc: bdoona Subject: Re: [automount] New options for mount points per device and multiple partitions (#5)
|What filesystem is here?
gpart show /dev/da0
=> 0 3906963456 da0 BSD (1.8T) 0 16 - free - (8.0K) 16 3906963440 1 !0 (1.8T)
So some further digging from line 297:
# file -k -b -L -s /dev/da0 DOS/MBR boot sector, BSD disklabel DOS executable (COM), boot code On 01/21/2015 23:22, bdoona wrote:
Hi vermaden,
Thanks for your response.
Re: Mounting all partitions I'm assuming that you know how to set up a disk properly! I must have done something wrong when I set mine up.
Here is what I get:
|# gpart show /dev/da0 => 0 3906963456 da0 BSD (1.8T) 0 16 - free - (8.0K) 16 3906963440 1 !0 (1.8T)
./automount --version
automount 1.5.1 2014/08/06
/usr/local/sbin/automount da0 attach
[: -eq: unexpected operator (I'm seeing a script error in v1.5.1 on line 253 - WAIT is undefined)
tail /var/log/automount.log
2015-01-22 08:58:51 /dev/da0: random wait for '0.6' seconds before 'attach' action 2015-01-22 08:58:51 /dev/da0: attach 2015-01-22 08:58:51 /dev/da0: filesystem not supported or no filesystem |
So some further digging from line 297:
# file -k -b -L -s /dev/da0 DOS/MBR boot sector, BSD disklabel DOS executable (COM), boot code So nothing matches in the case statement and the script drops out.
Any thoughts?
Re: Using the disk ident I had a feeling that the /dev/diskid/DISK-30313233 wouldn't be supported in earlier releases but I had a thought last night about using diskinfo to create the mount point instead of relying on the /dev/diskid/... device. I'll have another look at it over the weekend.
Once again, thanks taking the time to look at this.
Regards,
Peter.
— Reply to this email directly or view it on GitHub https://github.com/vermaden/automount/pull/5#issuecomment-70933929.
— Reply to this email directly or view it on GitHub https://github.com/vermaden/automount/pull/5#issuecomment-70986269 . https://github.com/notifications/beacon/AEzG6RLCOCpJvqq6ywfIFfbk1wR6Jr2-ks5nkKtggaJpZM4DVAwP.gif
— Reply to this email directly or view it on GitHub https://github.com/vermaden/automount/pull/5#issuecomment-71305127.
I've made another update to the script to use labels and removed the MOUNTALL option.
My disk wouldn't mount the old way.
Hi vermaden,
My changes still need work. I'm closing this off for now and I'll try again when I have time.
Thanks,
Peter.
Hi vermaden,
I needed to make some additions to your script to integrate with a system that I have. I thought that others might find the changes useful so feel free to merge them if you agree.
Everything should be backwards compatible. I only have a 10.1 system to check them on but my additions were based on a script that I had from a 9.X. The key differences will be if older systems also mount disks at /dev/diskid/DISK-
The changes are listed below.
Regards,
Peter.
Changes made: