Showing posts with label MacBook Pro. Show all posts
Showing posts with label MacBook Pro. Show all posts

Tuesday, January 13, 2009

Using ZFS with Mac OS X 10.5

A few days ago I got a new MacBook Pro. While waiting for it to be delivered, I started thinking about how I want to layout the installation of the OS. For a long long time I wanted to try to use ZFS file system on Mac and this looked like a wonderful opportunity. Getting rid of HFS+, which was causing me lots of problems (especially its case insensitive re-incarnation), sounds like a dream come true.

If you've never heard of ZFS before, check out this good 5min screencast of some of the important features.

A brief google search revealed that there are several people using and developing ZFS for Mac. There is a Mac ZFS porting project at http://zfs.macosforge.org and I found a lot of good info at AlBlue's blog.

Some noteworthy info:
  • The current ZFS port (build 119) is based on ZFS code that shipped with Solaris build 72
  • It's currently not possible to boot Mac OS X from a ZFS filesystem
  • Finder integration is not perfect yet - Finder lists a ZFS pool as an unmountable drive under devices
  • There are several reports of kernel panics, most of which appeared in connection to the use of cheap external USB disks (I haven't experienced any)
  • There are a bunch of minor issues, which I'm sure will eventually go away.
None of the above was a show stopper for me, so I went ahead with the installation. My plan was simple - repartition the internal hard drive to a small bootable partition and a large partition used by ZFS, which will hold my home directory and other filesystems.

Install ZFS

Even though MacOS X 10.5 comes with ZFS support, it's only a read-only support. In order to be able to really use ZFS, full ZFS implementation must be installed.

The installation is very simple and can be done by following these instructions: http://zfs.macosforge.org/trac/wiki/downloads. Alternatively, AlBlue created a fancy installer for the lazy ones out there.

Repartition Disk

Once ZFS is installed and the OS was rebooted, I could repartition the internal disk. If you are using an external hard drive, you'll most likely need to use zpool command instead.

First let's check what the disk looks like:
$ diskutil list
/dev/disk0
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *298.1 Gi   disk0
1:                        EFI                         200.0 Mi   disk0s1
2:                  Apple_HFS boot                    297.8 Gi   disk0s2
Good, the internal disk was identified as /dev/disk0 and it currently contains an EFI (boot) slice and ~300G data slice/partition. Let's repartition the disk so that it contains two data partitions.
$ sudo diskutil resizeVolume disk0s2 40G ZFS tank 257G
Password:
Started resizing on disk disk0s2 boot
Verifying
Resizing Volume
Adjusting Partitions
Formatting new partitions
Formatting disk0s3 as ZFS File System with name tank
[ + 0%..10%..20%..30%..40%..50%..60%..70%..80%..90%..100% ]
Finished resizing on disk disk0
/dev/disk0
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *298.1 Gi   disk0
1:                        EFI                         200.0 Mi   disk0s1
2:                  Apple_HFS boot                    39.9 Gi    disk0s2
3:                        ZFS tank                    252.0 Gi   disk0s3


Great, the disk was repartitioned and the existing data partition, which I call boot, was resized into a smaller 40GB partition and the extra space was used to create a ZFS pool called tank. Btw all the data on the boot partition was preserved.

Let's check my new pool:
$ zpool list
NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
tank                    256G    360K    256G     0%  ONLINE     -
$ zpool status
pool: tank
state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
 still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
 pool will no longer be accessible on older software versions.
scrub: none requested
config:

 NAME        STATE     READ WRITE CKSUM
 tank        ONLINE       0     0     0
   disk0s3   ONLINE       0     0     0

errors: No known data errors
The warning above just means that a new ZFS storage format is available but is not used by the current pool. As far as I could find there are no benefits for upgrading to the new format on Mac, but if I did, I would lose compatibility with Macs that have only the read-only ZFS support.

Create Filesystems

So now that the new pool exists, I can create a shiny new filesystem using a single command:
$ sudo zfs create tank/me3x
$ zfs list
NAME        USED  AVAIL  REFER  MOUNTPOINT
tank        388K   252G   270K  /Volumes/tank
tank/me3x    19K   252G    19K  /Volumes/tank/me3x
To configure this new filesystem as my home directory, I created a temporary admin account, logged in under this account and mounted the ZFS fs as /Users/me3x:
$ sudo mv /Users/me3x /Users/me3x.hfs
$ sudo zfs set mountpoint=/Users/me3x tank/me3x
$ sudo cp -rp /Users/me3x.hfs /Users/me3x
That's it. My Mac account now resides on a ZFS file system. Now I can finally enjoy all the benefits of using ZFS on my OpenSolaris box in my office as well as on my Mac. Bye bye HFS, I won't miss you! 

Thursday, June 21, 2007

I Survived Upgrade to MacOS X 10.4.10




Last night I installed the freshly released update for Tiger (update 10.4.10).

The installation went fine, but took unusually long time, which made me a little worried for a moment (a spinning wheel is not the best indicator of progress).

After the problems I (and many others) had with 10.4.9, I recommend doing at least these steps in order to install a MacOSX Update:

  • close all the apps
  • backup important stuff
  • launch Disk Utility and verify the disk *and* disk permissions
  • start the installation
  • don't touch your machine until the update is done
  • start praying

Saturday, March 24, 2007

iAlertU - Alarm System for your Apple MacBook Computer

When I saw the light saber fight video and tried the app I thought that it was cool, but sort of useless. The other day I stumbled upon the iAlertU application that uses the sudden motion sensor (SMS) to protect a Mac against thieves. Too bad that it is so easy to bypass it by using earphones :-/. But I have to admit that it is a creative idea and more useful than the mac saber.

Tuesday, March 20, 2007

End of the MacBook Problem Saga?

Back in November I wrote an entry about all the problems I had with a MacBook, that I bought for my sister and how I returned four MacBooks before I finally got a fifth that actually worked (see "A Basket of Rotten Apples").

After posting the entry I though that my troubles were over, but had no idea how wrong I was. Only one week later the battery on that MacBook died.

There were no signs of problems before, the battery performance was good and it was already formatted according to Apple's instructions. MacOS X failed to recognize the battery and the charger would not detect it either. It look as if there was no battery in that notebook. There was just a battery crossed with an X and text "No batteries available" in the menu.

Since at that time, I was already in Slovakia (my home country), I was happy to find out that the 1 year complementary Apple Care warranty program had worldwide coverage. After browsing a little I found out that it usually takes no time to get the battery replaced. With all this information I called the closest Apple dealer and explained to him my situation. I got an estimate 4-6 weeks!!!

It seems that Apple has no direct representation in Slovakia and thus all the service parts as well as regular orders are being handled via a Slovak company that is somehow connected with Apple in some other EU country. The whole thing is very confusing, nontransparent and worst of all causes enormous delays in orders and repairs. The Apple dealers in Slovakia are pretty unhappy about this whole situation, but as one of them told me, there is nothing they can do about this.

So I waited and waited and finally on the last day of January (about 6 weeks later) I got an email from the dealer that he finally got my replacement battery. So I borrowed my sisters notebook and went to visit the dealer. New battery worked fine, but during this repair I noticed yet another problem - the infamous MacBook Discoloration!

The dealer was kind enough to order a new keyboard cover immediately, but he wasn't able to give me estimate on this repair.

Only one week later, my sister called me and told me that the second battery had just died - in a same mysterious way as the one before. So besides the keyboard cover, yet another battery replacement was on my repair list.

According to discussion on this blog, there is a bunch of people who had two or more batteries replaced, one after another due to the same issue. Apple claimed that that this was not a notebook, but rather battery related issue.

Another month went by and I finally got my sisters notebook fixed. It has been more than two weeks now and the battery is still working and there haven't been any new issues so far. I don't want to be premature, but I hope that this is it - end of the saga!

All the problems are fixed now but I still feel ashamed for all the trouble I had with a notebook that was supposed to be great.

Thursday, March 15, 2007

500GB eSATA External Storage with Throughput Upto 67MB/s

I was suffering from full-hard-drive disease for a couple of months. So last week I finally ordered an external drive to hold the piles of data I store on my MacBook Pro. This is what I got:
Everything came in mail today, so I unwrapped it and put it together.



The Seagate 7200.10 hard drive is a hard drive, there is not too much to say about it, except for the usual complaint that 500GB ain't 500GB of free space, you get 465.8GB with this baby.

The Vantec enclosure looks really good and has a very good feel to it. It feels much better than any other enclosure I put my hands on. Very sturdy, slim, well designed and well assembled. Thanks to the fact that it's aluminum based it keeps the hard drive REALLY cool - during heavy use it is just a bit warmer than my hand.

I picked the Vydeo/Meritline eSATA card based on the "feature set /price" ratio and didn't really know what to expect because there is not as much written about it on the Internet as I'd like. Luckily there were no surprises so far.

The card is based on SiI3132 chipset and the driver supplied with the card is an unmodified Silicon Image driver (version 1.1.5). When I tried to install it however, it didn't work. But the one I got from Silicon Image support site worked fine (version 1.1.9). I had to restart my MBP to get MacOS X to recognize it though.



An interesting thing that I noticed is that when I copy stuff from the external drive to my internal drive (not the other way around), my computer gets sluggish. Particularly, all the operations that needed to access the internal drive became almost unusable because of slow responsiveness. I'm not sure if it's the internal drive getting overloaded with all the traffic, or something else, but it happens only in this one scenario (using loading data from the external drive to memory causes no problems).

The only other complaint I have about the card is that it is relatively easy to accidentally unplug. It is safe enough to use on a desk, but I don't even want to think about the data corruption caused by an accidental unplugging while using the computer on my lap.

I ran a few very unscientific benchmarks to see what to expect from my new toys. Here are the results.

  1. Copying my 13.22GB of mp3 files from the internal drive to the external drive:
    time cp -r ~/Music /Volumes/ExternalHDD/BackUp/
    8m29.645s = 26.5MB/s
    (Keep in mind that the internal drive is the bottleneck in this test, not the eSATA drive)

    I ran this test while in USB2.0 mode (the enclosure supports both eSATA and USB2.0) and the results were:
    16m8s = 14MB/s

    That makes the eSATA configuration 1.89x faster than the USB2.0 one.

  2. Copying 13.22GB of mp3 files from one folder on the internal drive to another one:
    time cp -r /Volumes/ExternalHDD/BackUp/Music/ /Volumes/ExternalHDD/
    7m1.298s = 32.2MB/s
    Considering that the files had to be read and then written to the drive, the number can be doubled to get the combined throughput. This makes it 64.4MB/s

  3. Creating a 10GB file using mkfile command and storing it on the external drive:
    time mkfile 10g /Volumes/ExternalHDD/10GB.file
    2m37.377s = 65.2MB/s

  4. Creating a 5GB dmg image file using Disk Utility and storing it on the external drive:
    1m17s = 66.5MB/s

  5. Encrypting a 5GB file stored on the external drive using openssl and storing the encrypted file on the external drive:
    time openssl enc -in /Volumes/ExternalHDD/5GB.file \
    -out /Volumes/ExternalHDD/5GB-encrypted.file -e -aes-128-cbc
    3m24.313s = 25.1MB/s
    Again, since I'm reading and storing the file on the same drive, the combined throughput is the double: 50.2MB/s.

    Since this is a test that is very close to the real world usage, I ran it with the disk connected via USB2.0. The results were:
    8m27.985s = 10.1MB/s or 20.2MB/s combined

    That makes the eSATA configuration 2.49x faster than the USB2.0 one.

  6. Copying a 5GB file from the external drive to the internal drive:
    time cp /Volumes/ExternalHDD/5GB-encrypted.file .
    2m39.271s = 32.3MB/s

  7. Copying a 5GB file from the external drive to the internal drive and at same time copying another 5GB file from the internal drive to the external drive:
    time cp 5GB-encrypted.file /Volumes/ExternalHDD/5GB-encrypted2.file&
    time cp /Volumes/ExternalHDD/5GB-encrypted.file .
    5m46.592s = 29.6MB/s (counting with 10GB of data being transferred )
    Again the internal drive is the bottleneck in this test.

Looking at these numbers I'm pretty happy with my purchase. Not a bad outcome for little less than $300 total.

Sunday, November 26, 2006

A Basket of Rotten Apples

Last week I went to an Apple Store in Santa Clara and I wanted to buy a MacBook as a Christmas present for my sister (It's a surprised so don't tell her about it!!!). At that time I had no idea what a terrible experience was that going to be.

I got the white box, paid and happily went home. When I unpacked the notebook, I put in the installation disk and was about to restart the computer to run custom installation when I heard that the DVD in the drive was getting scratched. Ironically I had the same and many others problems with my MacBook Pro. So I re-packed the notebook and the next day went back to the Apple Store.

When I arrived there, I grabbed a sales guy and told him about my problem. He asked me to demonstrate it to him, which I did. He had to admit that this was not a feature and took the notebook in the back office and came back with a new MacBook. After that, he went to the register, did some voodoo with the receipts and gave me the new box and a new receipt. I unwrapped the notebook in the store and checked if this one was OK. My test CD was unscratched after the test so I happily went home again.

When I arrived home I was going to do the custom installation again. After a couple of seconds of working with the notebook while having my palms resting on it, I noticed that this notebook was vibrating. The whole case was shaking as if the DVD was spinning at the maximum speed and the hard drive was doing some really heavy writing and reading at the same time. The thing was that at the time when this vibration was happening there was no disk in the superdrive and the hard drive was idle as well. With disgust I ceased all the activities with the notebook, put it into the box, and waited until I had the next opportunity to go to Apple Store again.

Couple days later I finally had time to go to the Apple Store. When I arrived I grabbed a sales guy again and told him my story. This guy told me that he has no authorization to do anything about this and that I had to see a Mac Genius with my problem. I guess that he saw that I was not very happy with his answer, so he took me to Mac Genius and asked him to look at my notebook immediately.

I explained the problem to this Genius, who took the notebook to the back office. In a few minutes he came out and told me that he needs to compare the vibrations from this notebook to the notebooks they have on display. For a second I thought that if all the notebooks are doing this then I'd get dismissed, but fortunately all the notebooks on display were making no vibrations at all.

After this the Genius sent me to the sales guy and authorized the replacement. I got the replacement accompanied with the receipt voodoo. The sales guy gave me the notebook and told me to enjoy it because that was my last replacement. I was little surprised to hear that and told him that I want to test the notebook before I go home.

I was pretty surprised to see that this one was doing the same thing!!! I showed it to the sales guy and he was pretty shocked as well. Another sales guy came to us and told us that it is normal behavior after first boot because "The computer is thinking". Duh, that was a bit of an offensive explanation for me and I dismissed the guy.

After this, the sales guy brought yet another box (my 4th MacBook!) and opened it himself. It was not that surprising to me that this one was vibrating as well. The sales guy almost collapsed when he realized that the whole batch of MacBooks that they have in stock might be suffering from the same problem.

After few phone calls to other Apple Stores in the area and talking to the store manager the sales guy opened yet another box and with huge relief called me and told me that "Hey Igor, we have a notebook for you!". I touched the notebook and it was fine, no vibrations at all!

The sales guy did his receipt voodoo for the last time and then I went home with a present for my sister. I still can't believe that I had to go through 5 (five!!) MacBooks to find the one that was working.

If Apple wants to increase the market share so be it, but I hope that it is not going to happen by becoming more like other notebook maker who's name rhymes with Hell! If anyone sees similar issues he should immediately go to the Apple Store and return / exchange the product he bought, for his own sake (don't waste time with repairs) and for Apple's sake as well; they must realize that Apple customers are not going to tolerate flaky assembly!

Sunday, November 12, 2006

MacBook Pro Core Duo Versus Core 2 Duo Temperature Comparison

Yesterday I bought a brand new MacBook Pro Core 2 Duo for a friend, and since I'm going to keep it for few more days before I have to reluctantly hand it over to him, I've decided to see how much of the buzz is true that the new MBPs are cooler than the previous Core Duo version.

I used Core Temp Duo to retrieve the temperature from CPU thermal sensor. It's a really cool small app btw.

These are the results of running
$ yes > /dev/null&
$ yes > /dev/null&
for about 30minutes on MBP Core 2 Duo (C2D) 2.33GHz:
11/13/2006 00:12 : 23:09 - 10.1% - 2.33GHz - 45C
11/13/2006 00:13 : 23:10 - 100% - 2.33GHz - 70C
11/13/2006 00:13 : 23:10 - 100% - 2.33GHz - 71C
11/13/2006 00:13 : 23:11 - 100% - 2.33GHz - 72C
11/13/2006 00:14 : 23:11 - 100% - 2.33GHz - 75C
11/13/2006 00:14 : 23:11 - 100% - 2.33GHz - 78C
11/13/2006 00:17 : 23:14 - 100% - 2.33GHz - 73C
11/13/2006 00:17 : 23:14 - 100% - 2.33GHz - 72C
11/13/2006 00:18 : 23:16 - 100% - 2.33GHz - 72C
11/13/2006 00:20 : 23:17 - 100% - 2.33GHz - 74C
11/13/2006 00:22 : 23:20 - 100% - 2.33GHz - 72C
11/13/2006 00:23 : 23:21 - 100% - 2.33GHz - 71C
11/13/2006 00:25 : 23:22 - 100% - 2.33GHz - 70C
11/13/2006 00:27 : 23:24 - 100% - 2.33GHz - 69C
11/13/2006 00:27 : 23:25 - 100% - 2.33GHz - 68C
11/13/2006 00:29 : 23:27 - 100% - 2.33GHz - 67C
11/13/2006 00:31 : 23:28 - 100% - 2.33GHz - 66C
11/13/2006 00:32 : 23:30 - 100% - 2.33GHz - 65C
11/13/2006 00:34 : 23:32 - 100% - 2.33GHz - 67C
11/13/2006 00:36 : 23:33 - 100% - 2.33GHz - 68C
11/13/2006 00:36 : 23:34 - 100% - 2.33GHz - 66C
11/13/2006 00:38 : 23:36 - 100% - 2.33GHz - 66C
11/13/2006 00:40 : 23:37 - 100% - 2.33GHz - 66C
11/13/2006 00:40 : 23:38 - 100% - 2.33GHz - 67C
11/13/2006 00:43 : 23:40 - 100% - 2.33GHz - 67C
11/13/2006 00:43 : 23:41 - 100% - 2.33GHz - 67C
11/13/2006 00:44 : 23:41 - 1% - 2.33GHz - 52C
11/13/2006 00:44 : 23:42 - 1% - 2.33GHz - 51C
11/13/2006 00:45 : 23:43 - 2% - 2.33GHz - 50C
11/13/2006 00:57 : 23:55 - 8.9% - 2.33GHz - 48C
11/13/2006 01:01 : 23:58 - 1.5% - 2.33GHz - 47C
11/13/2006 01:01 : 23:58 - 1.5% - 2.33GHz - 47C
11/13/2006 01:08 : 1 day 6 mins - 13% - 2.33GHz - 47C
11/13/2006 01:08 : 1 day 6 mins - 13% - 2.33GHz - 47C

And the results of the same test on MBP Core Duo (CD) 2.0Ghz:
11/02/2006 15:30 : 22:08 - 15.3% - 2.0GHz - 47C
11/12/2006 15:28 : 22:09 - 100% - 2.0GHz - 57C
11/12/2006 15:29 : 22:09 - 100% - 2.0GHz - 63C
11/12/2006 15:30 : 22:10 - 100% - 2.0GHz - 64C
11/12/2006 15:35 : 22:15 - 100% - 2.0GHz - 64C
11/12/2006 15:37 : 22:17 - 100% - 2.0GHz - 64C
11/12/2006 15:39 : 22:19 - 100% - 2.0GHz - 64C
11/12/2006 15:40 : 22:20 - 100% - 2.0GHz - 64C
11/12/2006 15:42 : 22:22 - 100% - 2.0GHz - 64C
11/12/2006 15:45 : 22:25 - 100% - 2.0GHz - 64C
11/12/2006 15:52 : 22:32 - 100% - 2.0GHz - 64C
11/12/2006 15:55 : 22:35 - 100% - 2.0GHz - 64C
11/12/2006 16:09 : 22:49 - 100% - 2.0GHz - 64C
11/12/2006 16:10 : 22:50 - 8.8% - 2.0GHz - 56C
11/12/2006 16:10 : 22:50 - 9.3% - 2.0GHz - 54C
11/12/2006 16:10 : 22:50 - 9.4% - 1.5GHz - 48C
11/12/2006 16:12 : 22:52 - 14.2% - 1.5GHz - 48C
11/12/2006 16:12 : 22:52 - 10.3% - 1.5GHz - 47C
Keep in mind that I was not aiming for scientific precision when executing these test. Both test were done while the notebooks where plugged to AC adapters and the power management was set to "Better Performance".

I have to say that I was surprised by the results of my "old" MBP. The average temperature of 64C is the best that I've seen for MBP CD. And I know what I'm talking about because this is my 3rd MBP CD.

When it comes to MBP C2D, the results were much better than my expected peak temperature of 84C. Considering that one of the MBP CD 2.0GHz that I returned to Apple (see my older post) was able to easily reach 91C, these results are really good.

The results coming from my "old" MBP could most likely be considered exceptional, so I think in general I can say that the new MBP C2D is cooler than the early revisions of MBP CD. Both the peak temperature and the temperature with the fans running at higher RPM are lower than what I was used to seeing at MBPs CD.

After running the test for 30minutes I could feel that the cases of both notebooks were getting warmer, but only the bottom side of notebooks could be considered more than warm. Based on my previous experience with first generation MBPs, this is far from what I was used to feeling.

After this test I ran a quick battery life test: I unplugged the MBP C2D from the AC adapter, set the power management to "Better Battery Life", set the LCD brightness to half and started listening to iTunes streaming radio (via WiFi). I left the bluetooth on as well. The resulting time was exactly 3 hours. Since this was the first discharge of the battery, I would not be surprised to see slightly better results after a few charge cycles. This result is also a slight improvement compared to MBP CD.

Tuesday, October 03, 2006

Does AppleCare?

I've bought a MacBook Pro in March after it was released in February and I totally fell in love with it. It's screaming fast, looks great and MacOS is simply the best desktop OS I've ever seen.

But every love brings some pain... and I have experienced this as well. I was warned about revision A of any Apple computers, but at that time I really needed a new notebook so I was not listening.

So even though I was in love with this computer I started noticing problems with it. I don't want to post list of all of them because it would be quite a long list, but among others, I had heat problems, battery life problems, and noises coming from LCD and CPU.

I made an extensive search for these issues on the Web and I found out that I was not alone. Many users tried to have these problems fixed right away, but most of them were just wasting time by shipping their notebooks to be repaired and getting them back with most of the issues still present.

After approximately 6 weeks of using the notebook, I got to the point where I called AppleCare and let them know about my problems, hoping that they would have already had solutions to most of the problems.

Most of the people at the AppleCare call center I dealt with were really friendly and put effort in helping me. The opposite is true of the so called "Mac Geniuses" at the Valley Fair AppleStore in Santa Clara, whose main interest was to get me out of their sight after doing as little as possible.

To my surprise most of the problems were unresolved after the first repair. So right after the time when Apple finally acknowledged the "CPU Whine" problem I had the notebook fixed again. A couple of issues were resolved this time, but new problems were added as a free bonus, so another repair followed. This one took extremely long (almost a month) due to delays in repair docks as well as shipping problems, but worst of the notebook came back as I sent it, unrepaired, because Apple "could not reproduce the problems".

When even after the 3rd repair the problems were still present and I "reproduced" terrible noise one of the fans was making to a AppleCare representative over the phone, I was given an option of getting a brand new replacement, which I happily took thinking that my nightmares were over.

To my great surprise the replacement had problems of its own: SuperDrive problems, system crashes and a problem with the trackpad button.

This whole crusade for getting a notebook that "works as advertised" has been going on for months now.. and I'm getting yet another replacement in the next few days. Hopefully this time it will be a notebook that has no major issues.

Does all of this mean that Apple products are not what I used to hear about them or am I being just plain unlucky?

And regarding the question: "Does AppleCare?", my feelings are mixed. I think the answer is that yeah they do, if you make sure they know about your problems, you are persistent and you manage to talk to the right people. But considering the money you pay for a premium product and support, I think that Mac Geniuses, the product QA team and repair technicians have a lot of room for improvement. I hope that Apple's growing market share doesn't mean decreasing quality of their products and services.