On Wed, 2007-12-12 at 21:35 -0600, David Dyer-Bennet wrote: > What are the approaches to finding what external USB disks are currently > connected?
Would "rmformat -l" or "eject -l" fit the bill ? > The external USB backup disks in question have ZFS filesystems on them, > which may make a difference in finding them perhaps? Nice. I dug around a bit with this a while back, and I'm not sure hal & friends are doing the right thing with zpools on removable devices just yet. I'd expect that we'd have a "zpool import" triggered on a device being plugged, analogous to the way we have pcfs disks automatically mounted by the system. Indeed there's /usr/lib/hal/hal-storage-zpool-export /usr/lib/hal/hal-storage-zpool-import and /etc/hal/fdi/policy/10osvendor/20-zfs-methods.fdi but I haven't seen them actually doing anything useful when I insert a disk with a pool on it. Does anyone know whether these should be working now ? I'm not a hal expert... > I've glanced at Tim Foster's autobackup and related scripts, and they're > all about being triggered by the plug connection being made; which is > not what I need. Yep, fair enough. > I don't actually want to start the big backup when I > plug in (or power on) the drive in the evening, it's supposed to wait > until late (to avoid competition with users). (His autosnapshot script > may be just what I need for that part, though.) The zfs-auto-snapshot service can perform a backup using a command set in the "zfs/backup-save-cmd" property. Setting that be a script that automagically selects a USB device (from a known list, or one with free space?) and points the stream at a relevant "zfs recv" command to the pool provided by your backup device might be just what you're after. Perhaps this is a project for the Christmas holidays :-) cheers, tim -- Tim Foster, Sun Microsystems Inc, Solaris Engineering Ops http://blogs.sun.com/timf _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss