Hi,

I'd like to be able to utter cmdlines such as

$ zfs set readonly=on .
$ zfs snapshot [EMAIL PROTECTED]

with '.' interpreted to mean the dataset corresponding to
the current working directory.

This would shorten what I find to be a very common operaration -
that of discovering your current (working directory) dataset
and performing some operation on it.  I usally do this
with df and some cut and paste:

([EMAIL PROTECTED]:fx-review/fmaxvm-review2/usr/src/uts )-> df -h .
Filesystem             size   used  avail capacity  Mounted on
tank/scratch/gavinm/fx-review/fmaxvm-review2
                        1.0T    15G   287G     5%    
/tank/scratch/gavinm/fx-review/fmaxvm-review2

([EMAIL PROTECTED]:fx-review/fmaxvm-review2/usr/src/uts )-> zfs set readonly=on 
tank/scratch/gavinm/fx-review/fmaxvm-review2

I know I could script this, but I'm thing of general ease-of-use.
The failure semantics where . is not a zfs filesystem are clear;
perhaps one concern would be that it would be all to easy to
target the wrong dataset with something like 'zfs destroy .' - I'd
be happy to restrict the usage to non-destructive operations only.

Cheers

Gavin


_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to