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 > Disk Utility destroying volumes?!

Disk Utility destroying volumes?!
Thread Tools
Senior User
Join Date: Nov 1999
Location: Milkyway Galaxy
Status: Offline
Reply With Quote
Sep 10, 2003, 04:01 PM
 
Hello,

I have Summer 2000 iMac (500 G3) with its 30 GB factory-installed hard drive. I had partitioned the hard drive into several volumes: 4x 5GB each, 1x 8.2GB (HFS/Mac OS Standard format), and 2 other small partitions (100MB-bootloader and 128MB-swap). Just about each of these volumes has a different OS installed on it (OS X's, 9.2, Linux) and this configuration has been working perfectly fine for me over the years with yaboot as my bootloader. I am a veteran Mac and Linux(ppc) user and have and installed and reinstalled these O.S.’s countless times without problems, and I am well-accustomed to pdisk, et al, having used it to partition volumes in the past. All my past experiences with pdisk were successful and safe.

However, recently I was attempting to do a typical (re)install a Linux distro and now I’m missing the data from the 8.2 GB volume! Here are the steps I was taking which lead me to use Disk Utility, which I believe is the culprit. As I said, I had Linux installed on one of the 5 GB partitions. Out of the two smaller partitions, I was using the 100MB volume as my bootstrap partition with yaboot for a while now and everything was going O.K. However 100MB is much, much larger than what is needed for the yaboot bootstrap (less than 200KB!). Like I had successfully done many times before, I used pdisk (v0.8a2 booted w/ OS 9.2.2) to delete the existing 100MB partition and in its place, I created 1x 800K partition (type Apple_Bootstrap(would become HFS)) and a 99.2 MB partition (again HFS). I rebooted and everything was fine. Mac OS 9 recognized the new 99.2MB volume and I formatted it Mac OS Standard(HFS) and it was accessible from all my OS’s. I choose to create such a small bootstrap partition because in the yaboot documentation it claims that 800K is the smallest size you can create an HFS partition, which is still more than enough for yaboot(<200KB).

After I reached this point and everything was (supposedly) OK I was going to proceed and begin install the new Linux distro, but then I remembered that both Linux and OS X (my primary OS’s) could read UFS(UNIX File System) formatted disks. So since I had this new, completely empty available 99.2 MB volume, I decided I might as well give it a try and format the volume as UFS instead of keeping it as HFS -- and here is where I ran into some major issues. While booted up in OS X (10.1), the Disk Utility application (v10.1 (v61)) would not allow me to format the empty volume as UFS. After selecting the 99.2 MB volume, in the “Erase” tab, the “Volume Format:” popup only showed Mac OS Extended and Standard. However I knew it was possible for UFS and HFS/HFS+ partitions to live together on the same hard drive (I had installed OS X on a UFS volume before). So I found my Mac OS X 10.1 Upgrade CD and booted from it to see if that Disk Utility was allow me to format the new partition as UFS -- and it did. In the same “Erase” tab, the “Volume Format:” popup had 3 options: Extended, Standard, and UFS. This is where the problem began. I was running off the OS X 10.1 Upgrade CD-ROM, which has Disk Utility v10.1 (v61) on it. So I happily (and carefully) selected my 99.2MB volume and clicked “Erase” to re-format it from HFS to UFS. The format had take a longer time that I had expected for such a small volume and I heard allot of disk activity, but when it was done, I began to realize what had happened. Disk Utility began to behave erratic and strange. It began to respond slowly and I was continuously getting the spinning disk busy cursor, plus I was hearing allot of thrashing from the drive. It had updated the name of the 99.2 MB volume on the left-side, however, the "Information" tab still listed it as HFS+ (which it did from the beginning actually). I then re-launched Disk Utility and to my surprise it displayed a new volume called "Untitled 7". To my horror it, the Information tab said that it was an 8.2GB UFS formatted disk! It appears that somehow, despite _carefully_ picking the 99.2MB volume to format, the 8.2 GB partitioned was now in some sort of partial-UFS/HFS format.

Something obviously horrific happened while Disk Utility was supposed to be formatting the 99.2 MB volume. When I rebooted to OS 9, it gave me an “Initialize Disk” dialog box to format an "unrecognizable" 8.2 GB disk, to which I always cancel. When I run Disk First Aid, I see a new generic B/W 1bit icon for a volume. When I run DFA on the strange volume, it displays the following:

Checking disk “(name unknown)”.
Checking "Mac OS Standard" volume structures.
Problem: Invalid BTree node size, 3, 0
Test done. Problems were found, but Disk First Aid cannot repair them.
The volume “(name unknown)” could not be mounted.

When I rebooted to Mac OS X, it no longer displayed the 8.2 GB volume or the 99.2 MB volume that should have been UFS formatted.


However, even if I did (and I'm almost positive I didn't) accidentally select the 8.2 GB volume to format, it would never have showed up in Mac OS 9 asking me to initialize an unrecognizable 8.2 GB disk or appear in Disk First Aid. In OS X, my 8.2 GB volume should still have been there along with the new 99.2 MB UFS volume. In other words, it wasn’t a successful format in any case, even if I did accidentally select the 8.2 GB volume. Mac OS X Disk Utility has left me with some sort of hybrid-UFS/HFS format as the 8.2 GB volume clearly isn’t 100% UFS or HFS and refuses to auto-mount in either OS X or OS 9 as UFS and/or HFS.


I assume some sort of weird mix-up has happened with my disk and I am still without any of the data from my 8.2 GB volume. It looks like there was some major tangle-up; with some of the UFS file system eroding the 8.2 GB volume. The 99.2 MB volume is somehow still partially-HFS and I can manually mount it successfully from OS X & Linux (mount –t hfs), but something is clearly wrong with it because it doesn't auto-mount like it should in OS X and is not available at all in OS 9. The remainder of that 99.2 MB (the 800K bootstrap) I haven't seen or formatted since I left pdisk on my pursuit to convert the 99.2 MB volume to UFS. I presume it's in some sort of unformatted, raw state since I created it with pdisk. Attempting to mount it as HFS of UFS reports an error. I can successfully mount the 8.2 GB volume as UFS only (mount –t ufs) in OS X and Linux and I see an empty filesystem, which ‘df’ reports has 7.6 GB free, yet uses only 2.0K out of 8.2 GB.


I have no idea what exactly caused the 8.2 GB to apparently get misplaced. I don't know if it was purely because of a bug in Disk Utility. Another possibility is that because I had left the 800K bootstrap volume without a real filesystem, it could have affected things. Nevertheless, you are allowed to erase a particular volume and the other volumes on that disk should remain unharmed. I don’t have a clue what happened in this case -- any ideas anyone? Could it have something to do with pdisk or the 800K bootstrap partition? Maybe Disk Utility can't handle very small volumes and the unformatted 800K bootstrap partition was confusing it or threw it off.


So why was I trying to see if UFS would work when both Linux and OS X can read-write HFS anyway? Well the problem with HFS(Standard) is that filenames are limited to 31 characters, and I have documents, MP3's,etc that have filenames that are much longer than 31 chars. So when I decided to reclaim the 99.2 MB I was wasting on the original yaboot bootstrap, I thought it was be a good opportunity to test if UFS was a better solution that HFS for my data volume with the majority of my MP3's and other files. UFS filenames are not limited to 31 characters like HFS. With UFS I could permanently keep files I access from both OS’s in one central location.


Can anyone offer any input to what went wrong and what happened? I know for a fact that many people have HFS, HFS+, and UFS volumes next to each other on the same hard drive, which is what I was trying to accomplish. Something went terribly erroneous and now it looks like I have an improperly/partially formatted 8.2 GB UFS/HFS- & 99.2 MB HFS- volumes, when the 8.2 GB volume should never have been touched period. I ran Disk Utility on all my volumes prior to undergoing the UFS format and all my volumes were good. How on earth did formatting one volume implicate and affect a distinctly separate one? This is the first time something like this has ever happened. Is OS X 10.1 Disk Utility known to have shaky & unreliable support for formatting volumes in UFS? Any possibility I could still retrieve my data since it might still their, albeit the corrupted B*Tree database. Will any of the disk utility programs (Norton, etc) be able to rescue the HFS B*Tree from the 8.2 GB volume? Since the original incident, I have not formatted any partitions or modified my partition map (run pdisk) again. What is the best next step? All ideas/help appreciated.

Here is a printout of my partition map from pdisk if anyone’s curious:
Partition map (with 512 byte blocks) on '/dev/ata2.0' (/dev/hde)
#: type name length base ( size )
1 – 8 : Drivers
9: Apple_Bootstrap bootstrap 1600 @ 1544 800K Bootstrap(no FS)
10: Apple_UFS Docs 203200 @ 3144 ( 99.2M) Corrupt..?
11: Apple_UNIX_SVR2 swap 262144 @ 206344 (128.0M) Linux swap
12: Apple_UNIX_SVR2 untitled 10240000 @ 468488 ( 4.9G) 1x 5GB (ext2)
13: Apple_HFS untitled 4 10240000 @ 10708488 ( 4.9G) 1x 5GB (HFS+)
14: Apple_HFS untitled 5 10240000 @ 20948488 ( 4.9G) 1x 5GB (HFS+)
15: Apple_HFS untitled 6 10240000 @ 31188488 ( 4.9G) 1x 5GB (HFS+)
16: Apple_HFS untitled 7 17252206 @ 41428488 ( 8.2G) Corrupt..?

Device block size=512, Number of Blocks=58680720 (28.0G)
Death To Extremists!
     
Senior User
Join Date: Nov 1999
Location: Milkyway Galaxy
Status: Offline
Reply With Quote
Sep 11, 2003, 03:57 PM
 
So is their nothing else I can do?

I need to know if I should give up any hope of rescuing the data from the 8.2 GB volume and format it to make it usable again?

Any input greatly appreciated.
Death To Extremists!
     
Admin Emeritus
Join Date: Oct 1999
Location: Zurich, Switzerland
Status: Offline
Reply With Quote
Sep 11, 2003, 04:17 PM
 
My guess is that you're screwed. It might be possible to use pdisk or something to change that partition back to HFS/HFS+, but it's a stretch.

tooki
     
   
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 08:25 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