Operating System - HP-UX
1846964 Members
4381 Online
110257 Solutions
New Discussion

Limitation of an lvol device name

 
SOLVED
Go to solution
Holger Knoppik
Valued Contributor

Limitation of an lvol device name

Hi all,

short question:
I want to create a new lvol on my machines. How long can be the name of the device file ?
Here's what i mean: /dev/vg01/lvol_withaverylongnamewhichhopefullywillworkfineifnotihaveaproblem
Does it behave like a normal filename limit with 255 characters or is there something else i should take care of ?

Software:
OS: HP-UX 11.00 64bit
MC/SG A.11.13
CIFS/9000 A.01.08
Servers:
HP9000 L2000-440

TIA

RGDS, Holger
Live long and prosper!
7 REPLIES 7
Shahul
Esteemed Contributor

Re: Limitation of an lvol device name


hi

I am havn't seen any restriction for lvol naming, other than the normal file name restrictions.

Best of luck
Shahul
MANOJ SRIVASTAVA
Honored Contributor
Solution

Re: Limitation of an lvol device name

Hi Holger

You may like to look at this :

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90672/B2355-90672_top.html&con=/hpux/onlinedocs/B2355-90672/00/00/30-con.html&toc=/hpux/onlinedocs/B2355-90672/00/00/30-toc.html&searchterms=a%7clvol%7cdevice%7cNaming&queryid=20020626-075115


Also from the link :

Naming Logical Volumes

Logical volumes are identified by their device file names which can either be assigned by you or assigned by default when you create a logical volume using lvcreate (1M).

When assigned by you, you can choose whatever name you wish up to 255 characters.

When assigned by default, these names take the form: /dev/vgnn/lvolN (the block device file form) and /dev/vgnn/rlvolN (the character device file form). The number N starts at 1 and proceeds 2, 3, and so on, in the order that logical volumes are created within each volume group.

When LVM creates a logical volume, it creates both block and character device files. LVM then places the device files for a logical volume in the appropriate volume group directory.

For example, the default block name for the first logical volume created in volume group vg01 would have the full path name:

/dev/vg01/lvol1
If you create a logical volume to contain raw data for a sales database, you might want to name it using a non-default name:
/dev/vg01/sales_db_lv
After the logical volume in the above example has been created, it will have two device files:
/dev/vg01/sales_db_lv
(the block device file)
/dev/vg01/rsales_db_lv
(the character, or raw, device file)

It should behaev normally excpet when you want to put it as a home directory in /etc/passwd bczo there are limitation over there .


Manoj Srivastava
S.K. Chan
Honored Contributor

Re: Limitation of an lvol device name

Nothing for you to take care of. It'll take up to 255 characters.
A. Clay Stephenson
Acclaimed Contributor

Re: Limitation of an lvol device name

How about a Plan B?

Keep the LVOL name fairly standard and then use a symbolic link
ln -s /dev/vg04/lvolsimple /really/strange/fiilenameXXXXXXXXXXXXXXXXXXXXXXXXXX
If it ain't broke, I can fix that.
Jeff Schussele
Honored Contributor

Re: Limitation of an lvol device name

Hi Holger,

If you REALLY need a long lvol name, then Clay's solution would be the one I'd use. I certainly wouldn't want to have to type that name EVERY time I wished to check or mod it. And you still could use the long name for whatever reson you need to.
Two caveats:
1) - ABSOLUTELY no spaces allowed in the name & I'd avoid special chars. Stick to alphanumeric & all should be well.
2) - The LV name will also contain the /dev/vgxxx value, so bear that in mind. Can't put ALL 255 chars in the LV "name" alone.

Rgds,
Jeff

PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Holger Knoppik
Valued Contributor

Re: Limitation of an lvol device name

OK,

thanx everybody for your quick assistance. Clay, I'll keep that trick in mind for more complex systems, which we will probably have in the future (I don't really think so, but it sounds very interesting!) As you all can see, we're using a HA CIFS/9000 environment, nothing what has to do with large databases, but my customers are getting hungry in disk space ;-)

CU

RGDS, Holger
Live long and prosper!
Martha Mueller
Super Advisor

Re: Limitation of an lvol device name

You may find that sam will only display a limited number of characters for the lvol name. If you name the lvol's with identical first part of the names, you may not be able to tell them apart.