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

Problema LVM



(Ho fatto il crossposting anche su it.comp.os.linux.debian per dare
maggiore visibilità alla cosa, so che non è netiquette, ma qual'è il NG
di riferimento per le problematiche debian in lingua italiana?)

Salve a tutti.

Scusate in anticipo per la lungaggine ma ne ho bisogno per far capire la
situazione da cui parto. La debian box in questione è una Lenny aggiornata.

Per il travaso del pool di BackupPC "offsite" ho allestito una cassetta
Dell RD1000 (è una sorta di HD USB esterno) la quale, all'inserimento,
richiama uno script appositamente realizzato che fa il gioco. Nell'unica
partizione c'è un volume cifrato (LUKS) nel quale c'è un PV che contiene
un VG (vgdell) assegnato per intero ad un LV (dell_lv).

Oggi nell'inserire la cassetta si sono verificati alcuni errori, per cui
ho iniziato una piccola indagine per capire di cosa si trattasse.

Il disco sembrerebbe ok, dato che badblocks non segnala errori.

Noto però che qualunque comando relativo a LVM produce quanto segue:

> host:/dev/mapper# pvs
>   /dev/dm-10: read failed after 0 of 2048 at 0: Input/output error
>   /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error
>   PV         VG   Fmt  Attr PSize   PFree
>   /dev/sda2  vg00 lvm2 a-   147.84G 132.60G
>   /dev/sdb1  vg01 lvm2 a-   465.76G 167.68G

dm-10 e dm-11 sono risp. i mapping legati al volume ottenuto con
"cryptsetup luksOpen" (ddell_rbu) e il logical volume (dell_lv) ivi
contenuto:

> host:/dev/mapper# l
> total 0
> drwxr-xr-x  2 root root     240 2010-11-22 13:57 ./
> drwxr-xr-x 19 root root    4.0K 2010-11-22 14:20 ../
> crw-rw----  1 root root  10, 60 2010-08-19 13:40 control
> brw-rw----  1 root disk 254, 10 2010-11-22 08:35 ddell_rbu
> brw-rw----  1 root disk 254,  2 2010-08-19 13:40 vg00-home_lv
> brw-rw----  1 root disk 254,  1 2010-08-19 13:40 vg00-root_lv
> brw-rw----  1 root disk 254,  0 2010-08-19 13:40 vg00-swap_lv
> brw-rw----  1 root disk 254,  3 2010-08-19 13:40 vg00-tmp_lv
> brw-rw----  1 root disk 254,  4 2010-08-19 13:40 vg00-usr_lv
> brw-rw----  1 root disk 254,  5 2010-08-19 13:40 vg00-var_lv
> brw-rw----  1 root disk 254,  6 2010-08-19 13:40 vg01-backup_lv
> brw-rw----  1 root disk 254, 11 2010-11-22 09:49 vgdell-dell_lv

L'output di "dmsetup info" sembrerebbe dire che i mapping sono sani ma
temo si tratti di una qualche informazione "stale".

> Name:              vgdell-dell_lv
> State:             ACTIVE
> Read Ahead:        256
> Tables present:    LIVE
> Open count:        0
> Event number:      0
> Major, minor:      254, 11
> Number of targets: 1
> UUID: LVM-JUDVVXy3eBORSNo8nNbXExMw12pbRqCLhqQFtndwOcrHuoPbUXQcdOkBiXTTsCf2

[...]

> Name:              ddell_rbu
> State:             ACTIVE
> Read Ahead:        256
> Tables present:    LIVE
> Open count:        1
> Event number:      0
> Major, minor:      254, 10
> Number of targets: 1

L'output di mount è:

> host:/dev/mapper# mount
> /dev/mapper/vg00-root_lv on / type reiserfs (rw)
> tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
> proc on /proc type proc (rw,noexec,nosuid,nodev)
> sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
> procbususb on /proc/bus/usb type usbfs (rw)
> udev on /dev type tmpfs (rw,mode=0755)
> tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
> devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
> /dev/sda1 on /boot type ext3 (rw)
> /dev/mapper/vg00-home_lv on /home type reiserfs (rw)
> /dev/mapper/vg00-tmp_lv on /tmp type reiserfs (rw)
> /dev/mapper/vg00-usr_lv on /usr type reiserfs (rw)
> /dev/mapper/vg00-var_lv on /var type reiserfs (rw)
> /dev/mapper/vg01-backup_lv on /backup type reiserfs (rw,noatime,notail)

Se cerco di chiudere il device cifrato ottengo:

> host:/dev/mapper# cryptsetup luksClose ddell_rbu
> Command failed: Device busy

Questo molto probabilmente perché il LV "dell_lv" è ancora montato. Se
cerco di disattivare il VG "vgdell" ottengo:

> host:/dev/mapper# vgchange -a n vgdell
>   /dev/dm-10: read failed after 0 of 2048 at 0: Input/output error
>   /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error
>   /dev/dm-10: read failed after 0 of 512 at 320061440000: Input/output error
>   /dev/dm-10: read failed after 0 of 512 at 320061554688: Input/output error
>   /dev/dm-10: read failed after 0 of 512 at 0: Input/output error
>   /dev/dm-10: read failed after 0 of 512 at 4096: Input/output error
>   /dev/dm-10: read failed after 0 of 2048 at 0: Input/output error
>   /dev/dm-11: read failed after 0 of 4096 at 320058884096: Input/output error
>   /dev/dm-11: read failed after 0 of 4096 at 320058941440: Input/output error
>   /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error
>   /dev/dm-11: read failed after 0 of 4096 at 4096: Input/output error
>   /dev/dm-11: read failed after 0 of 4096 at 0: Input/output error
>   Volume group "vgdell" not found

Escluderei un problema del filesystem della cassetta ma non di quello su
cui c'è root (che però non posso testare facilmente essendo in
produzione). Qualcuno mi suggerisce che test eseguire? Come posso
"smontare" questi mapping senza usare né cryptsetup né lvm? E' possibile
in qualche modo "ripristinare" le informazioni di LVM?


Grazie a tutti per una qualsiasi indicazione.

Alessandro




Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: