"Christmas - the time to fix the computers of your loved ones" « Lord Wyrm

[solved]Lenny->Squeeze manuelles Upgrade von mdadm/lvm?

bsox 11.03.2011 - 00:18 3444 5
Posts

bsox

Schwarze Socke
Avatar
Registered: Jun 2009
Location: Dschibuti
Posts: 1040
Ich hab ein hausgemachtes Problem, vielleicht kann mir einer von euch Gurus weiterhelfen:

Zu dem Zeitpunkt als ich das dist-upgrade von Lenny auf Squeeze gemacht habe war mein raid down. (die Festplatten waren stromlos) Nun habe ich sie endlich wieder am Strom und sehe die einzelnen Platten, aber lvm und mdadm sehen genau nix.

/dev/sda1 ist die bootplatte und /dev/sdb1 - /dev/sde1 waren im raid.

Die mdadm.conf sieht merkwürdig aus. Warum ist da bei devices nur die Rede von sdb1 und sdc1? Da sollten doch noch sdd1 und sde1 drin stehen, oder?
---------------------------------------------------------------
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays

# This file was auto-generated on Mon, 02 Aug 2010 18:30:54 +0200
# by mkconf $Id$

ARRAY /dev/md0 level=raid1 num-devices=2 metadata=00.90 UUID=7da9b074:c08b470f:a49ccc59:9a6b2751
devices=/dev/sdb1,/dev/sdc1
---------------------------------------------------------------



---------------------------------------------------------------

fizz:/etc/lvm# fdisk -l

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006c017

Device Boot Start End Blocks Id System
/dev/sdb1 1 121601 976760001 83 Linux

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdc1 1 121601 976760001 83 Linux

Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003ec52

Device Boot Start End Blocks Id System
/dev/sde1 1 121601 976760001 83 Linux

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdd1 1 121601 976760001 83 Linux

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f4138

Device Boot Start End Blocks Id System
/dev/sda1 * 1 18662 149902483+ 83 Linux
/dev/sda2 18663 19457 6385837+ 5 Extended
/dev/sda5 18663 19457 6385806 82 Linux swap / Solaris

---------------------------------------------------------------

Und der fstab scheinen die UUID Einträge bei den vg's zu fehlen.

---------------------------------------------------------------
fizz:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1 / ext3 errors=remount-ro 0 1
UUID=2c32b5c0-7f65-47e4-913c-1361efdf4dc3 / ext3 errors=remount-ro 0 1
# /dev/sda5 none swap sw 0 0
UUID=935160dc-a218-4e00-a19b-41d7edd6e397 none swap sw 0 0
# /dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/cdrom /media/cdrom0 udf,iso9660 user,noauto 0 0
# /dev/md0 /mnt/raid5 ext3 defaults,usrquota 0 0
/dev/vg0/tm /mnt/timemachine ext3 defaults 0 0
/dev/vg0/smb /share/smb ext3 defaults 0 0
---------------------------------------------------------------

Gibt es eine Möglichkeit das raid upgrade "manuell" nach zu spielen, sodass ich wieder an die Daten komme?
Bearbeitet von bsox am 11.03.2011, 09:37

bsox

Schwarze Socke
Avatar
Registered: Jun 2009
Location: Dschibuti
Posts: 1040
Ein "Detail" sollte ich nicht verschweigen: Während das raid down war musste ich das Mainboard tauschen (von Asus auf Sapphire) und dabei könnten natürlich die Platten eine andere Reihenfolge bekommen haben. (Wenn das relevant ist?)

Ich habe zwar die Reihenfolge an den SATA Anschlüssen gleich behalten, Bootplatte auf sata1, in aufsteigender Reihenfolge dann die Raidplatten, kann aber nicht 100% sagen ob z.b sdb vorher auch wieder sdb jetzt ist, oder nicht doch zu sdc wurde.

COLOSSUS

Administrator
Frickler
Avatar
Registered: Dec 2000
Location: ~
Posts: 11901
Hm, komisch - du hast 0.90er Metadaten (damit also theoretisch Kernel-Auto-Assembly deines Arrays), allerdings haben deine Array-Member-Partitionen eine FS-ID von 83 ("Linux"). Richtig waere "Linux RAID Autodetect", numerisch "fd".

Ich wuerde an deiner Stelle mal die /etc/mdadm.conf an einen sicheren Ort verschieben, und dann ein neues File an dieser Stelle erstellen, mit dem Inhalt:

Code:
DEVICE partitions

Dann fuehr' mal
Code:
mdadm --assemble --scan
aus, und melde dich bitte mit den Resultaten wieder.

Die Namen der Blockgeraete sind uebrigens egal, auch die Reihenfolge, in welcher sie initialisiert werden - die relevante Information steckt im Superblock der RAID-Member, und mit "DEVICE partitions" sagst du mdadm, dass es alle Blockgeraete, die in /proc/partitions gelistet werden, auf einen solchen untersuchen soll.

bsox

Schwarze Socke
Avatar
Registered: Jun 2009
Location: Dschibuti
Posts: 1040
Hab's gelöst. (War ja einfacher als ich gestern abend dachte.)

mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

fizz:/dev# mdadm --detail /dev/md0
/dev/md0:
Version : 0.90
Creation Time : Fri Aug 6 09:28:28 2010
Raid Level : raid5
Array Size : 2930279808 (2794.53 GiB 3000.61 GB)
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Wed Dec 29 06:25:48 2010
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

UUID : f68883a0:c08c26f2:ea7e860f:e8472d31
Events : 0.22

Number Major Minor RaidDevice State
0 8 49 0 active sync /dev/sdd1
1 8 65 1 active sync /dev/sde1
2 8 33 2 active sync /dev/sdc1
3 8 17 3 active sync /dev/sdb1

====> Yay, raid is up & running!

fizz:/dev# lvm vgdisplay
--- Volume group ---
VG Name vg0
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 8
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 2.73 TiB
PE Size 4.00 MiB
Total PE 715400
Alloc PE / Size 204800 / 800.00 GiB
Free PE / Size 510600 / 1.95 TiB
VG UUID 4Ta88j-2K6m-GUEU-UCtO-lHOD-gHb6-lJQ139

====> Schaut auch nicht so schlecht aus.

fizz:/dev# lvm lvdisplay
--- Logical volume ---
LV Name /dev/vg0/tm
VG Name vg0
LV UUID kZHqZz-UNZX-CYB1-hbld-r7JR-fd0d-TOAd1E
LV Write Access read/write
LV Status NOT available
LV Size 300.00 GiB
Current LE 76800
Segments 1
Allocation inherit
Read ahead sectors auto

--- Logical volume ---
LV Name /dev/vg0/smb
VG Name vg0
LV UUID AXXNu9-YGcx-EVll-X0nl-dYgG-bXou-CJiB0z
LV Write Access read/write
LV Status NOT available
LV Size 500.00 GiB
Current LE 128000
Segments 1
Allocation inherit
Read ahead sectors auto

====> Hm, "NOT available"...?

lvm vgchange -a y vg0

fizz:/# lvm lvdisplay
--- Logical volume ---
LV Name /dev/vg0/tm
VG Name vg0
LV UUID kZHqZz-UNZX-CYB1-hbld-r7JR-fd0d-TOAd1E
LV Write Access read/write
LV Status available
# open 0
LV Size 300.00 GiB
Current LE 76800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 768
Block device 253:0

--- Logical volume ---
LV Name /dev/vg0/smb
VG Name vg0
LV UUID AXXNu9-YGcx-EVll-X0nl-dYgG-bXou-CJiB0z
LV Write Access read/write
LV Status available
# open 1
LV Size 500.00 GiB
Current LE 128000
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 768
Block device 253:1

====> Yay! Alles da und lesbar!

Herrschaften, herzlichen Dank für die Aufmerksamkeit. Es hilft sich über seine Problemchen mitzuteilen. ;)

COLOSSUS

Administrator
Frickler
Avatar
Registered: Dec 2000
Location: ~
Posts: 11901
Gratuliere :)

bsox

Schwarze Socke
Avatar
Registered: Jun 2009
Location: Dschibuti
Posts: 1040
Dank' Dir für Deinen Reply Colossus :)

Jetzt muss ich nur mehr schaun, dass ich raid und die volume groups beim booten automatisch hoch krieg, aber das wird auch keine Hexerei werden. Ich vermute mal die mdadm.conf braucht etwas Zuwendung und dann vielleicht noch die lvm.conf.

Gar nicht so einfach sich da wieder reinzudenken wenn man das einmal eingerichtet und dann nie wieder angegriffen hat. Macht aber Spass :)
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz