File versions and ZFS

Moderators: jhartley, MSR734, nola

Re: File versions and ZFS

Post by amteza » Mon Nov 05, 2012 4:49 pm

grahamperrin wrote:amteza or chriswayg, please: with the ZFS file systems that appear to work for you, can you record the screen whilst demonstrating compatibility?

Ok, here it is: http://goo.gl/c4Fvo

Cheers.
amteza Offline


 
Posts: 22
Joined: Wed Oct 17, 2012 4:40 am
Location: Spain

Re: File versions and ZFS

Post by grahamperrin » Mon Nov 05, 2012 10:49 pm

Perfect, thanks.

Common to our configurations

ZEVO ZFS for home directories.

Differences

Home directory for amteza seems to be
/Users/casa
where
Users is a root dataset.

Home directory for gjp22 (me) is
/Volumes/gjp22
where
gjp22 is a root dataset

Observations

With the exception of dataset gjp22 all my other datasets are ejectable. None of these work with permanent version storage.

The new dataset that I tested on the previous page does not work with permanent version storage for Pages '09 4.2 (1008).

Encryption. In CoreStorage world, the content hint for logical volume gjp22-cs is Apple_HFS … since that CoreStorage LV is given to ZEVO, that hint is untrue.

gpj22-cs typically at disk2 contains the ZFS slice for zfs_pool_proxy gjp22 at disk3:

Code: Select all
macbookpro08-centrim:~ gjp22$ diskutil list disk2 && diskutil list disk3
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *616.0 GB   disk2
   1:                        EFI                         209.7 MB   disk2s1
   2:                        ZFS                         615.7 GB   disk2s2
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:             zfs_pool_proxy gjp22                  *614.2 GB   disk3


The physical disk for dataset gjp22 is internal to a MacBookPro5,2. This dataset does not work with permanent version storage.

I reproduced the limitation with a new child file system of gjp22.

Question

amteza, are all disks for your Users dataset internal?

Do your ejectable ZFS volumes on external disks work with permanent version storage?
grahamperrin Offline

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

Re: File versions and ZFS

Post by chriswayg » Tue Nov 06, 2012 3:19 am

Edit: Just saw your new posts after posting this...

Do your ejectable ZFS volumes on external disks work with permanent version storage?

My ejectable volume on an external Firewire hard disk work fine with permanent version storage.

Here are my results from today's testing. It seems we get different results depending on how we do it:
Image
Image
Image
Image
This sequence of screenshots shows that it works without problems. And that was the behavior consistently yesterday. It still works today, but now I get an additional dialog, which did not show up before.

If I try to close the file using "File Close" or the close button, I get the following:
Image

If I click OK, I will loose my Versions history. If I click Cancel and instead close the application with 'Quit TextEdit', 'Quit Preview' or Command Q, the file will be closed, but the version history will be preserved. I tried this on two different user accounts.

Mac OS X 10.8.2 Versions behaviour here is very inconsistent. Did the change of date or number of hours passed make a difference? What changed within the last 12 hours on the file system to cause a different behaviour?

Here is my current working theory:

* Technically there are no limitations for File Versions to work on ZFS volumes, since it works consistently when closing the application (rather than the file)
* When closing an individual file, OS X checks for filesystem compatibility and 'thinks' that ZFS is not compatible. It therefore sets some kind of flag on the file (or in the filesystem?), which then causes this file to not display Versions during the next opening.
* This check is apparently not performed when the application is closed (and thereby all open files are closed) As the check is not performed when closing the application, the flag is not set and the files maintain their Versions during the next opening.
* We should ask Apple to flag ZFS as being versions compatible.
* Would Don be able to talk to some Apple engineers about this, as Versions is a major feature of Lion+, and it would be too bad to loose its functionality over an unnecessary flag being set?

Please verify (or refine) my theory based on your own testing. There may be other variables involved.

Some things that I would like to explore until hopefully Apple fixes this:
* If there is a flag set on the file when clicking OK on the warning dialog, where is that flag being set and could this flag be deleted, thereby regaining a lost version history?
* If we could trace where this compatibility check is being performed, could we possibly binary patch the executable file to skip this check?
Last edited by chriswayg on Tue Nov 06, 2012 3:25 am, edited 1 time in total.
chriswayg Offline


 
Posts: 19
Joined: Sun Nov 04, 2012 8:27 am

Re: File versions and ZFS

Post by amteza » Tue Nov 06, 2012 3:20 am

grahamperrin wrote:amteza, are all disks for your Users dataset internal?

Yes, they are.

But! Something curious, in my MacBook Pro it doesn't work!

Code: Select all
sharrow:~ Berto$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *256.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            55.0 GB    disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:                        ZFS                         70.2 GB    disk0s4
   5:                        ZFS                         129.7 GB   disk0s5
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:             zfs_pool_proxy ZFSPool                *198.6 GB   disk1
   1:       zfs_filesystem_proxy Users                   154.2 GB   disk1s1
   2:       zfs_filesystem_proxy Parallels               136.1 GB   disk1s2

sharrow:~ Berto$ zfs list
NAME                 USED   AVAIL   REFER  MOUNTPOINT
ZFSPool             101Gi  81,3Gi   150Ki  /Volumes/ZFSPool
ZFSPool/Parallels  43,5Gi  81,3Gi  38,1Gi  /Volumes/ZFSPool/Parallels
ZFSPool/Users      57,3Gi  81,3Gi  55,8Gi  /Users

Something is different between my iMac and my MacBook Pro. Any suggestion in what to look for?

grahamperrin wrote:Do your ejectable ZFS volumes on external disks work with permanent version storage?

I'll try when I get home.

Cheers.
amteza Offline


 
Posts: 22
Joined: Wed Oct 17, 2012 4:40 am
Location: Spain

Re: File versions and ZFS

Post by amteza » Tue Nov 06, 2012 3:21 am

chriswayg wrote:If I click OK, I will loose my Versions history. If I click Cancel and instead close the application with 'Quit TextEdit', 'Quit Preview' or Command Q, the file will be closed, but the version history will be preserved. I tried this on two different user accounts.

Nice finding! That's it! I clicked on my iMac that checkbox to avoid that message and that's why I didn't see it. But, to get it working as you said I discovered taht you have to disable: Close windows when quitting an application.

Image
amteza Offline


 
Posts: 22
Joined: Wed Oct 17, 2012 4:40 am
Location: Spain

Re: File versions and ZFS

Post by chriswayg » Tue Nov 06, 2012 3:44 am

amteza wrote: But, to get it working as you said I discovered that you have to disable: Close windows when quitting an application

Correct, I have that setting unchecked and as far as I can remember I never touched it. I just looked at the setting on a MacBook Air and it seems to be the default to have it unchecked.
chriswayg Offline


 
Posts: 19
Joined: Sun Nov 04, 2012 8:27 am

Re: File versions and ZFS

Post by amteza » Tue Nov 06, 2012 3:51 am

chriswayg wrote:
amteza wrote: But, to get it working as you said I discovered that you have to disable: Close windows when quitting an application

Correct, I have that setting unchecked and as far as I can remember I never touched it. I just looked at the setting on a MacBook Air and it seems to be the default to have it unchecked.

If you do a fresh install of Mountain Lion that option is enabled by default, in Lion it was disabled by default, if you upgraded your OS that's why you've it disabled. :)
amteza Offline


 
Posts: 22
Joined: Wed Oct 17, 2012 4:40 am
Location: Spain

Re: File versions and ZFS

Post by chriswayg » Tue Nov 06, 2012 3:59 am

My zfs pool is also set up somewhat differently (external Firewire HD on MacBook Pro):
Code: Select all
MacBook:~ root# diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *750.2 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS MacHD                   708.5 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:       Microsoft Basic Data BOOTCAMP                40.8 GB    disk0s4
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *499.4 GB   disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                        ZFS                         499.1 GB   disk1s2
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:             zfs_pool_proxy Zdata                  *498.2 GB   disk2

Code: Select all
MacBook:~ root# zfs list
NAME     USED   AVAIL   REFER  MOUNTPOINT
Zdata   102Gi   354Gi  89.4Gi  /Volumes/Zdata


Edit: More limitations :(
I just tried, if the versions history is preserved when using the external HD on another computer, plugging the drive into a MacBook Air with 10.8.2 and found out, that Versions are lost when opening the files there. Even when using it on the same computer, but on different accounts, the version history is lost. It is only maintained while staying in the same account.

* Thus maybe Versions really cannot store its information on a ZFS formatted drive and somehow temporarily caches the version history within the same account on the HFS drive, which then is lost when trying this in another account or on another machine.
chriswayg Offline


 
Posts: 19
Joined: Sun Nov 04, 2012 8:27 am

Re: File versions and ZFS

Post by grahamperrin » Tue Nov 06, 2012 1:24 pm

amteza wrote:… disable: Close windows when quitting an application.


Done, long ago. (Since before Lion was released, I prefer windows to reopen when the app reopens.)
grahamperrin Offline

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

Re: File versions and ZFS

Post by grahamperrin » Tue Nov 06, 2012 1:39 pm

For a file saved to ZFS, any versions that you see are probably:

  • not permanently stored in that file system
  • stored for as long as possible in your ~/Library

There's a common misconception that in all cases, everything related to Apple versions is stored under
.DocumentRevisions-V100
at the root of the file system.

In greater detail …

chriswayg wrote:… on another computer … Versions are lost … version history within the same account on the HFS drive, which then is lost when trying this in another account or on another machine.


In Ask Different, under Do OS X Lion's Versions and Resume features store the cached data for encrypted .sparsebundle images in a secure way?: Data related to Apple versions is sometimes not limited to /.DocumentRevisions-V100

> … subdirectories of ~/Library are used …
grahamperrin Offline

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

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 0 guests

cron