can't umount usb device

umount: /media/WD_My_Passport_0827_575857314534353345523254_s1: not a file system root directory

The problem started by plugging in an external hard drive. Then trying to mount a 7.5 flashdrive that won't umount either and it reports
it has 215G storage.

I turned off vfs.usermount
___________________________________________________
file -s /dev/da0
/dev/da0: DOS/MBR boot sector MS-MBR XP english at offset 0x12c "Invalid partition table" at offset 0x144 "Error loading operating system" at offset 0x163 "Missing ope
rating system", disk signature 0xdb09efba; partition 1 : ID=0x7, start-CHS (0x0,32,33), end-CHS (0x3ff,254,63), startsector 2048, 1953456128 sectors
 
Also show
Code:
camcontrol devlist
geom disk list
gpart status
gpart show -lp
gpart show -lp da0

gpart recover    # to fix broken uefi gpart header or table

Just an idea to get more visibility. You have to close any open windows that view the mounted disk files before being able to umount /dev/da0
Code:
cd  /
# from /media/da0 directory
umount /media/da0






Best of luck learning freebsd.
 
Well, I was going to reinstall my friends' laptop tomorrow. but since I got replies I'll post the information tomorrow. He took the laptop home to watch movies. He says he has ebooks on the external hard drive. I advised him not to use it anymore but I want to try 'gpart recover' how do I point gpart recover to the external hard-drive?

He had a stroke so I don't think he can text me the output tonight.
 
Show us the output of /sbin/mount and sudo fuser -c /dev/da0.
/sbin/mount
Code:
zroot/ROOT/default on / (zfs, local, noatime, nfsv4acls)
devfs on /dev (devfs)
zroot/usr/home on /usr/home (zfs, local, noatime, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/mail on /var/mail (zfs, local, nfsv4acls)
zroot on /zroot (zfs, local, noatime, nfsv4acls)
zroot/var/audit on /var/audit (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/compat on /compat (zfs, local, noatime, nfsv4acls)
zroot/usr/ports on /usr/ports (zfs, local, noatime, nosuid, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, noatime, nosuid, nfsv4acls)
zroot/var/crash on /var/crash (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/usr/src on /usr/src (zfs, local, noatime, nfsv4acls)
zroot/tmp on /tmp (zfs, local, noatime, nosuid, nfsv4acls)
_____________________________________________________________________________
fuser -c /dev/da0
Code:
/dev/da0:   352w  1504yw  1600yw  1377w  1473yw  1633w  1474yw  1506w  1475yw  17
31w  1476yw  1508w  1668yw  1445w  1477yw  1605yw  1478yw  1734w  1479yw  1575yw
 1607yw  1448w  1480yw  1608yw  1513yw  1577w  1609yw  1546yw  1610yw  1611yw  14
84yw  1548yw  1612yw  1454w  1487yw  1551w  2192w  1457w  4274yw  1074w  1586yw 
2291w   371w  2292yw   436w  1524yw  1588yw  1620w  1525w   374w  1302w  1590w  1
591yw  2584yw  1592yw  1593yw  1689yw  1530yw  1594yw  1499yw  1563w  1500yw  169
2yw  1533w  1597yw  1566w  2367yw  1503yw  1535w  1727yw
 
Also show
Code:
camcontrol devlist
geom disk list
gpart status
gpart show -lp
gpart show -lp da0

gpart recover    # to fix broken uefi gpart header or table

Just an idea to get more visibility. You have to close any open windows that view the mounted disk files before being able to umount /dev/da0
Code:
cd  /
# from /media/da0 directory
umount /media/da0






Best of luck learning freebsd.
camcontrol devlist
Code:
<Micron 1100 SATA 256GB M0DL020>   at scbus0 target 0 lun 0 (pass0,ada0)
<WD My Passport 0827 1012>         at scbus1 target 0 lun 0 (da0,pass1)
<WD SES Device 1012>               at scbus1 target 0 lun 1 (ses0,pass2)
geom disk list
Code:
Geom name: ada0
Providers:
1. Name: ada0
   Mediasize: 256060514304 (238G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r2w2e3
   descr: Micron 1100 SATA 256GB
   lunid: 500a07511aad0282
   ident: 18031AAD0282
   rotationrate: 0
   fwsectors: 63
   fwheads: 16

Geom name: da0
Providers:
1. Name: da0
   Mediasize: 1000170586112 (931G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   descr: WD My Passport 0827
   lunname: WD      My Passport 0827WXW1E453ER2T
   lunid: WD      My Passport 0827WXW1E453ER2T
   ident: 575857314534353345523254
   rotationrate: 5400
   fwsectors: 63
   fwheads: 255
gpart status
Code:
  Name  Status  Components
ada0p1      OK  ada0
ada0p2      OK  ada0
ada0p3      OK  ada0
 da0s1      OK  da0
gpart show -lp
Code:
=>       40  500118112    ada0  GPT  (238G)
         40       1024  ada0p1  gptboot0  (512K)
       1064        984          - free -  (492K)
       2048    4194304  ada0p2  swap0  (2.0G)
    4196352  495921152  ada0p3  zfs0  (236G)
  500117504        648          - free -  (324K)

=>        63  1953458113    da0  MBR  (931G)
          63        1985         - free -  (993K)
        2048  1953456128  da0s1  (null)  (931G)


gpart show -lp da0
Code:
=>        63  1953458113    da0  MBR  (931G)
63        1985         - free -  (993K)
2048  1953456128  da0s1  (null)  (931G)
____________________________________________________
gpart recover da0
Code:
da0 recovering is not needed
 
I can't see anything that has been (auto)mounted from da0.

Is it possible that you have unmounted it?

If the mission is just to get the USB stick removed, and you are unsure of what's mounted, I would shut down the system first.
 
Just an idea to get more visibility. You have to close any open windows that view the mounted disk files before being able to umount /dev/da0
You might also need to close any windows that have recently viewed the mounted disk. I'm using KDE and sometimes need to shut down the Dolphin file manager after viewing the contents of a USB drive even after switching to view a different directory.
 
I have restarted the computer many times for other reasons and still I can't mount any flashdrives or harddisks after plugin in a big usb harddrive. We are reinstalling today.
 
Your original problem description is confusing. It suggested that you had a drive (da0) that could not be unmounted. I had not discerned it was more complex than that.

Re-installing is not likely to improve your situation, unless you change something as you do it.

We would have a better chance of understanding the issue if you described the sequence of events one step at a time.

Each time you plug in an external device, a message like this will appear in /var/log/messages:
Code:
Feb 20 15:18:07 sherman kernel: da8 at umass-sim0 bus 0 scbus12 target 0 lun 0
Feb 20 15:18:07 sherman kernel: da8: <PNY USB 3.1 FD PMAP> Removable Direct Access SPC-4 SCSI device
Feb 20 15:18:07 sherman kernel: da8: Serial Number 070009CD339C9C29
Feb 20 15:18:07 sherman kernel: da8: 400.000MB/s transfers
Feb 20 15:18:07 sherman kernel: da8: 118409MB (242501888 512 byte sectors)
Feb 20 15:18:07 sherman kernel: da8: quirks=0x2<NO_6_BYTE>
We need to see that message (for each device you plug in). Seeing the output of gpart show at that point may also help. And we need to know what you did, if anything, immediately after you plugged in each external device.

Also please tell us the procedure you are using to mount external media. Or are expecting something to be mounted automatically?
 
Your original problem description is confusing. It suggested that you had a drive (da0) that could not be unmounted. I had not discerned it was more complex than that.

Re-installing is not likely to improve your situation, unless you change something as you do it.

We would have a better chance of understanding the issue if you described the sequence of events one step at a time.

Each time you plug in an external device, a message like this will appear in /var/log/messages:
Drive da0 is the 930 GB external USB hard drive formatted with the scheme Master Boot Record MBR, ie older style MSDOS format, 4 primary partitions. You only have 3 partitions, so this MBR partition style is ok for your usage. In the future you might choose a GPT scheme that can have upto 128 partitions and is easier to boot multiple Operating Systems if you want that feature,
gpart create -s GPT da0
https://forums.freebsd.org/threads/gpart-cheatsheet-wiping-drives-partitioning-formating.45411/
Code:
# SCSI / USB platters
# dev name da0
# (S)ATA platters
# dev name ad0
#
# WIPE THE PARTITION
gpart destroy -F da0

# CREATE GPT style SLICE (partition)
gpart create -s gpt da0

# CREATE FFS SLICE (filling entire platter)
gpart add -t freebsd-ufs da0

# FORMAT THE NEW FFS SLICE
newfs -U /dev/da0p1

/sbin/mount

/sbin/umount /dev/da0s1 or /sbin/umount /mnt/da0s1 or /sbin/umount /media/da0s1 for MBR partitioned disk

your example /sbin/mount command showed the /dev/ada0 internally SSD disk, I did not see any external mounted USB Flash Drive Stick.

You have to be a "root" user to mount and umount disks. Use doas or sudo in front of the commands you wish to run as a root user.
camcontrol devlist camcontrol inquiry geom disk list will show what you have inserted but not mounted I believe. (I maybe wrong here)

gpart show , gpart status commands can read the disks before mounting the disks and their file systems.

dsbmd and dsbmc are good daemon and client for automatically mounting disk with file systems.

mount_msdosfs /dev/da0s1 /mnt/da0s1
 
Back
Top