lvm problem
hi boys... i read you from long time but this is my first post.
i expose my problem i'have added two physical volume /dev/c0d1p1 and /dev/c0d1p2 into a volume group VolGroup01, the second with vgextend the problem is that my c0d1p2 partition contains a lot of data and i don't want to loose them, now i don't know if vgreduce can help me or i have to take a different way to solve please help me.... |
Did your /dev/c0d1p2 contain the data before you added it to LVM?
|
Hi, from the top of my head, did the disk contain any lvm partitioning prior to adding it to the new volume group. If so I would suggest you to take it out of the current volume group and do a "vgimport <volgrpname> <physicalvolname> and then do a "vgchange -ay <volgrpname>", that should be able to bring back the data you wanted safely. If you do a vgreduce you would lose that existing data.
|
no, my /dev/c0d1p2 does not contains any data... it's only a partition
and thank you for help all... |
Quote:
Quote:
|
So was I, but I thought I'd let someone else show that ;)
|
sorry, i was wrong... i'm a little bit confised
ok, from head... /dev/cciss/c0d1p1 was full of data /dev/cciss/c0d1p2 was empty i would like to create a logical volume with lvm containing these two partitions, i created first a volgroup and added c0d1p2 (the empty one) than i added c0d1p1 to the volgroup with vgextend i want a logical volume containing the two partitions without loosing data on c0d1p1 this is what i would like to do... i'm now stopped because i'm afraid to make something wrong and i'm waiting for you... please, help me |
i want to make clear that neither /dev/cciss/c0d1p1 or /dev/cciss/c0d1p2 were part of lvm...
i'm creating a new volume group and i'm adding them to it |
I don't think you can do this.
The normal sequence is partitions /dev/cciss/c0d1p1 & /dev/cciss/c0d1p2 both set as pv (fdisk id code 8e), vgcreate + vgextend, putting both pv's into the vg, create lv from the vg and then mkfs over the lv. http://tldp.org/HOWTO/LVM-HOWTO/ http://sunoano.name/ws/public_xhtml/lvm.html |
ok, i launched vgreduce to extract c0d1p1 and now partition is not readable...
i'have launched fsck to restore the partition super block and it seems to work... mounted with /etc/fstab line at reboot it recognize the partition and is making a a forced check without obliging me to enter maintenance mode... supposing it restore.... what about if a create a volgroup ----> add only /dev/cciss/c0d1p1 -----> launch parted on volgroup -----> rescue command to restore partition without data loss what do you think about? is it possible? i know that all data are still there because in maintenance mode, if i do ls /dev/cciss/c0d1p1 it gives me the list of contents but doesn't give me access |
All times are GMT -5. The time now is 07:13 AM. |