1834454 Members
2271 Online
110067 Solutions
New Discussion

lvsplit

 
SOLVED
Go to solution
H_16
Trusted Contributor

lvsplit


I have just carried out a lvsplit -s 2212 /dev/vg01/lvol_u06_0512

However, it has named the split copy as lvol_u06_05122212. Is there anyway of renaming this lvol within LVM ??
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: lvsplit

Hi,

From the man page for lvsplit:

"If the -s option is specified, the new logical volume name has the
form lv_pathsuffix. If -s is not specified, suffix defaults to b, as
in lv_pathb."

So, the name lvol_u06_05122212 is exactly what should have resulted.

I don't believe you can rename the lvol without going through some sort of vgexport/vgimport scenario and massaging the lvol names during the import.


Pete

Pete
Jean-Louis Phelix
Honored Contributor
Solution

Re: lvsplit

Hi,

Yes you can simply do it by renaming BOTH /dev/vg01/lvol_u06_05122212 and /dev/vg01/rlvol_u06_05122212. Just use 'mv' but check first that they are not mounted. This can be done even with vg activated. Renaming a vg is harder because it needs the export/import.

Regards.
It works for me (© Bill McNAMARA ...)
Mark Grant
Honored Contributor

Re: lvsplit

I suppose you could join it together again "lvmerge" and then try again witha different suffix, or non at all.
Never preceed any demonstration with anything more predictive than "watch this"
Steven E. Protter
Exalted Contributor

Re: lvsplit

You can actually rename the actual files in /dev/vg01 now on the split volume. It will work just fine.

Just make sure you get the character device and the blcok device and its corresponding character device.

I usually use the mv command.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
G. Vrijhoeven
Honored Contributor

Re: lvsplit

Hi,

You can merge the lvol again
#lvmerge /dev/vg01/lvol_u06_0512 /dev/vg01/2212
(/usr/sbin/lvmerge [-A autobackup] dest_lv_path src_lv_path )
and redo the lvsplit with the name you want specified.

Gideon



Bruno Ganino
Honored Contributor

Re: lvsplit

I believe that with mv command, could to be renamed!
Bruno
Torino (Turin) +2H
James Lynch
Valued Contributor

Re: lvsplit

Logical volume names are only for user conveinence and ease of use. LVM deals with lvols by their device minor numbers only, it could care less what the name is. The LVM commands display the lvol name by looking at the name of the corresponding device file in /dev/vgxx/lvol....

JL
Wild turkey surprise? I love wild turkey surprise!