Hi,
At home I have a couple of CentOS 5.4 file servers each with system hard drives and separate data drives, all using LVM.
The system drive on server "A" has gone down and I would like to know if I take the data drive from that machine and put it into the other one, will it be picked up ok by the LVM search on boot up and be accessible.
I would then have to setup the user and group from the other server to match those on that drive, or use chown and chmod.
I have looked at the fora and LVM manuals but cant see what I'm looking for, could just be blind of course!
Thanks for your help,
Mike
Move LVM drive
-
- Posts: 7
- Joined: 2010/04/11 10:04:27
- Location: Bradwell, Norfolk, UK
Move LVM drive
There'll be no problem with transplanting the drive and having the LVM volumes seen. What there will be a problem with is if you originally let CentOS name the volume groups then the name will be the same - VolGroup00. If you boot from rescue media and rename the volume group on the to-be-transplanted drive first then there shouldn't be a problem. If the volume group names are currently the different then you can skip this bit.
-
- Posts: 7
- Joined: 2010/04/11 10:04:27
- Location: Bradwell, Norfolk, UK
Re: Move LVM drive
Thanks for that, Load off my mind there!
-
- Posts: 7
- Joined: 2010/04/11 10:04:27
- Location: Bradwell, Norfolk, UK
Re: Move LVM drive
Not been that easy,
now, all my drives have named volumes except the system drives which are the usual VolGroup00-LogVol00 etc.
The data volumes are named MusicDrive etc. so should be no problem. I placed the drive into the other machine and it didn't find it.
I checked and everything seemed ok, but there wasn't an entry in fstab for it, (because it hadn't been detected), so to help things along I added the entry manually in the hope that it would then find it. Oh moron me.
When I restarted the machine it the failed because it couldn't see the file system for DataDrive.
I have booted from a livecd to edit the entry out but can't.
If i leave it to login as Centos then the system drive appears as VolGroup00-LogVol00 and I can open it, (Gnome desktop) but can't edit it as the drive is read only.
I then logged into the live cd as root but then the drive doesn't appear at all.
Back in as Centos I opened a terminal and su'd. went to the drive through /mnt/lvm/VolGroup00-LogVol00 and when I try to edit the file the whole drive is still read only.
How can I possibly retrieve the machine if I can't edit the problem out?
Also I transferred the DataDrive to my third server and that hasn't detected it either, in LVM it can see the physical drive but has not detected the logical volume or group.
now, all my drives have named volumes except the system drives which are the usual VolGroup00-LogVol00 etc.
The data volumes are named MusicDrive etc. so should be no problem. I placed the drive into the other machine and it didn't find it.
I checked and everything seemed ok, but there wasn't an entry in fstab for it, (because it hadn't been detected), so to help things along I added the entry manually in the hope that it would then find it. Oh moron me.
When I restarted the machine it the failed because it couldn't see the file system for DataDrive.
I have booted from a livecd to edit the entry out but can't.
If i leave it to login as Centos then the system drive appears as VolGroup00-LogVol00 and I can open it, (Gnome desktop) but can't edit it as the drive is read only.
I then logged into the live cd as root but then the drive doesn't appear at all.
Back in as Centos I opened a terminal and su'd. went to the drive through /mnt/lvm/VolGroup00-LogVol00 and when I try to edit the file the whole drive is still read only.
How can I possibly retrieve the machine if I can't edit the problem out?
Also I transferred the DataDrive to my third server and that hasn't detected it either, in LVM it can see the physical drive but has not detected the logical volume or group.
Re: Move LVM drive
If you have an error in your /etc/fstab and you are being dropped to a root command prompt then you need to run
[code]
mount -o remount,rw /
[/code]
to be able to edit and save the file. And you live and learn... next time you'll use a mount command from a root command prompt to try it out :-)
[code]
mount -o remount,rw /
[/code]
to be able to edit and save the file. And you live and learn... next time you'll use a mount command from a root command prompt to try it out :-)