1836629 Members
2113 Online
110102 Solutions
New Discussion

Changing Volume Groups

 
SOLVED
Go to solution
Ted Mulder
Occasional Contributor

Changing Volume Groups

We've built a second workstation by cloning the disk with another system. We used the logical volume group commands (i.e. lvlnboot, lvrmboot, vgimport, vgchange, etc.). Upon completion we noticed that the / directory was under /dev/root and not /dev/vg00/lvol3. How do we change it so the / dir is under the volume group.

See attachment for our original procedures.
Multi-tasking == On-the-Job Training
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor
Solution

Re: Changing Volume Groups

Hi Ted:

This is easy to correct:

# mv /etc/mnttab /etc/mnttab.old
# mount -a

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: Changing Volume Groups

You would have been better served by using Ignite to make a 'Golden Image' with which to clone your 2nd box.

You should be able to mv /etc/lvmtab to /etc/lvmtab.old and then do a vgscan followed by a reboot.
If it ain't broke, I can fix that.
Martin Johnson
Honored Contributor

Re: Changing Volume Groups

I agree with Clay, use Ignitge to clone the system. It is also a good test of your backup/recovery procedures.

HTH
Marty
Sridhar Bhaskarla
Honored Contributor

Re: Changing Volume Groups

Your procedure is not looking bad. Did you get any error messages when you tried to import vg00?. You might be trying to boot a disk that was one of a mirror pair. If so, You will need to make sure the mirrors are reduced. Use lvdisplay with -k option, determine the PV id and use lvremove command with -k option to remove the lvs. It takes a long time.

Otherwise, follow Clay's process.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
James R. Ferguson
Acclaimed Contributor

Re: Changing Volume Groups

Hi (again) Ted:

The appearance of the mount point for the root directory (/) as '/dev/root' is known to be triggered by entering LVM maintenance mode.

Make sure that your '/etc/fstab' has the correct mountpoint; remove or rename '/etc/mnttab' as I suggested; and issue a mount all ('mount -a'). Your problem should disappear.

Regards!

...JRF...
Sajid_1
Honored Contributor

Re: Changing Volume Groups

hello,

# mv /etc/mnttab /etc/mnttab.old
# mount -a

this will be the best option. Regarding the procedure, it look good for me.
learn unix ..
Q4you
Regular Advisor

Re: Changing Volume Groups

Try this ->

cp /etc/fstab /etc/fstab.org

edit fstab file

check the entry for /dev/vg00/lvol3.

Change the mount entry to

/dev/vg00/lvol3 / .. ... ...

reboot.