Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
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.
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.
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?
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.