Tested on OpenBSD 6.3.
Only root can mount(8) file systems on OpenBSD, a regular user should run mount(8) via doas(1).
Plug in a USB drive and check system messages:
# dmesg sd1 at scsibus2 targ 1 lun 0: <Vendor, Model, 1.26> SCSI3 0/direct removable serial.12345678901234568789 sd1: 7633MB, 512 bytes/sector, 15633408 sectors #
Check partitions:
# disklabel sd1 ... size offset fstype [fsize bsize cpg] a: 736256 1024 4.2BSD 2048 16384 16142 c: 15633408 0 unused i: 960 64 MSDOS #
To mount a partition, for example, a:), use /dev/sd1a device.
Create a mount point directory, for example, /mnt/usb-drive, and mount the drive:
# mkdir -p /mnt/usb-drive # mount /dev/sd1a /mnt/usb-drive # ls /mnt/usb-drive ... #
It’s mounted.
Before disconnecting the drive from the USB port, unmount it. Leave mount point directory and then use it as an argument for unmount(8).
# cd # umount /mnt/usb-drive #
Or you can address your device directly:
# umount /dev/sd1a #