CentOS 5.7 partition problem -- VolGroup00 removed, 2nd HDD ...
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
CentOS 5.7 partition problem -- VolGroup00 removed, 2nd HDD ...
Dear All:
Unfortunately I had to re-install CentOS 5.7 because the server was hacked. The CentOS installer demanded during the reinstall to "remove volume group VolGroup00" in order to be able to re-format and re-partition the FIRST (main) hard drive. I did that. The SECOND HDD which had been "VolGroup01" was not re-formatted during the OS reinstall (it holds the backup data)--and it was mounted as /backup before and had only one partition. However, after CentOS was installed on the primary drive, now "fdisk -l" does NOT show me "/dev/sdb1" but a 2nd drive without partition table:
------
Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
------
Anyone know if I really messed it up, or if not, how to mount that 2nd HDD again to recover my backups? (Because that's were the backups are.)
Also, here is how /etc/fstab looked BEFORE the reinstall of the OS on the primary drive.
I suppose that is a command for a script that CentOS 5.x does not install by default?
---------- EDIT ------
I like to add that the OS was originally installed using 'Cobbler' (remote installer), and in the install script we have:
#set $vgname = "VolGroup00"
#set $vgbackupname = "VolGroup01"
So yes, must have been on both HDDs, and on the whole HDDs rather than the partition (as HDD1 had several partitions).
.... But *I* did not write that, and unfortunately I do know nothing about volume groups and how to deal with the current problem (and how I could have avoided it).
Just saw that edit.
pvs is a LVM subcommand (try "man lvm"). Rather than lead you astray, let me go set up a LVM system and try some things. Will take some time (as Christmas eve is coming to a close here) - hopefully someone who actually likes LVM and has more experience will step in first.
In another forum I found the following suggestion for a simlar problem:
-------------
From the description sounds like there was only 1 partition, and if LVM
is it use, it would have been type 8e; so, just recreating the partition
with fdisk, using the entire disk, and setting the type to 8e seems like
a good bet.
-------------
I did exactly this.
But after doing this my main problem is now to mount this LVM volume. It is unbelievable complicated. I see several websites explaining it, but nothing seems to work because other than that 2nd HDD there is no LVM system.
In any case ... it seems it did not work ... output for "pvs" command is:
PSize: 298 GB, PFree 298 GB
That means the disk is empty.
Any data recovery software you can suggest --that can be installed remotely on the 1st main disk?
Again thank you for the reply and suggestion.
Finally I was able to get a solution: I used the recovery script "TestDisk" (http://www.cgsecurity.org/wiki/TestDisk) and that worked for me -- I could recover the backup folder.
The main lesson learned though, for me at least, is to never again use "LVM" (Logical Volume Manager) as a partition system ... that just creates too many problems once a disk has to be replaced or reformatted.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.