[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Probleme mit LVM



Andreas Pakulat schrieb:
On 05.07.06 10:36:54, Thomas Günther wrote:
Andreas Pakulat schrieb:
On 05.07.06 09:45:32, Thomas Günther wrote:
[...]

Das sind normalerweise Textdateien und man kann schauen welche die
"richtige" ist. Also insbesondere drauf achten ob das PV die richtige
Groesse hat, ob alle lv's enthalten sind (mit der richtigen Groesse).
Und ob es das "neueste" Backup ist.

Es gibt genau ein Backup. Die Auswahl hält sich da ziemlich in Grenzen.
;-)


Im Normalfall wird in archive immer eine neue Datei angelegt wenn du
sowas wie lvextend, lvcreate usw. machst. Also jedesmal wenn du das LVM
veraenderst. Deswegen muesste die Datei mit der hoechsten Nummer dort
vor der letzten Aenderung erzeugt worden sein. In backup liegen Backups
die durch vgcfgbackup erzeugt wurden. Wobei ich aber grad nicht weiss ob
die "automagisch" erzeugt werden oder nur manuell..

Vermutlich beides, quasi automanuell. Ich kann mich nämlich nicht
erinnern, ein Backup angelegt zu haben. Auf der anderen Seite hatte
ich ja vor einigen Monaten schoneinmal ein Problem mit dem LVM und da
ist kein Backup anglegt worden.


Andreas


So, ich habe jetzt nochmal folgendes gemacht (vorher übrigens mit
/dev/hdd1 probiert, hatte ungefähr den gleichen Effekt):

rechner1:/etc/lvm# pvcreate -t --restorefile /etc/lvm/backup/VG00 -ff -u zBy7Y3-qcrp-eYhi-4FJ4-tMqE-pt9Q-saKAH8 /dev/hdd
  Test mode: Metadata will NOT be updated.
Really INITIALIZE physical volume "/dev/hdd" of volume group "VG00" [y/n]? y
WARNING: Forcing physical volume creation on /dev/hdd of volume group "VG00"
  Physical extents end beyond end of device /dev/hdd!
  /dev/hdd: Format-specific setup of physical volume failed.
  Failed to setup physical volume "/dev/hdd"

Bedeutet wohl, dass das anzulegende PV grösser ist als die Platte, oder?
Das ist mir auf jedenfall schleierhaft, da das VG-PV-LV-Konstrukt auf
genau dieser Platte lag. Ich hab mal am Ende das /etc/lvm/backup/VG00
reinkopiert, für den Fall, es interessiert irgendwie.



rechner1:/etc/lvm# pvcreate --restorefile /etc/lvm/backup/VG00 -ff -u zBy7Y3-qcrp-eYhi-4FJ4-tMqE-pt9Q-saKAH8 /dev/hdd1
  uuid zBy7Y3-qcrp-eYhi-4FJ4-tMqE-pt9Q-saKAH8 already in use on "/dev/hdd"

Man beachte, dass ich vorher das ganze mit der -t (test) Option
durchgeführt habe, trotzdem sagt er bei der realen Durchführung, also
ohne -t, dass die uuid schon verwendet wird. Wie kann das denn?



rechner1:/etc/lvm# vgcfgrestore VG00
  Restored volume group VG00

rechner1:/etc/lvm# vgdisplay
  --- Volume group ---
  VG Name               VG00
  System ID
  Format                lvm2
  Metadata Areas        1

is021sv:/etc/lvm# pvdisplay
  --- Physical volume ---
  PV Name               /dev/hdd
  VG Name               VG00
  PV Size               111.78 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              28615
  Free PE               1
  Allocated PE          28614
  PV UUID               zBy7Y3-qcrp-eYhi-4FJ4-tMqE-pt9Q-saKAH8

is021sv:/etc/lvm# lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG00/LV00
  VG Name                VG00
  LV UUID                VAxHcz-xvK1-7wvQ-15uB-SONo-dUvP-M613R9
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                111.77 GB
  Current LE             28614
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           254:0

Sieht soweit ja alles ganz gut aus. Dann lvm-Init-Script gestartet.
Und dann:

is021sv:/etc/lvm# mount -t ext3 /dev/VG00/LV00 /home_lvm/
mount: wrong fs type, bad option, bad superblock on /dev/VG00/LV00,
       missing codepage or other error
       (could this be the IDE device where you in fact use
       ide-scsi so that sr0 or sda or so is needed?)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Das Problem ist das gleiche, so wie am Anfang. - Schade eigentlich.
Ich denke, ich werde die Versuchsreihe einstellen.



#########################/etc/lvm/backup/VG00############################
#########################################################################
# Generated by LVM2: Thu Sep 22 09:13:00 2005

contents = "Text Format Volume Group"
version = 1

description = "Created *after* executing 'lvcreate -L111.77G -nLV00 VG00'"

creation_host = "is021sv" # Linux is021sv 2.6.13.2 #3 Tue Sep 20 14:39:23 CEST 2005 i686
creation_time = 1127373180      # Thu Sep 22 09:13:00 2005

VG00 {
        id = "i4KSJJ-J40G-rUPw-RRYX-q9E0-VUez-3YLgux"
        seqno = 6
        status = ["RESIZEABLE", "READ", "WRITE"]
        extent_size = 8192              # 4 Megabytes
        max_lv = 0
        max_pv = 0

        physical_volumes {

                pv0 {
                        id = "zBy7Y3-qcrp-eYhi-4FJ4-tMqE-pt9Q-saKAH8"
                        device = "/dev/hdd"     # Hint only

                        status = ["ALLOCATABLE"]
                        pe_start = 384
                        pe_count = 28615        # 111.777 Gigabytes
                }
        }

        logical_volumes {

                LV00 {
                        id = "VAxHcz-xvK1-7wvQ-15uB-SONo-dUvP-M613R9"
                        status = ["READ", "WRITE", "VISIBLE"]
                        segment_count = 1

                        segment1 {
                                start_extent = 0
                                extent_count = 28614    # 111.773 Gigabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv0", 0
                                ]
                        }
                }
        }
}



Gruss
Thomas



Reply to: