Planned improvements for boot device limitations?

Moderators: jhartley, MSR734, nola

Planned improvements for boot device limitations?

Post by Smolk » Sat Sep 15, 2012 2:42 am

I'll start out by expressing my gratitude. Thank you for providing this ZFS port for OS X (with the inclusion of the zfs/zpool commands, lots of joy)!
For many years, I kept my fingers crossed in vain, hoping Apple would provide this...

Being used to ZFS on other platforms, I was a bit surprised and disappointed when I discovered the ZEVO limitation where you can't create a file system on the boot device. My plan was to shrink the (MacBook Air) system partition and keep it as-is for boot purposes, and create a separate ZFS partition for user data.

Are there any plans allowing the creation of a pool on a partition on the boot device? Can this currently be forced with the zpool command somehow?
How about ZFS boot? Is this remotely feasible?

Again, thanks for providing this free of charge and for the time spent on the port!
Smolk Offline


 
Posts: 4
Joined: Sat Sep 15, 2012 12:04 am

Re: Planned improvements for boot device limitations?

Post by dbrady » Sat Sep 15, 2012 10:00 am

There isn't any limitation that prevents using a ZFS partition on the same disk as the boot volume. It's recommended that in most cases you should not share a disk with ZFS and another file system -- particularly with HFS+. Since HFS+ has a single global lock for all metadata updates (held across the I/O) it is highly sensitive to disk latencies. So for a typical HDD you won't want to share a disk. In the case of your Air with an SSD, you could share with less performance
impact than an HDD. If file system performance is less of an issue for you, the ''zpool create'' command will let you use a partition (e.g. /dev/disk2s3) even tough we recommend passing a whole disk slice (e.g. /dev/disk2).
dbrady Offline


 
Posts: 67
Joined: Wed Sep 12, 2012 12:43 am

Re: Planned improvements for boot device limitations?

Post by Smolk » Sun Sep 16, 2012 4:35 am

I tried creating a pool and thought I'd share some console output...
The file system "ZFS Pool" was unmounted prior to executing the commands.

Code: Select all
[air ~] diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *251.0 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS SSD                     100.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:                  Apple_HFS ZFS Pool                150.0 GB   disk0s4
[air ~] sudo zpool create pool /dev/disk0s4
Password:
diskutil eraseVolume failed, exit status 1


This was a bit odd, so I ran the following:
Code: Select all
sudo diskutil eraseVolume "ZFS Pool" ZFS /dev/disk0s4

... which worked a bit better, hooray!

Is ZFS-boot on the roadmap? It would be nice to work around that HFS+ lock and system wide ZFS would be soooo awesome!
Smolk Offline


 
Posts: 4
Joined: Sat Sep 15, 2012 12:04 am

Re: Planned improvements for boot device limitations?

Post by asmod4n » Sun Sep 16, 2012 7:04 am

it might be possible to only create a small "Boot" partition, like you do for linux and such which only contains the kernel and all needed drivers etc to boot the System, maybe one could create such a thing for osx to only have the kernel and zfs on there and the rest on a zfs filesystem.
That way one might also be able to include that in the rescue partition so diskutil there can recognize zfs too so you could restore your system from a time machine backup to a ZFS filesystem.

But that is just a theory, OS X only needs the bootloader and a kernel image on hfs+ to boot afaik, at least the bless command lets you think that.
asmod4n Offline


 
Posts: 2
Joined: Sat Sep 15, 2012 2:04 am

HFS+ disk latencies and metadata updates

Post by grahamperrin » Sun Sep 16, 2012 9:45 pm

HFS+ disk latencies and metadata updates

dbrady wrote:… Since HFS+ has a single global lock for all metadata updates (held across the I/O) it is highly sensitive to disk latencies.


That's most interesting. Please, do you have handy a link/reference on that subject? I ran a few searches but found nothing specific to HFS+.

(As background: I should add to something that I wrote in public a few months ago.)
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: Planned improvements for boot device limitations?

Post by grahamperrin » Sun Sep 16, 2012 11:00 pm

Smolk wrote:… shrink the (MacBook Air) system partition and keep it as-is for boot purposes, and create a separate ZFS partition for user data.


I did something like that in July with a MacBookPro5,2 (8 GB memory) after the original hard disk drive failed. In its place I put a hybrid, Seagate ST750LX003-1AC154:

  • 32 GB Apple_HFS jhfs+ for hibernatefile and swap at slice 2
  • experimental stuff at relatively small slices 3 and 4
  • around 100 GB Apple_CoreStorage with jhfs+ for the OS and applications at slice 5
  • around 615 GB Apple_CoreStorage with ZEVO and compression=on for my home directory at slice 7.

Given the more recent advice about latencies etc. I realise that this mixture with HFS+ is suboptimal, but for most purposes I find no problems with performance. YMMV.

Off-topic from ZFS: in some situations the swap partition mount point requires a little TLC, so I shouldn't recommend it to the average user. Also there's the question of whether encryption applies to a hibernatefile that is not on the root volume.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: HFS+ disk latencies and metadata updates

Post by si-ghan-bi » Mon Sep 17, 2012 12:39 pm

grahamperrin wrote:HFS+ disk latencies and metadata updates

dbrady wrote:… Since HFS+ has a single global lock for all metadata updates (held across the I/O) it is highly sensitive to disk latencies.


That's most interesting. Please, do you have handy a link/reference on that subject? I ran a few searches but found nothing specific to HFS+.


http://arstechnica.com/apple/2011/07/ma ... s-problems
si-ghan-bi Offline


 
Posts: 145
Joined: Sat Sep 15, 2012 5:55 am

thanks

Post by grahamperrin » Tue Sep 18, 2012 12:52 am

Thanks to si-ghan-bi – that's ideal.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

cross reference

Post by grahamperrin » Sun Sep 23, 2012 2:46 am

asmod4n wrote:… OS X only needs the bootloader and a kernel image on hfs+ to boot afaik, at least the bless command lets you think that.


I think it'll be good to have a single topic for booting. Related:

grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron