Thursday November 17, 2005 | Artem's Weblog |
|
UPDATE 19-Jul-2006: It looks like this blog entry is still getting hits from search engines and the USB FAQ, so here's an update. Since I wrote the entry, the project I said was under way has now been integrated in Nevada Build 36, Solaris Express 4/06 and Solaris 10 6/06 Release. It is mentioned in Dan's what's new blog as: * Hotpluggable drives are now better able to accomodate EFI-labels and device IDs, both of which are very important to supporting ZFS on USB and Firewire disk drives. [6348407] If you use one of these releases or later, the hack described below is not necessary (and as Brian noted, may cause some error messages). END UPDATE ZFS is awesome. I'd bust some zeerleading moves for y'all, but I misplaced my pom poms and it wasn't going to be pretty anyway. Instead I will tell you how to try ZFS on your laptop (or any computer without a spare fixed disk). There is no supported way to create ZFS pools on USB disks yet, although a project is under way to rectify this (you can have limited ZFS functionality using lofi(7D)). What follows is a hack, use it at your own risk. Before we proceed, you should get vold(1M) out of the way: # svcadm disable volfs An important thing to know in this context is that you can't create a pool on removable media devices, i.e. the ones whose storage media can be removed. DVD drives and flash readers are removable media, hard disks are not. So you'll need one or more USB hard disks. Most USB hard disks and IDE-to-USB enclosures should work. Thumb drives are not likely to work. In this experiment I'm using two USB 2.0 disks: a 20GB LaCie and a 40GB IOGEAR. For the reasons that are beyond this blog entry, the Solaris USB driver presents any USB storage device as removable media. A simple command to list removable and non-removable disks is format(1M). Quoting the man page:
Run format with and without -e and notice the difference:
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1d0
c4t0d0 and c5t0d0 are USB disks. What we're going to do is tell the USB driver not to treat hard disks as removable media. This can be done by appending the following line to /kernel/drv/scsa2usb.conf file: attribute-override-list = "vid=* removable=false"; Reboot for these changes to take effect. Now all your USB hard disks are going to be treated as fixed (but you can still hotplug them). You can verify that by running format without -e option - if it still doesn't list your USB disk, most likely it's one of the rare samples that pretends to be removable media and that's a hack for another day. Now you can use these disks just like any fixed disk:
# zpool create usbpool mirror c4t0d0 c5t0d0
# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
usbpool 27.8G 33.0K 27.7G 0% ONLINE -
# zpool status
pool: usbpool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
usbpool ONLINE 0 0 0
mirror ONLINE 0 0 0
c4t0d0 ONLINE 0 0 0
c5t0d0 ONLINE 0 0 0
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
usbpool 32K 27.5G 8K /usbpool
Tags:
Solaris
OpenSolaris
USB
ZFS
Trackback URL: http://blogs.sun.com/artem/entry/zfs_on_the_go
Post a Comment: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Posted by vincent saka on July 14, 2006 at 10:02 AM PDT #
The modification of scsa2usb.conf is no longer necessary. See http://blogs.sun.com/roller/page/blu/20060719
Posted by Brian Utterback on July 19, 2006 at 10:30 AM PDT #
Posted by vincent saka on August 03, 2006 at 07:21 AM PDT #
Posted by mikeh on December 08, 2006 at 10:51 AM PST #
Posted by GordonB on April 05, 2007 at 08:54 PM PDT #
I use Solaris 10 for X86.
my flash disk can not be detected and sound system also have the same problem.
thanks.
Posted by Hiruy on October 11, 2007 at 05:59 AM PDT #
Very nice! Works great with a WD ELEMENTS 160GB/Go mobile harddisk. SPEEED!
Posted by Patrick Blaas on October 12, 2007 at 12:41 PM PDT #