Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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 have a hdd and 3 partitions (1 with data and 2 empty)due to increased size of my virtual machines one partition, i planned to create volume group with all 3 partitions, so i changed the partition with data to lvm using tool data is fine. After that i mistakenly created a volume group with the partition which has data and then added empty partions to the volume grop.Then i realised i did mistake so i removed the partion with data from the volume group using vgreduce command. after removing it when i try to mount it to get the data, it say's unknow filesystem which means i need to format. Please help me is there any way to get that data back from that lvm.i didn't do any foramt, what i did was created volume group with that partition and again removed it from volume group..
Please help me i have all my virtul machines on it.
In order to create a VG (Volume Group) you needed to have one or more PV (Physical Volume).
It's difficult to discern from your text, whether or not you initially had a VG with PVs, or just a plain MBR.
If it's the former, most of a VG can be restored using the files stored under /etc/lvm. /etc/lvm/backup keeps backups of the "current" state of a VG. /etc/lvm/archive keeps state prior to any VG,LV command, such as lvreduce.
One may carefully restore a VG to a prior state using the correct file, editing if needed.
However if it's the latter, you previously had an MBR, and you executed pvcreate on a device or partition, you likely overwrote the MBR.
The best course in either event is to resore from a backup.
If, as I'm guessing, you have no backup, please accurately (detailed), describe the status of your boot table type, partitions, existing PV,VG,LV prior to making your error.
hi bsd, i found your reply little late, so i had to format it and created new one. my main doubt now is, as you said i created a PV,VG and then i create LV, it's all fine, my point is if i have i increase a the VG size, either i need to add a partition to existing VG or a newly crated PV,using vgexted right? But here my requirement is i don't have free space to create new partition or new PV all i do is i have a partition with some data, so i change the filesystem id to lvm and is there any way to add it to a VG with out data loss.
ya, i realized that we can not add any pv with data to a existing vg, new pv or partion will be used as a raw space to a existing vg to increage the vg, from it we can create lv or incerease existing vg.
Quote:
eg: lvextend --extents '100%FREE' LVNAME
this is the new command, you given me to increase existing lv to 100% space available in the vg.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.