I''m guessing there is some mechanism for this and I''m just slow on picking up on it... is there a way to make annotations about a zpools structure or intended use .. that sort of stuff... that shows up in `zfs list'' or some other command? I guess the next step would be a way to show all annotations at once... similar to what `zfs list'' does with no zpool name. So, is there something that can do any of that?
On Oct 6, 2009, at 11:58 AM, Harry Putnam wrote:> I''m guessing there is some mechanism for this and I''m just slow on > picking up on it... is there a way to make annotations about a zpools > structure or intended use .. that sort of stuff... that shows up in > `zfs list'' or some other command?You can set "user properties" with the zpool or zfs set command. Use zpool or zfs get to retrieve them. See the man pages for details. -- richard> I guess the next step would be a way to show all annotations at > once... similar to what `zfs list'' does with no zpool name. > > So, is there something that can do any of that? > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Richard Elling <richard.elling at gmail.com> writes:> On Oct 6, 2009, at 11:58 AM, Harry Putnam wrote: > >> I''m guessing there is some mechanism for this and I''m just slow on >> picking up on it... is there a way to make annotations about a zpools >> structure or intended use .. that sort of stuff... that shows up in >> `zfs list'' or some other command? > > You can set "user properties" with the zpool or zfs set command. > Use zpool or zfs get to retrieve them. See the man pages for details. > -- richard >[...] Thanks for the tip... after digging around in man zpool with no luck I found the stuff in `man zfs'' after a few presses of `/User Properties'' Unfortunately.. I didn''t really understand it.... the naming part was quite confusing at least to me>From man zfs:User property names must contain a colon (:) character to distinguish them from native properties. They may contain lowercase letters, numbers, and the following punctuation characters: colon (:), dash (-), period (.), and underscore (_). The expected convention is that the property name is divided into two portions such as module:property, but this namespace is not enforced by ZFS. User property names can be at most 256 characters, and cannot begin with a dash (-). I started thinking I understood it until they showed an example: module:property What is meant by `module''.. the term implies some kind of package or bundle of tools or such... I don''t get that... I was thinking of something like set use:"z3 use - mirror rhosts public_html" Which doesn''t appear to be anything like the example When making programmatic use of user properties, it is strongly suggested to use a reversed DNS domain name for the module component of property names to reduce the chance that two independently-developed packages use the same property name for different purposes. Property names beginning with com.sun. are reserved for use by Sun Microsystems. Egad, what on earth does this mean...? What do they mean by `programmatic use''.. seems to be something far afield from a notation. Trying my best shot...: zfs set use:"use to mirror rhosts public_html" z3 Of course, is a complete failure and error tells me `User-defined properties can be specified by using a name containing a colon (:).''>From where I sit there is a colon.The error message also shows: missing value in property=value argument usage: set <property=value> <filesystem|volume|snapshot> ... Those also appear to be satisfied. Clearly I''m missing a serious part of this.
Harry Putnam <reader at newsguy.com> writes: [...]> > Trying my best shot...: > zfs set use:"use to mirror rhosts public_html" z3Egad the `='' somehow went right past me Sorry for the line noise.
On Tue, Oct 06, 2009 at 06:53:15PM -0500, Harry Putnam wrote:> I don''t get that... I was thinking of something like > > set use:"z3 use - mirror rhosts public_html"Probably something more like: zfs set local:use="mirror rhosts public_html" tank/pubfs "local" means nothing here. Just something to put on the left side of the colon. -- Darren
On Tue, October 6, 2009 19:02, Harry Putnam wrote:> Harry Putnam <reader at newsguy.com> writes: > > > [...] > >> >> Trying my best shot...: >> zfs set use:"use to mirror rhosts public_html" z3 > > Egad the `='' somehow went right past me > Sorry for the line noise.Glad I read ahead before replying :-). On the other part, the "reverse FQDN" suggestion, and the reference to "programmatic use" -- they''re trying, I believe, to get at the idea that, if you write software (including scripts) that use ZFS user properties to keep track of some information, you should use a (particular) naming convention to make sure your names don''t conflict with the names anybody else is using. This is clearly a desirable goal :-). For example, I''m developing a new set of scripts for handling my backups on my home NAS. I want to put a property on snapshots made by this software, to unambiguously identify them as belonging to my backup system (rather than just depending on a name format). The name I''m using for that property is "net.dd-b:bup". "net.dd-b" is "dd-b.net" in most-significant-part-first order (see my email address; I''m dd-b.net). "bup" is what I''m calling my backup scripts. Using a colon between them gets me my required colon for a user property name. Any clearer? -- David Dyer-Bennet, dd-b at dd-b.net; http://dd-b.net/ Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/ Photos: http://dd-b.net/photography/gallery/ Dragaera: http://dragaera.info
"David Dyer-Bennet" <dd-b at dd-b.net> writes:> On Tue, October 6, 2009 19:02, Harry Putnam wrote: >> Harry Putnam <reader at newsguy.com> writes: >> >> >> [...] >> >>> >>> Trying my best shot...: >>> zfs set use:"use to mirror rhosts public_html" z3 >> >> Egad the `='' somehow went right past me >> Sorry for the line noise. > > Glad I read ahead before replying :-).[...] snipped nifty examples> Any clearer?Nice ... thanks A Darren Dunham <ddunham at taos.com> writes: [...]> Probably something more like: > zfs set local:use="mirror rhosts public_html" tank/pubfs > > "local" means nothing here. Just something to put on the left side of > the colon.Thank you ... I did manage finally to get to something usable... Also learned how to remove any false starts from `get all'' output `zfs inherit whatever:was_set tank''
A Darren Dunham <ddunham at taos.com> writes:> On Tue, Oct 06, 2009 at 06:53:15PM -0500, Harry Putnam wrote: >> I don''t get that... I was thinking of something like >> >> set use:"z3 use - mirror rhosts public_html" > > Probably something more like: > zfs set local:use="mirror rhosts public_html" tank/pubfs > > "local" means nothing here. Just something to put on the left side of > the colon.Yes, thanks... I did get it working now..