monter un disque raid et lvm

トップ ページ

このメッセージに返信
著者: anne.guilde@free.fr
日付:  
To: ML Guilde
題目: monter un disque raid et lvm
bonjour

J'ai mis un disque dur dans un boîtier externe en usb.
Le disque est en raid + lvm

# sfdisk -l
...
Disk /dev/sdc: 30401 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+     12      13-    104391   fd  Linux raid autodetect
/dev/sdc2         13   30400   30388  244091610   fd  Linux raid autodetect
/dev/sdc3          0       -       0          0    0  Empty
/dev/sdc4          0       -       0          0    0  Empty


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

# mdadm --assemble --scan
mdadm: /dev/md1 has been started with 1 drive (out of 2).
mdadm: /dev/md2 has been started with 1 drive (out of 2).

# pvscan
   PV /dev/md2   VG main   lvm2 [232,78 GiB / 0    free]
   Total: 1 [232,78 GiB] / in use: 1 [232,78 GiB] / in no VG: 0 [0   ]


# vgscan
Reading all physical volumes. This may take a while...
Found volume group "main" using metadata type lvm2

# vgs
   VG   #PV #LV #SN Attr   VSize   VFree
   main   1   2   0 wz--n- 232,78g    0


# vgchange -ay /dev/main
2 logical volume(s) in volume group "main" now active

# lvs
   LV   VG   Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
   root main -wi-a--- 228,84g
   swap main -wi-a---   3,94g


# mount /dev/mi /media/dd-sylvain1
mount: special device /dev/mi does not exist
root@anne:/home/anne# mount /dev/main/root /media/dd-sylvain1
mount: wrong fs type, bad option, bad superblock on /dev/mapper/main-root,
        missing codepage or helper program, or other error
        In some cases useful info is found in syslog - try
        dmesg | tail  or so


# dmesg | tail
[377668.074598] sd 13:0:0:0: [sdc] Sense Key : Medium Error [current]
[377668.074606] sd 13:0:0:0: [sdc] Add. Sense: Unrecovered read error
[377668.074615] sd 13:0:0:0: [sdc] CDB: Read(10): 28 00 00 06 37 f5 00
00 f0 00
[377668.074629] end_request: critical target error, dev sdc, sector 407541
[377668.074764] JBD: Failed to read block at offset 22720
[377668.082268] JBD: recovery failed
[377668.082281] EXT3-fs (dm-0): error loading journal
[377671.070081] sd 4:0:0:0: [sdb] Test WP failed, assume Write Enabled
[377671.073428] sd 4:0:0:0: [sdb] Asking for cache data failed
[377671.073441] sd 4:0:0:0: [sdb] Assuming drive cache: write through

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

Quelle commande faire?

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

pour démonter
# vgchange -an /dev/main
0 logical volume(s) in volume group "main" now active

# mdadm --stop --scan
mdadm: stopped /dev/md2

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

comment savoir si j'ai bien tout démonter et donc si je peux éteindre le
boîtier usb et enlever le câble usb