Bonsoir. J'avance dans ma recherche.
J'utilise Debian Live. J'ai pu assembler le RAID sans problème, mais je n'arrive pas à utiliser le LVM. ------------------------------------ # aptitude install mdadm # mdadm --assemble --scan ------------------------------------ dmesg: [ 617.036709] md: md0 stopped. [ 617.038099] md: bind<sdc1> [ 617.038302] md: bind<sda1> [ 617.214903] md: raid1 personality registered for level 1 [ 617.215534] md/raid1:md0: active with 2 out of 2 mirrors [ 617.215694] created bitmap (8 pages) for device md0 [ 617.215956] md0: bitmap initialized from disk: read 1 pages, set 0 of 14903 bits [ 617.682354] md0: detected capacity change from 0 to 1000068874240 [ 617.693821] md0: ------------------------------------ /etc/mdadm/mdadm.conf: [...] # definitions of existing MD arrays ARRAY /dev/md/0 metadata=1.2 UUID=102b07b8:703e4597:574b2ecf:880a1aee name=bouzin:0 [...] ------------------------------------ # ls -l /dev/md/0 lrwxrwxrwx 1 root root 6 Jan 21 19:34 /dev/md/0 -> ../md0 # ls -l /dev/md0 brw-rw---- 1 root disk 9, 0 Jan 21 19:34 /dev/md0 # mkdir /media/raid # mount -o ro /dev/md0 /media/raid/ mount: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. # mount -t ext4 -o ro /dev/md0 /media/raid/ mount: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. ------------------------------------ dmesg: [ 2052.416040] EXT4-fs (md0): VFS: Can't find ext4 filesystem ------------------------------------ Jusque là, c'est logique. J'ai tenté mount mais aucune chance puisque la partition est un LVM, elle ne se monte pas comme ça. Ci-dessous, infos en vrac puis tentative LVM. ------------------------------------ # mdadm --examine /dev/md0 /dev/md0: MBR Magic : aa55 # file -s /dev/{md0,sda,sdc} /dev/md0: DOS/MBR boot sector /dev/sda: DOS/MBR boot sector /dev/sdc: DOS/MBR boot sector ------------------------------------ Ces "DOS/MBR boot sector", ça m'embête. J'y reviens plus tard. Le reste, j'en tire rien, je le laisse au cas où. ------------------------------------ # mdadm --detail /dev/md0 /dev/md0: Version : 1.2 Creation Time : Sun Jun 21 18:04:33 2015 Raid Level : raid1 Array Size : 976629760 (931.39 GiB 1000.07 GB) Used Dev Size : 976629760 (931.39 GiB 1000.07 GB) Raid Devices : 2 Total Devices : 2 Persistence : Superblock is persistent Intent Bitmap : Internal Update Time : Wed Jan 20 22:28:23 2016 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Name : bouzin:0 UUID : 102b07b8:703e4597:574b2ecf:880a1aee Events : 4349 Number Major Minor RaidDevice State 0 8 1 0 active sync /dev/sda1 1 8 33 1 active sync /dev/sdc1 # fdisk -l /dev/md0 Disk /dev/md0: 931.4 GiB, 1000068874240 bytes, 1953259520 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0x9c0ff432 # sfdisk -l /dev/md0 Disk /dev/md0: 244157440 cylinders, 2 heads, 4 sectors/track Units: cylinders of 4096 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/md0p1 0 - 0 0 0 Empty /dev/md0p2 0 - 0 0 0 Empty /dev/md0p3 0 - 0 0 0 Empty /dev/md0p4 0 - 0 0 0 Empty # sfdisk -l /dev/sda Disk /dev/sda: 121601 cylinders, 255 heads, 63 sectors/track Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sda1 0+ 121601- 121602- 976760832 fd Linux raid autodetect /dev/sda2 0 - 0 0 0 Empty /dev/sda3 0 - 0 0 0 Empty /dev/sda4 0 - 0 0 0 Empty # sfdisk -l /dev/sdc Disk /dev/sdc: 121601 cylinders, 255 heads, 63 sectors/track Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sdc1 0+ 121601- 121602- 976760832 fd Linux raid autodetect /dev/sdc2 0 - 0 0 0 Empty /dev/sdc3 0 - 0 0 0 Empty /dev/sdc4 0 - 0 0 0 Empty # cat /proc/mdstat Personalities : [raid1] md0 : active (auto-read-only) raid1 sda1[0] sdc1[1] 976629760 blocks super 1.2 [2/2] [UU] bitmap: 0/8 pages [0KB], 65536KB chunk ------------------------------------ Et maintenant, le LVM... # aptitude install lvm2 # pvscan No matching physical volumes found # lvscan No volume groups found Je suis ce qui est écrit sur ce tuto et ailleurs : https://www.howtoforge.com/recover_data_from_raid_lvm_partitions L'idée est de lire le début de la partition pour y trouver le fichier de config (que je n'avais pa sauvegardé mais que je crois parvenir à récupérer). # aptitude install vim # dd if=/dev/md0 bs=512 count=4096 skip=1 of=/tmp/md0-raw-start # vi /tmp/md0-raw-start Conserver la config la plus complète (chez moi, la troisième car chaque ajout de lv a créé une version de config et c'est la troisième qui est donc complète). ------------------------------------ /tmp/md0-raw-start : vg { id = "Yxknle-OEes-hihh-tWCt-QBxC-JtP9-bl360E" seqno = 8 format = "lvm2" status = ["RESIZEABLE", "READ", "WRITE"] flags = [] extent_size = 8192 max_lv = 0 max_pv = 0 metadata_copies = 0 physical_volumes { pv0 { id = "gUyTdb-rc7j-rJh0-B2EZ-ebb7-mf77-KBgNWm" device = "/dev/md0" status = ["ALLOCATABLE"] flags = [] dev_size = 1953259520 pe_start = 2048 pe_count = 238434 } } logical_volumes { lv0 { id = "AwliYc-HczW-LZ1x-czpO-YZOJ-sr7k-T13HUf" status = ["READ", "WRITE", "VISIBLE"] flags = [] creation_host = "bouzin" creation_time = 1434910352 segment_count = 1 segment1 { start_extent = 0 extent_count = 953 type = "striped" stripe_count = 1 stripes = [ "pv0", 0 ] } } lv1 { id = "Ec1tN2-WKaf-v2if-lAu2-MfiI-1hkE-XyKFGI" status = ["READ", "WRITE", "VISIBLE"] flags = [] creation_host = "bouzin" creation_time = 1434910359 segment_count = 1 segment1 { start_extent = 0 extent_count = 7152 type = "striped" stripe_count = 1 stripes = [ "pv0", 953 ] } } lv2 { id = "gFWdEh-7HUJ-zwX1-nqEU-DomC-tdfW-ZGChNw" status = ["READ", "WRITE", "VISIBLE"] flags = [] creation_host = "bouzin" creation_time = 1434910366 segment_count = 1 segment1 { start_extent = 0 extent_count = 230329 type = "striped" stripe_count = 1 stripes = [ "pv0", 8105 ] } } } } ------------------------------------ Visiblement, j'ai mis dans l'ordre swap / /home ------------------------------------ Installer ce fichier de config dans le répertoire de config de lvm puis lancer lvm. # mkdir /etc/lvm/backup # cp /tmp/md0-raw-start /etc/lvm/backup/vg # systemctl start lvm2 # systemctl status lvm2 ● lvm2-activation.service - Activation of LVM2 logical volumes Loaded: loaded (/lib/systemd/system/lvm2-activation.service; enabled) Active: inactive (dead) since Thu 2016-01-21 20:37:42 UTC; 4s ago Docs: man:lvm(8) man:vgchange(8) Process: 22212 ExecStart=/sbin/lvm vgchange -aay --sysinit (code=exited, status=0/SUCCESS) Main PID: 22212 (code=exited, status=0/SUCCESS) Jan 21 20:37:42 debian lvm[22212]: No volume groups found # vgscan Reading all physical volumes. This may take a while... No volume groups found Et là, il ne trouve rien... ------------------------------------ Ceci est peut-être la cause du problème : # file -s /dev/{md0,sda,sdc} /dev/md0: DOS/MBR boot sector /dev/sda: DOS/MBR boot sector /dev/sdc: DOS/MBR boot sector D'après ce que je lis (http://unix.stackexchange.com/questions/92711/), j'aimerais plutôt voir quelque chose comme ça : $ file -s /dev/{sde1,md2} /dev/sde1: LVM2 (Linux Logical Volume Manager) , UUID: ZK8IfBzUHPH5befvm5CZ81oIXHm11TG /dev/md2: LVM2 (Linux Logical Volume Manager) , UUID: ZK8IfBzUHPH5befvm5CZ81oIXHm11TG Je me demande si je n'ai pas accidentellement écrasé le "début" de mon LVM en voulant formater une clé USB en FAT32 hier soir. Ça m'étonne, mais bon... (Sachant que le LVM contient le système que j'utilisais.) Ceci expliquerait-il celà ? C'est normal, ce DOS/MBR boot sector, ou inquiétant ? Ça voudrait dire que j'ai jardiné dans le swap, c'est peut-être pas si dramatique (?). Une idée pour réparer ça ? Merci. -- Jérôme _______________________________________________ Toulouse-ll mailing list Toulouse-ll@toulibre.org http://toulibre.org/cgi-bin/mailman/listinfo/toulouse-ll