Only root can do mount/umount operations. So either add yourself to the doas.conf(5) file or run the commands below as root.
To use the mount(8) and umount(8)
commands in conjunction with doas, bust open the /etc/doas.conf file as root and add the following
permit nopass ronin as root cmd mount
permit nopass ronin as root cmd umount
This would give the user ronin, the ability to run both mount and umount without asking for a password.
Plug in your drive and run $ dmesg
...
sd1 at scsibus4 targ 1 lun 0: <SanDisk, Ultra, 1.00> SCSI4 0/direct removable
serial.0781558a581121115061
sd1: 14664MB, 512 bytes/sector, 30031872 sectors
...
My drive is sd1. Get its partition info with $ disklabel sd1
...
# size offset fstype [fsize bsize cpg]
c: 30031872 0 unused
i: 960 64 MSDOS
j: 30027776 2048 MSDOS
...
Make a directory to mount the device and mount.
# mkdir /mnt/usb
# mount /dev/sd1i /mnt/usb
# ls /mnt/usb
...
#
To unmount, leave the /mnt/usb folder and issue umount.
# cd
# umount /mnt/usb
#
OpenBSD doesn't do well with NTFS.
The default mount command will give us permission to read, but not write. To properly use a disk
formatted with NTFS, i.e.. do both reads and writes, we'll need a package called ntfs_3g
# pkg_add ntfs_3g
# ntfs-3g /dev/sd1i /mnt/usb
# ls /mnt/usb
...
#
# umount /mnt/usb
The default mount command on a foreign filesystem, gives us a read-only error.
Here's the thread that saved me from banging my head on the table.