[FreeBSD] Mounting in FreeBSD - BSD

Users browsing this thread: 3 Guest(s)
.
trvlrs
Registered
This was awesome have you created the auto mount on boot?
venam
Administrators
I don't know if this is useful for FreeBSD but I'd like to add that sometimes you need to check if the mounted device is in use before unmounting it this can be done with the lsof command.
Also, you can check if the usb is mounted from the logs or from /proc/mounts or /proc/devices (usb_device) or /proc/partitions or from "df -h".
You can unmount the device directly if you still remember its name:
umount /dev/sdb
"There's always another way to do it" -- William Johny Cash Shakaspeare while doing a 360 loop in space.
zygotb
Long time nixers
For USB connected devices, one may list connected - yet unmounted - devices with the camcontrol command:
Code:
camcontrol devlist
<ST9160310AS 0303>                 at scbus0 target 0 lun 0 (pass0,ada0)
<PNY USB 2.0 FD 1100>              at scbus3 target 0 lun 0 (da0,pass1)

Note the difference between
Code:
ada0
and
Code:
da0

In my instance, ada0 is my hdd, and da0 is my USB flash drive.

For me, it's a lot easier to discern my various media labels using camcontrol devlist than it is to grep through the output of dmesg.
Someone doesn't appreciate my php generated image!
zygotb
Long time nixers
I don't know about you, but the output of dmesg is sort of cryptic, and doesn't tell me what my system has named my removable device(s.)

Here's the relevant output from dmesg:
Code:
ugen4.3: <PNY Technologies> at usbus4
umass0: <PNY Technologies USB 2.0 FD, class 0/0, rev 2.00/11.00, addr 3> on usbus4
umass0:  SCSI over Bulk-Only; quirks = 0x0100
umass0:3:0:-1: Attached to scbus3
da0 at umass-sim0 bus 0 scbus3 target 0 lun 0
da0: <PNY USB 2.0 FD 1100> Removable Direct Access SCSI-4 device
da0: 40.000MB/s transfers
da0: 15600MB (31950720 512 byte sectors: 255H 63S/T 1988C)

It does give more info, but the info is more difficult for an idiot such as myself to comprehend. :D
Someone doesn't appreciate my php generated image!