Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Miniguide to fixing Volume-Filesystem errors Storage Devices
There are many drive/filesystem errors that can occur on a Mac. Here are some common symptoms that are indicative of some of them:

Not able to boot the system: You tried to boot. Apple logo appeared, and wheel spun for about 15-20 seconds, then machine turned off. This repeated every time you tried to boot the system. (REASON: The system does not find your HD and thus the OS to boot).

Everything seems to work fine till your system hangs briefly and in an unpredictable way. You wait for a while, and the system magically comes back to normal. But after another while, the same thing re-occurs! (This cycle repeats in the current session).

You can do these simple things to check for other possible causes:
  • Run Activity Monitor to see that this is NOT due to temporarily high CPU and/or Memory usage.
  • Check the system log using Console.app or running tail -f /var/log/system.log in Terminal. If your system is having some I/O error then it is sure that there is an HD failure issue.
I don't claim to be an expert on this subject matter, just an (over)enthusiast Mac user. This guide is purely based on my personal experience and is bound to contain errors. So, USE IT AT YOUR OWN RISK! [crarko adds: Consider this hint to also serve as a reminder to check your backups...]

Possible problems:
  • Your HD Volume/FileSystem is corrupted
    Verification: Use Disk Utility and run "verify" to check it.
  • 2. Your HD is dying.
    Verification: Use Disk Utility and see the SMART status of your HD, although this isn't always reliable.
Before making any repair of the disk, make sure that you have the latest backups. Repair might let loose the volume/filesystem info all together and then there will be no other choice than to recover the data by some data rescue s/w like Data Rescue!

If you don't have a current backup, you can try booting in Single-User mode by holding Command+S on startup. Then try doing a manual backup using commandline tools like cp or ditto.

Note: The disk usually gets mounted in read-only. This could be good to get a manual backup by cp. But if everything else fails and you want to remove the important/personal data before sending it to repair, you can try mounting it in the write mode by this:

mount -uw /

It might be good to commit the write by running the sync command.

There are other modes to try backups if single-user mode is not available.
  • Command+V (Verbose mode): Probably will point you towards the error due to which you are not able to go into Single User mode.
  • Shift-key (Safe mode)
  • T (Target Disk mode): you whole drive can be seen by another Mac/PC as a HD. This works with FireWire. [crarko adds: And now Thunderbolt as well.]
Clone the disk first if you don't have the backup of data (I use Data Rescue). Not being able to mount the drive, I could not copy my files before trying the fix by any traditional means. What I did do was load Data Rescue from CD and used the clone function to clone the broken HD to a FireWire external - for some reason it could see the drive and execute the clone. I then tried the fix on the clone first.

How to verify/repair the disk:

Using Disk Utility to verify or repair disks

You can repair only from another disk (not the startup disk) so get the (correct) Mac OS X Install DVD to boot or press Command+S (single-user mode) while booting.

Disk Utility can verify your computer's startup disk (volume) without starting up from another volume. Here are Apple's instructions. This feature is called 'Live Verification.' If Disk Utility discovers any issues that require a repair, you will need to start up from your Mac OS X Install DVD and use Disk Utility on that disc to make repairs. (You can't repair your startup volume while your computer is started from it.) The repair can be done by fsck or Disk Utility, however, the later is recommended by Apple if you're using Mac OS X 10.4 or later.

Very important: If you are repairing, then REPEAT the Repair process more than once, to make sure it fixed everything.

The thing which can tell if it works is if you are getting a different output of the Repair in successive runs. So log the successive runs and if the error reported is changing in successive runs, it is likely that REPAIR is fixing some problems in each run and it could be possible that using REPAIR repeatedly could solve your problem.

To repair using fsck Restart in Single User mode (Command+S on boot) OR boot with the Install disc. At the command line, type:

/sbin/fsck -fy

If fsck found issues and has altered, repaired, or fixed anything, it will display this message:

***** FILE SYSTEM WAS MODIFIED *****

Important: If this message appears, repeat the fsck command you typed until fsck tells you that your volume appears to be OK (first-pass repairs may uncover additional issues, so this is a normal thing to do).

About the -y flag: Tells fsck that you want to answer 'yes' to all questions about fixing, repairing, or salvaging information. This is the optimal approach, as answering 'no' to any question causes fsck to stop. You cannot determine that all necessary repairs have been made until fsck completes and gives its final report.

The -f flag forces fsck to check 'clean' filesystems when preening.

Follow this hint's advice if the above two fail OR/and you are having 'invalid sibling links' error reported by 'verify disk.'

Notes:

Try many times. in above post, people have even used run the above a dozen times to solve the problem!

If Verify/Repair disk fails:

DiskWarrior (might need the BOOTABLE version if you are not able to BOOT your OS) is often recommended as the best tool in fixing drive errors (volume, fs etc.).

DiskWarrior isn't, strictly speaking, a data recovery tool, but it's 'scavenge' mode does an excellent job of retrieving data from a file system even if it can't be entirely repaired. A good data recovery tool is Data Rescue.

Hardware level verification (even if your volume gets fixed by above):

Check the SMART status of your disk (by using Disk Utility or see below). Boot from the Installer disk » Continue » Tools » Disk Utility. Highlight the hard drive (not just the partition), and see if at the bottom of the Disk Utility window, does it say SMART failure? Or is the disk highlighted in red? If so, then the disk is dying, replace the hard drive, and hope your backups are recent.

Even if your Disk Volume error is fixed, it is imperative to do the HW test. Newer Macs include the Apple Hardware Test which can be obtained by pressing 'D' while booting.

If AHT fails, there is certainly some problem with HD, but if HW test doesnt fail this doesn't mean there is no error. The bottom-line is that you can never be entirely sure about your H/W functionality, so use redundancy (like backups).

The endgame:

If you need to replace your HD manually, and are out of warranty, try finding a video guide on YouTube for your model. For example, here is one for MacBooks.

Concluding useful info:

Summary of boot options:
  • Single user mode: Command+s
  • Verbose mode: Command+V
  • Safe Mode: Shift-key while booting (see full info here).
  • Booting from CD or other boot devices: Use the Option key while starting to see all the boot options
Dealing with the mounting blues:

To know which device was just inserted, at the command line type:

ls -l /dev/disk*

The most recent device (see the timestamps) will be the device just inserted.

To mount an external HD having the FAT32 filesystem (if this is all you have to backup with in an emergency), type:

mount -tmsdos /dev/disk3s1 /Volume/mydisk

You can also enable HFS+ support in most versions of Linux, to use for backup/recovery. Search for the appropriate commands/driver for your distribution.

[crarko adds: OK, this is a long guide, many parts of which may be found in previous hints. It seemed like a good summary of many of them. If you spot any errors, or have handy additions to make, please post them in the Comments.]
    •    
  • Currently 1.53 / 5
  You rated: 5 / 5 (15 votes cast)
 
[63,700 views]  

Miniguide to fixing Volume-Filesystem errors | 6 comments | Create New Account
Click here to return to the 'Miniguide to fixing Volume-Filesystem errors' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Miniguide to fixing Volume-Filesystem errors
Authored by: Auricchio on Apr 29, '11 09:09:58AM

"If your system is having some I/O error then it is sure that there is an HD failure issue."

In most cases there will be no I/O error logged; the drive eventually reads the requested data and doesn't report an error (or the driver ignores some status info).

This is a common failure mode with ATA/SATA drives. Often DiskWarrior will encounter the slowdown and report "Operation delayed due to disk malfunction." DW will then refuse to rewrite the updated directory; it's time to get everything off the drive to a new one.

Over eight years, I've replaced 60 dead or failing drives for clients; 33 of the flaky ones exhibited the "random slowdown" problem, which was detected by DiskWarrior.

As for SMART status, I've only seen it reported once or twice. My experience is that by the time SMART reports a problem, you already see smoke and flames...

---
EMOJO: mojo no longer workin'
Edited on Apr 29, '11 09:13:25AM by Auricchio



[ Reply to This | # ]
Miniguide to fixing Volume-Filesystem errors
Authored by: Doc-Izzy on Apr 29, '11 10:43:33AM

Very good post. I have two tips to add. Here's the first:

Often, data access slowdowns & I/O errors are caused by bad blocks on the disk. Once you've secured a good back-up, "zeroing-out" the drive can fix this issue by re-writing the bad block map. This map prevents any attempts to write to or read from a bad block, thus preventing slow downs & freezing that doing so would result in.

Zeroing out is also a tool for exposing drive failure. The process should fail or generate errors if the drive is failing. Note that Zeroing all data takes a long time. The larger the drive, the longer it takes.



[ Reply to This | # ]
Miniguide to fixing Volume-Filesystem errors
Authored by: kaih on Apr 29, '11 03:29:33PM

Oh no no no!

Zeroing out the disk may appear to fix the issues for a while, but I can guarantee that the issues are still there and will only get worse.

Once you see a bad sector on a hard disk, just one, it's time to backup your data and throw the disk away. If you don't want to junk the disk, at least use it only for data you don't care about losing.

You see, the way modern hard disks work is that they all have bad sectors. In the good old days, hard drives used to come with a printed list of known bad sectors and when you did a low level format on them (a real low-level format, not just zeroing out the data) you would then manually enter the list of known bad sectors, and then update that list with any new ones - in other words, you were in complete control over mapping out bad sectors.

With today's hard disks, the hard drive controller maps out bad sectors itself, without even telling you. It has a factory list of bad sectors, that you can't see. As it encounters bad sectors in normal use, it silently attempts to recover the data and move it to a chunk of spare sectors that all drives have for this purpose. You generally aren't aware that anything has happened. There will be a SMART status code logged, but OS X doesn't seem to regard this as an issue worth reporting. You can use something like smartmon tools to check the raw SMART status and see this for yourself.

Once a hard drive has mapped out enough bad sectors that it's starting to report to you there are bad sectors, this is the beginning of the end. I have not once had a hard drive last for a long period of time after reporting a bad sector, it always gets worse and worse.

The best thing you can do is to power down the drive immediately and let it cool down to room temperature. Get something to back up your data to and begin the backup process straight away.

Zeroing out the disk may let the drive remap a few more sectors and give you the illusion of having everything fixed, but it's a very different picture behind the scenes.

---
k:.



[ Reply to This | # ]
Miniguide to fixing Volume-Filesystem errors
Authored by: Doc-Izzy on Apr 30, '11 03:45:54PM

As a certified Apple technician who does this for a living I can tell you that this method both works & is literally recommended by Apple in their technician training.

I agree it very often can be the first indication of a larger problem and that warning is definitely something I tell my clients and should have included here. But it is not worthy of your opening sentence implying I just recommended something horribly wrong.

If a system is under warranty then fine, ask an AASP or Genius Bar to replace the drive. But very often you have scenarios when a system is not under warranty and the user (or reader of this forum) does not want to spend the money on a new drive and would like to try all options available. Zeroing out is a viable option that can have good results.



[ Reply to This | # ]
Miniguide to fixing Volume-Filesystem errors
Authored by: Doc-Izzy on Apr 29, '11 10:51:44AM

My 2nd tip is for PowerPC users. Here is a quick & easy way to check your drive when you are experiencing problems:

Boot into Open Firmware (single-user) and type in "dir hd:\"
Some of the responses you might get & what you can do:
 
"bad vhb" This can usually be fixed with Disk Utility

"bad MTR pointer" Also can usually be fixed with Disk Utility

If a directory listing of the drive's root appears it can most likely be fixed with Disk Utility but may need DiskWarrior or an erase/re-formatting.

"Can't open the dir device" is almost always a failed drive.

Hope this helps someone!



[ Reply to This | # ]
Miniguide to fixing Volume-Filesystem errors
Authored by: david-bo on Apr 29, '11 11:34:59AM

Disk Warrior fails, with an out of memory error, to repair volumes with a lot of files, links etc (read: Time Machine volumes). Anyone know how to fix this? It seems to be UI, that is Carbon, that can't address the memory required. Maybe using the command line?

---
link



[ Reply to This | # ]