LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-12-2015, 07:10 PM   #1
joe30030
LQ Newbie
 
Registered: Mar 2015
Location: Decatur, Georgia
Distribution: ubuntu server 14.04
Posts: 7

Rep: Reputation: Disabled
Question Automatic LVM names include hyphens


I am trying to setup an Ubuntu server and have been running into trouble with the automatic LVM naming including a hyphen. IE HomeServer-vg.

I have gotten errors when partitioning in webmin and have seen the volume group written with two hyphens instead of one(HomeServer--vg) but haven't figured out the proper way to deal with it. I finally reinstalled the server from the beginning and followed some instructions to rename the volume group and took out the hyphen. No more errors in webmin, but I have to assume I am missing a normal bit of knowledge that everyone knows about this. I just installed a virtual machine and it created a volume group name with a hyphen also.

So, what am I missing?
 
Old 03-14-2015, 09:54 AM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
When you enter a parameter on the command line containing 2 hyphens, the command interpreter believes it is the next option. E.g. myparm--1: the "1" is considered the next option.

myparm-1 is fine, because the interpreter allows single hyphens in parameters. Command line parsing handles this correctly.

jlinkels
 
Old 03-14-2015, 04:39 PM   #3
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
The situation is a bit different, with LVM if a name contains an embedded hyphen, this gets shown as a double hyphen.

As I recall
I set up some Logical Volumes with single embedded hyphens, but the physical volumes and volume groups had no hyphens.

I'm pretty sure that if you use a single hyphen - even though the mount command shows that /dev/mapper/... has got a double hyphenated name, everything works out OK.
 
Old 03-14-2015, 11:08 PM   #4
joe30030
LQ Newbie
 
Registered: Mar 2015
Location: Decatur, Georgia
Distribution: ubuntu server 14.04
Posts: 7

Original Poster
Rep: Reputation: Disabled
I'm sure I'm not asking the right question.

Yes, the default volume group name included an embedded hyphen and following the "automatic" setup I wound up with a hyphenated volume group name. Then I kept running into weird errors esp in webmin when I was trying the set up the drives. I eventually removed all partitions and reloaded 14.04 server and then changed the volume group name.

So if I have a single hyphen in a volume group name does that make it not work in webmin? Do I need to work from bash and double the hyphen?

A new related wrinkle I think. I just tried to add one of the formerly used drives(no partitions) to the server and as soon as I created a partition it added the old volume group. how do I clear that dead data?
 
Old 03-14-2015, 11:29 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Code:
dd if=/dev/zero of=/dev/sdd1 count=50
That zeroes out the first 50 sectors in the first partition on /dev/sdd - make sure you specify the correct disk and partition. It will trash whatever you point it at.

Edit: after doing that, you'll need to run mkfs on that partition to create a filesystem.

Last edited by syg00; 03-14-2015 at 11:34 PM.
 
1 members found this post helpful.
Old 03-15-2015, 05:27 AM   #6
joe30030
LQ Newbie
 
Registered: Mar 2015
Location: Decatur, Georgia
Distribution: ubuntu server 14.04
Posts: 7

Original Poster
Rep: Reputation: Disabled
two new man pages perused

Awesome. that cleared up the ghost volume group info and I got to read about mkfs and dd. I still don't know what is happening with the hyphens, but since I don't have one anymore in my volume group I am calling it done.
 
Old 03-15-2015, 05:37 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Good for you. Finding out what you need to read about can be a real problem. Being prepared to get into manpages will help no end once you do find that out.
 
Old 03-15-2015, 11:01 AM   #8
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
How about using an underscore in place of a hyphen?
I can see that some non-LVM commands might have problems with multiple hyphens.
 
Old 03-15-2015, 11:55 AM   #9
joe30030
LQ Newbie
 
Registered: Mar 2015
Location: Decatur, Georgia
Distribution: ubuntu server 14.04
Posts: 7

Original Poster
Rep: Reputation: Disabled
I didn't want a hyphen specifically. It was a default in the automatic LVM setup and I couldn't figure out how to get around it or even if I needed to. I assume there is a convention that I am missing because if it really was a problem I cant imagine it being an automatic default.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How-to include a variable's name in a regex in awk to spot command names in absolute paths Didier Spaier Programming 3 09-14-2012 04:05 AM
[SOLVED] Changing File Names to Include Part of the Directory Name farmerdan Linux - General 10 03-18-2011 03:07 PM
[SOLVED] restore LVM VG after PV device names changed lurko Linux - Software 1 11-13-2009 08:11 AM
google hyphens gypsy_rabbi General 2 11-03-2005 04:47 PM
Variable names that include variables.... mychl Programming 7 09-24-2003 07:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration