Xsan Troubleshooting Tips #1 : Duplicate entry in /Volumes
Let’s start with a simple one. Sometimes an Xsan Volume won’t mount after an unexpected shutdown.
The Mac OS X operating system (as well as all other unices OS) mounts filesystems in a folder. That mean that every time we plug a USB thumb drive, external hard drive or Xsan volume, it creates a folder in /Volumes using the name of the volume. This folder will serve as a pointer to the actual content of the drive.
If a drive with the same name is already plugged-in (that is, a folder with this name already exists), Mac OS X creates a new folder, appending 1.
Sometimes, the created folder isn’t removed because of an unexpected shutdown. This means that either the Volume doesn’t mount (this is usually the case with Xsan), or file paths are different, causing file offline issues.
How to solve this
- 1. Go to /Volumes (in Finder, Go > Go to folder… or CMD-SHIFT-G)
- 2. Check the contents of the ghost folder (be careful as some processes might have written some data in it)
- 3. Delete it
- 4. Reboot, replug device or remount
I usually do it in command-line, to ensure that I’m deleting an empty folder :
Last login: Mon Jan 25 07:54:49 on ttys000
Bosco:~ fti$ cd /Volumes/
Bosco:Volumes fti$ ls
Macintosh HD SANVolume 1
Bosco:Volumes fti$ rmdir SANVolume\ 1/
Bosco:Volumes fti$ sudo xsanctl mount SANVolume