Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > How to unmount mount_smbfs

How to unmount mount_smbfs
Thread Tools
Mac Enthusiast
Join Date: Jan 2001
Location: Leesburg, Virginia
Status: Offline
Reply With Quote
Oct 27, 2004, 05:11 PM
 
I know how to mount a volume in my file system using the mount_smbfs command. However, how do I unmount it?

Dominik Hoffmann
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Oct 27, 2004, 06:15 PM
 
umount?
     
Mac Enthusiast
Join Date: Jan 2001
Location: Leesburg, Virginia
Status: Offline
Reply With Quote
Oct 27, 2004, 10:29 PM
 
Originally posted by Angus_D:
umount?
It is not obvious to me that this works with SMB volumes. I may be wrong, however.

Dominik
     
Mac Enthusiast
Join Date: Jan 2001
Location: Leesburg, Virginia
Status: Offline
Reply With Quote
Oct 28, 2004, 02:31 PM
 
Originally posted by DominikHoffmann:
It is not obvious to me that this works with SMB volumes. I may be wrong, however.
Maybe I am wrong:

After the mounting the SMB share via the command sequence

Code:
sudo mkdir /Volumes/MountPoint sudo mount_smbfs -U UserName -W DomainName //HostName/ShareName /Volumes/MountPoint
I tried to unnmount the volume via

Code:
sudo umount /Volumes/MountPoint/
but get an error message

Code:
umount: /Volumes/MountPoint: Device busy
At least the umount command attempts to unmount the volume. Now the question is why the device is busy, and how to make it unbusy. I know that I don't have any files open on that share.

Dominik Hoffmann
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Oct 28, 2004, 02:33 PM
 
You could try disktool
     
Mac Enthusiast
Join Date: Jan 2001
Location: Leesburg, Virginia
Status: Offline
Reply With Quote
Oct 29, 2004, 05:57 PM
 
Originally posted by Angus_D:
You could try disktool
# man disktool
No manual entry for disktool
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Oct 29, 2004, 07:49 PM
 
Originally posted by DominikHoffmann:
# man disktool
No manual entry for disktool
$ disktool
disktool: Disk Arbitration Command Tool
disktool: disktool -[r][a][u][e][m][p][n][d][s][g][A][S][D][l]
deviceName [options]
You can use disktool to rename, eject, mount or unmount disks and volumes
The acceptable command line parameters are:

Information about disks:
Usage: -l -- List Disks. Lists the disks currently known and available
on the system.

Controlling arbitration:
Usage: -r -- Refresh Disk Arbitration. Causes arbitration to refresh
its internal tables and look for new mounts/unmounts.

Managing disks:
Usage: -u -- Unmount a disk (ex. disktool -u disk2)
Usage: -p -- Unmount a partition (ex. disktool -p disk1s2)
Usage: -e -- Eject a disk (ex. disktool -e disk2)
Usage: -m -- Mount a disk (ex. disktool -m disk2). Useful when a disk
has been unmounted by hand (using -p or -u parameters
Usage: -a -- Notify of mount. Adds the disk to the Disk Arbitrations
internal tables.
Useful when you have already forced the mount and want
to let applications know it.
(ex. disktool -a disk1 AFPVolName AFPFlags)
Usage: -d -- Notify of dismount. Removes the disk from Disk
Arbitration's internal tables.
Useful when you have already forced the unmount and
want to let applications know it.
(ex. disktool -d disk1)

Controlling disk parameters:
Usage: -n -- Rename volume. Renames the volume specified as the first
argument. (ex. disktool -n disk1s2 newName)
Usage: -g -- Get the hfs encoding on a volume.
(ex. disktool -g disk1s2)
Usage: -s -- Set the hfs encoding on a volume.
(ex. disktool -s disk1s2 4)
Usage: -A -- Adopts the given device into the volinfo database.
Usage: -D -- Disowns the given device from the volinfo database.
Usage: -S -- Displays the status of the device in the volinfo database.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Oct 29, 2004, 07:57 PM
 
Also diskutil:
$ diskutil
Disk Utility Tool ?2002-2003, Apple Computer, Inc.
Utility to manage disks and volumes.
Most options require root access to the device

Usage: diskutil <verb> <options>
<verb> is one of the following:
list (List the partitions of a disk)
information | info (Get information on a disk or volume)

unmount (Unmount a single volume)
unmountDisk (Unmount an entire disk (all volumes))
eject (Eject a disk)
mount (Mount a single volume)
mountDisk (Mount an entire disk (all mountable volumes))
rename (Rename a volume)

enableJournal (Enable HFS+ journaling on a mounted HFS+ volume)
disableJournal (Disable HFS+ journaling on a mounted HFS+ volume)

verifyDisk (Verify the structure of a volume)
repairDisk (Repair the structure of a volume)

verifyPermissions (Verify the permissions of a volume)
repairPermissions (Repair the permissions of a volume)
repairOS9Permissions (Repair the permissions for the current
Classic boot volume)

eraseDisk (Erase an existing disk, removing all volumes)
eraseVolume (Erase an existing volume)
eraseOptical (Erase an optical media (CD/RW, DVD/RW, etc.))
zeroDisk (Erase a disk, writing zeros to the media)
randomDisk (Erase a disk, writing random data to the media)

partitionDisk ((re)Partition a disk, removing all volumes)

createRAID (Create a RAID set on multiple disks)
destroyRAID (Destroy an existing RAID set)
checkRAID (Check a RAID set for errors)
enableRAID (Convert a disk to a degraded RAID mirror set)
repairMirror (Repair a damaged RAID mirror set)

diskutil <verb> with no options will provide help on that verb
     
Fresh-Faced Recruit
Join Date: Jul 2004
Location: Seattle WA USA
Status: Offline
Reply With Quote
Oct 30, 2004, 08:49 PM
 
disktool!

great tip!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:59 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2