Sp es ist jetzt gleich 1 Uhr, bin denn ganzen Tag schon dran und schaffe es einfach nicht, könnt Ihr mal drauf gucken woran das jetzt noch liegen kann? Ich habe bis jetzt alles so gemacht wie ich es machen sollte:
Ich fang mal an:
Die alte große Festplatte die ersetzt werden soll ist:
"/dev/sda" 279.2
Die neue "etwas" kleinere Festplatte die ich der vm hinzugefügt habe ist:
"/dev/sdb" 214.7 GB
Ich möchte gerne das Betriebsystem CentOS 5.5 was auf der /dev/sda drauf ist auf die etwas kleinere Festplatte kopieren (sdb) und dann soll die vm von der sdb Festplatte booten.
Hier ein Uaszug aus der fdisk -l
Code: Alles auswählen
root@Microknoppix:/# fdisk -l
Disk /dev/sda: 279.2 GB, 279172874240 bytes
255 heads, 63 sectors/track, 33940 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0006e2dd
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 33940 272518627+ 8e Linux LVM
Disk /dev/sdb: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 26108 209608087+ 8e Linux LVM
Soweit Identisch. Habe die beiden Platten gemountet und alle Datein samt Ordner mittels cp -R /mountpoint rüber Kopiert. Soweit gut.
Die alte Festplatte wurde bei der Installation von CentOS als lvm angegeben!
Habe die neue Festplatte genauso Partitioniert:
Alte Festplatte:
VolGroup00
Neue Festplatte:
VolGroup01
Code: Alles auswählen
root@Microknoppix:/# lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup01/LogVol00
VG Name VolGroup01
LV UUID bj2W6X-T1S4-8PHF-ptCH-NLwZ-fi0t-ykZZVY
LV Write Access read/write
LV Status available
# open 0
LV Size 191,08 GiB
Current LE 48917
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Name /dev/VolGroup01/LogVol02
VG Name VolGroup01
LV UUID d3HxS9-TOKd-fftA-oXWf-ShWa-WNke-nvRuAR
LV Write Access read/write
LV Status available
# open 0
LV Size 1,00 GiB
Current LE 256
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
--- Logical volume ---
LV Name /dev/VolGroup01/LogVol01
VG Name VolGroup01
LV UUID ZaHCEH-gUb2-xkmK-r15a-N2F5-ZIvn-ecOtac
LV Write Access read/write
LV Status available
# open 0
LV Size 7,81 GiB
Current LE 2000
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID jF4eNH-szA0-Z0S6-dBdA-e1pu-PVIy-WeNuyX
LV Write Access read/write
LV Status available
# open 0
LV Size 250,09 GiB
Current LE 8003
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol02
VG Name VolGroup00
LV UUID 4DI65Z-hH2C-j3Eu-J2Jt-iuPY-l6RM-NyZHGW
LV Write Access read/write
LV Status available
# open 0
LV Size 1,97 GiB
Current LE 63
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:4
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID NtjYkb-bvQH-luJI-z1AL-33Hr-bx0R-usiHka
LV Write Access read/write
LV Status available
# open 0
LV Size 7,81 GiB
Current LE 250
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:5
root@Microknoppix:/#
Das sieht genauso aus. Muss also passen.
Nun habe ich die grub.conf der neuen Platte angepasst:
Code: Alles auswählen
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup01/LogVol00
# initrd /initrd-version.img
#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-194.26.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.26.1.el5 ro root=/dev/VolGroup01/LogVol00
initrd /initrd-2.6.18-194.26.1.el5.img
title CentOS (2.6.18-194.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup01/LogVol00
initrd /initrd-2.6.18-194.el5.img
Das sieht soweit doch auch gut aus.
VolGroup01 ist die neue kleinere Platte:
Dann noch die fdisk:
Code: Alles auswählen
/dev/VolGroup01/LogVol00 / ext3 defaults,usrquota 1 1
/dev/VolGroup01/LogVol02 /tmp ext3 defaults 1 2
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup01/LogVol01 swap swap defaults 0 0
/tmp /var/tmp ext3 defaults,usrquota,bind,noauto 0 0
Und das wars. Habe die neue kleinere Festplatte unter Vsphere auf erste stelle gesetzt 0:0 und die alte die ja auf 0:0 war auf 0:2 gesetzt.
Aber immer noch kein Betriebsystem vorhanden, wenn er Booten will.
Setzte ich die alte Festplatte wieder auf 0:0 in vSphere, dann bootet er ganz einfach wieder.. Was mache ich bitte faltsch??
Hier ein Auszug aus der cfdisk:
Code: Alles auswählen
cfdisk (util-linux-ng 2.16.2)
Disk Drive: /dev/sdb
Size: 214748364800 bytes, 214.7 GB
Heads: 255 Sectors per Track: 63 Cylinders: 26108
Name Flags Part Type FS Type [Label] Size (MB)
------------------------------------------------------------------------------
sdb1 Boot Primary Linux ext3 [/boot] 106,93
sdb2 Primary Linux LVM 214638,69
Bitte um Hilfe ich kann nicht mehr

(