Discussion:
[linux-lvm] new max tag length?
Oliver Rath
2018-01-07 01:04:06 UTC
Permalink
Hi List,

Ive read here, the max length of a tag is 128:
https://www.suse.com/documentation/sles11/stor_admin/data/lvmtagging.html

But the following command works fine:

sudo lvchange --addtag `printf 'z%.0s' {1..66666}` levg/t8

What is actual the max length? When was the change?

Tfh!

Oliver
Alasdair G Kergon
2018-01-07 02:52:21 UTC
Permalink
Post by Oliver Rath
https://www.suse.com/documentation/sles11/stor_admin/data/lvmtagging.html
The original spec for this work remains in the source tree,
docs/tagging.spec:

+ 1) Tag character set: A-Za-z0-9_+.-
+ Can't start with hyphen & max length is 128 (NAME_LEN).


Then if you look at WHATS_NEW:

Version 2.02.77 - 22nd November 2010
====================================
...
Remove tag length restriction and allow / = ! : # & characters.

Alasdair
Oliver Rath
2018-01-10 16:46:49 UTC
Permalink
Hi Alasdair,

thank you very much for the hint! But .. (see below)
Post by Alasdair G Kergon
Post by Oliver Rath
https://www.suse.com/documentation/sles11/stor_admin/data/lvmtagging.html
The original spec for this work remains in the source tree,
+ 1) Tag character set: A-Za-z0-9_+.-
+ Can't start with hyphen & max length is 128 (NAME_LEN).
Ive tried much more then 65000 chars and it worked:

# lvchange --addtag `printf 'z%.0s' {1..77777}` levg/testsnap
  Logical volume levg/testsnap changed.

# lvs -o lv_tags levg/testsnap
... [lots of z´s] ...

Its definitly more than 128 characters .. Whats wrong now?

Regards,
Oliver

Continue reading on narkive:
Loading...