Chapter 9. Configuring RHEL 5.2 for cloning 135
Done
Setting device 0.0.2101 online
Done
Now run vgscan and vgchange to activate the newly cloned LVM:
# vgscan
Reading all physical volumes. This may take a while...
Found volume group "system_vg" using metadata type lvm2
Found volume group "install_vg" using metadata type lvm2
# vgchange -a y system_vg
5 logical volume(s) in volume group "system_vg" now active
Mount the newly copied root file system
Run lvdisplay to show the new root logical volume:
# lvdisplay
--- Logical volume ---
LV Name /dev/system_vg/root_lv
VG Name system_vg
...
In this case, the root file system is located at /dev/system_vg/root_lv. Because you only
need to modify files in /etc, there is no need to mount the /opt, /var, or /usr logical volumes
in system_vg. Mount root_lv over a newly created mount point /mnt/linux01:
# mkdir /mnt/linux01
# mount /dev/system_vg/root_lv /mnt/linux01
Observe that this appears to be a root file system:
# ls /mnt/linux01/
bin dev home lib64 media opt root selinux sys usr
boot etc lib lost+found mnt proc sbin srv tmp var
Modify networking information about the target system
In this example, the only two pieces of networking information that are modified are the IP
address (from 9.12.5.29 to 9.12.5.31) and the host name (from virtc529 to virtc531).
The host name and IP address are changed in the file /etc/hosts:
# cd /mnt/linux01/etc
# vi hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
9.12.5.31 virtc531.itso.ibm.com virtc531
The host name is changed in the file /etc/sysconfig/network:
# cd sysconfig
# vi network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=virtc531.itso.ibm.com
GATEWAY=9.12.4.1
The IP address is changed in the file /etc/sysconfig/network-scripts/ifcfg-eth0:
# cd network-scripts
# vi ifcfg-eth0
Komentarze do niniejszej Instrukcji