Discussion:
[linux-lvm] maximum length of logical volume name
Thanos Makatos
2013-11-06 15:04:34 UTC
Permalink
It seems that the maximum name length of a logical volume is 127 bytes (discovered by trial and error). Just to make sure we're using the correct value, is this value documented somewhere? Is it possible to retrieve it at run-time?

--
Thanos Makatos
Software Engineer (XenServer Storage)
Citrix Systems Ltd.
Cambridge, UK
Zdenek Kabelac
2013-11-06 15:46:21 UTC
Permalink
Post by Thanos Makatos
It seems that the maximum name length of a logical volume is 127 bytes (discovered by trial and error). Just to make sure we're using the correct value, is this value documented somewhere? Is it possible to retrieve it at run-time?
--
Hmm it's not documented in manpages - but there are some header file defines:

lvm-string.h NAME_LEN and dm-ioctl.h DM_NAME_LEN being 128char with '\0' included.

other limits are in 'man lvm' VALID NAMES sections.


There are no plans to change this hardcoded settings - thus no reason to put
in run-time function to obtain its value.

I guess the size for lvm name is also limited by vgname size - since together
with '-' it cannot be longer then 127 chars (max dm device name size)


Zdenek

Loading...