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

10.5: Unmount ZFS filesystems on USB drives System 10.5
If you are lucky enough to be test driving ZFS on you Mac, you might find this useful. The latest ZFS build from Macosforge.com has a problem where ejecting a ZFS-formatted USB disk and unplugging it will crash Leopard.

However, I wrote an Automator action [286KB download] that will sudo and run a ZFS export on all mounted ZFS filesystems, so you can safely unplug your USB drive with ZFS on it.

[robg adds: I haven't tested this one.]
    •    
  • Currently 2.17 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[8,635 views]  

10.5: Unmount ZFS filesystems on USB drives | 8 comments | Create New Account
Click here to return to the '10.5: Unmount ZFS filesystems on USB drives' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Unmount ZFS filesystems on USB drives
Authored by: asmeurer on Jan 05, '09 09:53:20AM

I hope this becomes native in Snow Leopard. I would love to switch all of my drives to ZFS.



[ Reply to This | # ]
10.5: Unmount ZFS filesystems on USB drives
Authored by: jiclark on Jan 06, '09 07:03:12PM

Okay you ZFS experts, how about a link to where we lesser mortals can learn more about this new disk format?? What are it's big advantages?

;-}
John



[ Reply to This | # ]
10.5: Unmount ZFS filesystems on USB drives
Authored by: asmeurer on Jan 07, '09 10:47:45AM
You could have just clicked on What is ZFS? on the page linked to in the hint. Check it out, it's really cool.

[ Reply to This | # ]
10.5: Unmount ZFS filesystems on USB drives
Authored by: Anonymous on Jan 11, '09 01:51:39PM

ZFS is for the tech heads out there and also is very useful when you have had to manage RAID systems. I have so much space on drives not been used, migrating data is a pain and always a risk..ZFS would allow you to "pool" drive space together dynamically without reformatting ie. i have 3 external drives 300gb,400gb,200gb "pooled" together to provide one drive of 900gb of space i can then add another drive of say 750Gb to this to make the space be 1650GB....

plus the system is very clever with error checking and can support huge amounts of storage space....lets see how it unfolds....i am already impressed and hope for roll out !!!!



[ Reply to This | # ]
10.5: Unmount ZFS filesystems on USB drives
Authored by: rswwalker on Jan 11, '09 10:58:35AM

As far as ZFS basics go look at the wikipedia entry on it.

By far the biggest benefit I see is the error detecting/correcting feature which verifies that all data is accurate on the disk media which prevents undetected corruption.

The copy-on-write transactional log system is nice, all data written is written to new disk blocks, and only after it is confirmed that it is written are the old blocks dereferenced, that means that all data on disk is consistent, or no need to ever fsck a file system on mount!

The copy-on-write system means that disk snapshots take no overhead or additional performance penalty, so make as many as you want, which would be a killer use for Time Machine instead of it's hard links between directories which are wasteful and time consuming.

File systems can instantly be rolled back to any previous snapshot.

There are plenty more, but by now one should see that ZFS would provide much better reliability for disk media, fixed or removable on a consumer system like OS X.



[ Reply to This | # ]
This download is suspicious
Authored by: anagram1024 on Feb 06, '09 06:21:55PM

This app prompted me for the location to iphoto and aperture, then crashed. Frankly, I think it's a trojan and I feel foolish for running it.



[ Reply to This | # ]
This download is suspicious
Authored by: palahala on Feb 07, '09 04:09:08AM
It just seems to try to close those programs first. I don't know why. In the package you will find:
--Written by Aric Friesen 9/30/2006
--Modified by Grady Neely 12/29/2008

on run {input, parameters}
	tell application "System Events"
		set the_username to do shell script "whoami"
		set the_password to "your_password_here"
		--		display dialog "You now need to enter the password for the currently logged in account: 
		--" & the_username & "
		
		--This account must have Administrator access to this computer." default answer "password" buttons {"OK", "Cancel"} default button "OK" with icon 2 with title "Password" with hidden answer
		--		set the_password to text returned of the result
	end tell
	if application "iTunes" is running then quit application "iTunes"
	if application "iPhoto" is running then quit application "iPhoto"
	if application "Aperture" is running then quit application "Aperture"
	-- quit verb doesn't wait till it's closed; wait for it
	repeat while application "iTunes" is running
		delay 0.5
	end repeat
	repeat while application "iPhoto" is running
		delay 0.5
	end repeat

	repeat while application "Aperture" is running
		delay 0.5
	end repeat
	return {the_password}
end run
And the actual export action:
#!/bin/bash

exec echo $1 | sudo -v -S;
if [ $? -eq 1 ]	
then
	echo "you are not a sudoer";
else
	exec echo $1 | sudo -S sh -c 'zpool list | cut -d" " -f1 | grep -v NAME | xargs zpool export -f'
fi


[ Reply to This | # ]
This download is suspicious
Authored by: palahala on Feb 07, '09 04:11:29AM

(oops, sorry for messing up the layout, caused by the long lines in the code snippet -- I didn't realize that in preview. For whoever has the power: please adjust my previous comment...)



[ Reply to This | # ]