Other Autofs -media mount efi partition.

Hello,

I would like to use autofs(5) to mount removable disk. I followed the HandBook Automounting Removable media section. However, this mount a device
/dev/ada1p1 which seems to be an efi partition :
$ ls /media/ada1p1/
efi

and
$ /etc/autofs/special_media ada1p1
-fstype=msdosfs,nosuid,async :/dev/ada1p1


I am not happy with this, because there is no reason to clutter /media with this. I read the devd.conf(5) maybe to block some special file but I did not succeed.
 
This sounds very much like the linked thread below. Why not try to mount ada1p2?:
 
Thanks, I read it but it does not answered my question. The reason I would not have this partition mounted is because I do not understand why it is available to be mounted! I know autofs will mount everything he can. Let see below my configuration : I have essentially 2 disks, ada0 and ada1

Code:
$ geom disk list
Geom name: ada0
Providers:
1. Name: ada0
   Mediasize: 256060514304 (238G)
   Sectorsize: 512
   Mode: r3w3e6
   descr: SAMSUNG PM881 SATA 256GB
   lunid: 5002538e41627931
   ident: S58PNX0R605072
   rotationrate: 0
   fwsectors: 63
   fwheads: 16

Geom name: ada1
Providers:
1. Name: ada1
   Mediasize: 256060514304 (238G)
   Sectorsize: 512
   Mode: r2w2e3
   descr: SAMSUNG PM881 SATA 256GB
   lunid: 5002538e4162792c
   ident: S58PNX0R605067
   rotationrate: 0
   fwsectors: 63
   fwheads: 16

Geom name: da0
Providers:
1. Name: da0
   Mediasize: 0 (0B)
   Sectorsize: 512
   Mode: r0w0e0
   descr: Generic- SD/MMC CRW
   lunid: 00e04c2020202000
   ident: 28203008282014000
   rotationrate: unknown
   fwsectors: 0
   fwheads: 0

Both has a 4 partitions (efiboot, gptboot, swap, zfs)

Code:
$ geom part list
Geom name: ada0
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 500118151
first: 40
entries: 128
scheme: GPT
Providers:
1. Name: ada0p1
   Mediasize: 272629760 (260M)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 20480
   Mode: r1w1e2
   efimedia: HD(1,GPT,5d796fe3-0938-11ee-b32d-b07b251ee704,0x28,0x82000)
   rawuuid: 5d796fe3-0938-11ee-b32d-b07b251ee704
   rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
   label: efiboot0
   length: 272629760
   offset: 20480
   type: efi
   index: 1
   end: 532519
   start: 40
2. Name: ada0p2
   Mediasize: 524288 (512K)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 272650240
   Mode: r0w0e0
   efimedia: HD(2,GPT,5d7c7dfc-0938-11ee-b32d-b07b251ee704,0x82028,0x400)
   rawuuid: 5d7c7dfc-0938-11ee-b32d-b07b251ee704
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: gptboot0
   length: 524288
   offset: 272650240
   type: freebsd-boot
   index: 2
   end: 533543
   start: 532520
3. Name: ada0p3
   Mediasize: 2147483648 (2.0G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 273678336
   Mode: r1w1e0
   efimedia: HD(3,GPT,5d81f5b3-0938-11ee-b32d-b07b251ee704,0x82800,0x400000)
   rawuuid: 5d81f5b3-0938-11ee-b32d-b07b251ee704
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: swap0
   length: 2147483648
   offset: 273678336
   type: freebsd-swap
   index: 3
   end: 4728831
   start: 534528
4. Name: ada0p4
   Mediasize: 253639000064 (236G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 2421161984
   Mode: r1w1e1
   efimedia: HD(4,GPT,5d86264d-0938-11ee-b32d-b07b251ee704,0x482800,0x1d870800)
   rawuuid: 5d86264d-0938-11ee-b32d-b07b251ee704
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: zfs0
   length: 253639000064
   offset: 2421161984
   type: freebsd-zfs
   index: 4
   end: 500117503
   start: 4728832
Consumers:
1. Name: ada0
   Mediasize: 256060514304 (238G)
   Sectorsize: 512
   Mode: r3w3e6

Geom name: ada1
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 500118151
first: 40
entries: 128
scheme: GPT
Providers:
1. Name: ada1p1
   Mediasize: 272629760 (260M)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 20480
   Mode: r0w0e0
   efimedia: HD(1,GPT,5d948c51-0938-11ee-b32d-b07b251ee704,0x28,0x82000)
   rawuuid: 5d948c51-0938-11ee-b32d-b07b251ee704
   rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
   label: efiboot1
   length: 272629760
   offset: 20480
   type: efi
   index: 1
   end: 532519
   start: 40
2. Name: ada1p2
   Mediasize: 524288 (512K)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 272650240
   Mode: r0w0e0
   efimedia: HD(2,GPT,5d966185-0938-11ee-b32d-b07b251ee704,0x82028,0x400)
   rawuuid: 5d966185-0938-11ee-b32d-b07b251ee704
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: gptboot1
   length: 524288
   offset: 272650240
   type: freebsd-boot
   index: 2
   end: 533543
   start: 532520
3. Name: ada1p3
   Mediasize: 2147483648 (2.0G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 273678336
   Mode: r1w1e0
   efimedia: HD(3,GPT,5d9beea5-0938-11ee-b32d-b07b251ee704,0x82800,0x400000)
   rawuuid: 5d9beea5-0938-11ee-b32d-b07b251ee704
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: swap1
   length: 2147483648
   offset: 273678336
   type: freebsd-swap
   index: 3
   end: 4728831
   start: 534528
4. Name: ada1p4
   Mediasize: 253639000064 (236G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 2421161984
   Mode: r1w1e1
   efimedia: HD(4,GPT,5da10382-0938-11ee-b32d-b07b251ee704,0x482800,0x1d870800)
   rawuuid: 5da10382-0938-11ee-b32d-b07b251ee704
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: zfs1
   length: 253639000064
   offset: 2421161984
   type: freebsd-zfs
   index: 4
   end: 500117503
   start: 4728832
Consumers:
1. Name: ada1
   Mediasize: 256060514304 (238G)
   Sectorsize: 512
   Mode: r2w2e3

I use ZFS and mirrored my filesystem so that partition 4 (zfs) is :

Code:
$ zpool status
  pool: zroot
 state: ONLINE
config:

    NAME        STATE     READ WRITE CKSUM
    zroot       ONLINE       0     0     0
      mirror-0  ONLINE       0     0     0
        ada0p4  ONLINE       0     0     0
        ada1p4  ONLINE       0     0     0

We see that partition 3 (swap) are mounted:

Code:
 $ cat /etc/fstab 
# Device        Mountpoint    FStype    Options        Dump    Pass#
/dev/gpt/efiboot0        /boot/efi    msdosfs    rw        2    2
/dev/ada0p3        none    swap    sw        0    0
/dev/ada1p3        none    swap    sw        0    0

As well as efiboot0 which is ada0p1 (i do not known a command to confirm that). See also :

Code:
df -h
Filesystem               Size    Used   Avail Capacity  Mounted on
zroot/ROOT/default       218G    6,2G    211G     3%    /
devfs                    1,0K    1,0K      0B   100%    /dev
/dev/gpt/efiboot0        260M    1,8M    258M     1%    /boot/efi
zroot/tmp                211G    136K    211G     0%    /tmp
zroot/var/log            211G     30M    211G     0%    /var/log
zroot/usr/home           212G    108M    211G     0%    /usr/home
zroot                    211G     96K    211G     0%    /zroot
zroot/var/audit          211G     96K    211G     0%    /var/audit
zroot/var/mail           212G    992M    211G     0%    /var/mail
zroot/usr/src            212G    773M    211G     0%    /usr/src
zroot/usr/ports          221G    9,2G    211G     4%    /usr/ports
zroot/var/tmp            211G     96K    211G     0%    /var/tmp
zroot/var/crash          211G     96K    211G     0%    /var/crash
zroot/usr/home/shared    211G     96K    211G     0%    /usr/home/shared
map -hosts                 0B      0B      0B   100%    /net
map -media                 0B      0B      0B   100%    /media

I do not know where are gtp partitions (ada0p2 and ada1p2) but what I understand is that efiboot1 (ada1p1) is a "mirror" of efiboot0 (ada0p0). So why it is available to be mounted, or how to avoid this ? because I do not want to have twice the same partition to be mounted. Thanks for your help.
 
I've had trouble with automount all yesterday trying to dump my ext4 backups to my zpool. I'm about to install Linux and just sftp everything over. It's so annoying when geom complains about my disks even when in Sata in the box.
 
Back
Top