problemi con il filesystem

Prossima versione di Ubuntu in fase di sviluppo e test. Per i precedenti rilasci, consultare «Archivio del forum».
Avatar utente
kimj
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1058
Iscrizione: sabato 13 settembre 2008, 11:45

problemi con il filesystem

Messaggio da kimj »

stavo installando un pacchetto (SoundKonverter) quando apt ha fallito a causa del filesystem di colpo in sola lettura.
dmesg riporta:

Codice: Seleziona tutto

[44501.734031] sd 0:0:0:0: [sda] tag#4 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_TIMEOUT
[44501.734036] sd 0:0:0:0: [sda] tag#4 CDB: Write(10) 2a 00 12 c6 1a 40 00 25 c0 00
[44501.734038] blk_update_request: I/O error, dev sda, sector 314972736
[44501.734061] EXT4-fs warning (device dm-3): ext4_end_bio:332: I/O error -5 writing to inode 9699593 (offset 25165824 size 8388608 starting block 39308104)
[44501.734063] Buffer I/O error on device dm-3, logical block 39308104
[44501.734065] Buffer I/O error on device dm-3, logical block 39308105
[44501.734067] Buffer I/O error on device dm-3, logical block 39308106
[44501.734068] Buffer I/O error on device dm-3, logical block 39308107
[44501.734069] Buffer I/O error on device dm-3, logical block 39308108
[44501.734070] Buffer I/O error on device dm-3, logical block 39308109
[44501.734071] Buffer I/O error on device dm-3, logical block 39308110
[44501.734073] Buffer I/O error on device dm-3, logical block 39308111
[44501.734074] Buffer I/O error on device dm-3, logical block 39308112
[44501.734075] Buffer I/O error on device dm-3, logical block 39308113
[44501.734130] EXT4-fs warning (device dm-3): ext4_end_bio:332: I/O error -5 writing to inode 9699593 (offset 25165824 size 8388608 starting block 39308272)
[44501.734186] EXT4-fs warning (device dm-3): ext4_end_bio:332: I/O error -5 writing to inode 9699593 (offset 25165824 size 8388608 starting block 39308440)
[44501.734243] EXT4-fs warning (device dm-3): ext4_end_bio:332: I/O error -5 writing to inode 9699593 (offset 25165824 size 8388608 starting block 39308608)
[44501.734292] EXT4-fs warning (device dm-3): ext4_end_bio:332: I/O error -5 writing to inode 9699593 (offset 25165824 size 8388608 starting block 39308776)
[44501.734341] EXT4-fs warning (device dm-3): ext4_end_bio:332: I/O error -5 writing to inode 9699593 (offset 25165824 size 8388608 starting block 39308944)
[44501.734390] EXT4-fs warning (device dm-3): ext4_end_bio:332: I/O error -5 writing to inode 9699593 (offset 25165824 size 8388608 starting block 39309112)
[44501.734428] EXT4-fs warning (device dm-3): ext4_end_bio:332: I/O error -5 writing to inode 9699593 (offset 25165824 size 8388608 starting block 39309280)
[44501.734442] sd 0:0:0:0: [sda] tag#3 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_TIMEOUT
[44501.734444] sd 0:0:0:0: [sda] tag#3 CDB: Write(10) 2a 00 12 c6 15 00 00 05 40 00
[44501.734445] blk_update_request: I/O error, dev sda, sector 314971392
[44501.734469] EXT4-fs warning (device dm-3): ext4_end_bio:332: I/O error -5 writing to inode 9699593 (offset 25165824 size 8388608 starting block 39307936)
[44501.734574] sd 0:0:0:0: [sda] tag#5 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_TIMEOUT
[44501.734576] sd 0:0:0:0: [sda] tag#5 CDB: Write(10) 2a 00 12 c6 80 00 00 32 80 00
[44501.734577] blk_update_request: I/O error, dev sda, sector 314998784
[44501.734593] EXT4-fs warning (device dm-3): ext4_end_bio:332: I/O error -5 writing to inode 9699593 (offset 33554432 size 6619136 starting block 39311360)
[44501.735479] sd 0:0:0:0: [sda] tag#6 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_TIMEOUT
[44501.735482] sd 0:0:0:0: [sda] tag#6 CDB: Write(10) 2a 00 12 c1 7a 08 00 03 c8 00
[44501.735484] blk_update_request: I/O error, dev sda, sector 314669576
[44501.735572] sd 0:0:0:0: [sda] tag#7 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_TIMEOUT
[44501.735574] sd 0:0:0:0: [sda] tag#7 CDB: Write(10) 2a 00 07 8f c6 30 00 02 60 00
[44501.735575] blk_update_request: I/O error, dev sda, sector 126862896
[44501.735613] sd 0:0:0:0: [sda] tag#8 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_TIMEOUT
[44501.735615] sd 0:0:0:0: [sda] tag#8 CDB: Write(10) 2a 00 09 4f 07 70 00 00 c0 00
[44501.735615] blk_update_request: I/O error, dev sda, sector 156174192
[44501.735772] Aborting journal on device dm-3-8.
[44501.735797] EXT4-fs error (device dm-3) in __ext4_new_inode:863: Journal has aborted
[44503.317111] JBD2: Spotted dirty metadata buffer (dev = dm-3, blocknr = 0). There's a risk of filesystem corruption in case of system crash.
[44503.325343] EXT4-fs (dm-3): Delayed block allocation failed for inode 3932213 at logical offset 7 with max blocks 1 with error 30
[44503.325360] EXT4-fs (dm-3): This should not happen!! Data will be lost

[44503.325363] EXT4-fs error (device dm-3) in ext4_writepages:2520: Journal has aborted
[44503.860623] EXT4-fs (dm-3): Remounting filesystem read-only
[44503.957597] EXT4-fs error (device dm-3): ext4_journal_check_start:56: Detected aborted journal
[44503.957602] EXT4-fs error (device dm-3): ext4_journal_check_start:56: Detected aborted journal
[44503.957609] EXT4-fs error (device dm-3): ext4_journal_check_start:56: Detected aborted journal
[44503.958486] EXT4-fs error (device dm-3): ext4_journal_check_start:56: Detected aborted journal
sarà anche andato momentaneamente in timeout l'ssd, ma avendo /boot come partizione separata sullo stesso disco, questa non sembra affetta dal problema, quindi escluderei si tratti di un difetto dell'ssd:

Codice: Seleziona tutto

echo test > /boot/prova
sync
cat /boot/prova
test
in /:

Codice: Seleziona tutto

echo test > /prova
bash: /prova: File system in sola lettura
appurato che non ci sono problemi hardware, provo a rimontare il filesystem in lettura e scrittura:

Codice: Seleziona tutto

mount -o remount,rw /
mount: cannot remount /dev/mapper/ubuntu--vg-root read-write, is write-protected
ho pensato quindi ad un problema col gruppo di volumi "ubuntu-vg" o con dm-crypt sotto al volume fisico, ma riesco a scrivere senza problemi su un altro volume logico sempre in "ubuntu-vg":

Codice: Seleziona tutto

swapoff /dev/mapper/ubuntu--vg-swap_1
dd if=/dev/zero of=/dev/mapper/ubuntu--vg-swap_1
^C41713+0 record dentro
41713+0 record fuori
21357056 byte (21 MB) copiati, 2,36102 s, 9,0 MB/s

Codice: Seleziona tutto

yes "pattern" > /dev/mapper/ubuntu--vg-swap_1
head /dev/mapper/ubuntu--vg-swap_1
pattern
pattern
pattern
pattern
pattern
pattern
pattern
pattern
pattern
pattern
mi sembra quindi un bug del kernel da qualche parte tra ext4 e la sua interazione con un volume logico, che si verifica quando il disco va temporaneamente in timeout per troppe richieste di scrittura

aggiungo che il test sul volume logico contenente la swap mostra che il gruppo di volumi lvm NON è in sola lettura, e nemmeno quello contenente / appare essere in sola lettura, per quanto mount riporti il contrario:

Codice: Seleziona tutto

lvdisplay ubuntu-vg/root
  --- Logical volume ---
  LV Path                /dev/ubuntu-vg/root
  LV Name                root
  VG Name                ubuntu-vg
  LV UUID                YqFEdA-nOxw-dAqI-aQ9X-K7YZ-Os2w-gohNp2
  LV Write Access        read/write
  LV Creation host, time ubuntu, 2015-09-27 11:41:26 +0200
  LV Status              available
  # open                 1
  LV Size                151,75 GiB
  Current LE             38849
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:3
We no longer think of chairs as technology; we just think of them as chairs. But there was a time when we hadn't worked out how many legs chairs should have, how tall they should be, and they would often 'crash' when we tried to use them.
Avatar utente
ubuntumate
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1180
Iscrizione: giovedì 28 maggio 2015, 18:18
Distribuzione: Windows 7
Sesso: Maschile
Località: Milano

Re: problemi con il filesystem

Messaggio da ubuntumate »

Io un controllo da live con badblocks e smartctl lo farei,giusto per sicurezza.
Software engineers shall participate in lifelong learning regarding the practice of their profession and shall promote an ethical approach to the practice of the profession.
ACM/IEEE Code of ethics.
Avatar utente
kimj
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1058
Iscrizione: sabato 13 settembre 2008, 11:45

Re: problemi con il filesystem

Messaggio da kimj »

già fatto, il disco funziona, semplicemente quando riceve un burst di richieste di scrittura che non può gestire (ho notato che questo accade principalmente quando, su linux, uso lvm+luks) manda parte di queste richieste temporaneamente in timeout, poi riprende ad accettarle.

solo che linux, non capisco per quale ragione, una volta che il disco riprende a funzionare correttamente mi permette di utilizzarlo in scrittura TRANNE che per il filesystem che ha causato il problema, e così corrompe quest'ultimo con annessa possibile perdita di dati, come avvenuto ieri.

inoltre continua a ritentare le stesse richieste andate in timeout immediatamente senza interrompere il burst, cosa che le fa fallire ripetutamente quando sarebbe meglio -se non è possibile evitare l'ondata di scritture- aggiungere un qualche delay prima di ritentare.
difatti quando il filesystem incriminato viene forzato in RO il disco rincomincia ad essere utilizzabile in scrittura. non capisco poi perché forzare il filesystem in ro portando alla sua corruzione quando il kernel suppone un problema hardware, e non bloccare invece le scritture sul dispositivo... (per qualche ragione, considera solo il dispositivo immediatamente sottostante al fs, che è un volume logico)
We no longer think of chairs as technology; we just think of them as chairs. But there was a time when we hadn't worked out how many legs chairs should have, how tall they should be, and they would often 'crash' when we tried to use them.
Avatar utente
ubuntumate
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1180
Iscrizione: giovedì 28 maggio 2015, 18:18
Distribuzione: Windows 7
Sesso: Maschile
Località: Milano

Re: problemi con il filesystem

Messaggio da ubuntumate »

Puoi provare a disattivare l'opzione on error = remount ro se sei 100% sicuro che è linux che si sbaglia. In genere linux mette il sistema in sola lettura quando ritiene che la scrittura su disco possa provocare ulteriori danni.
Software engineers shall participate in lifelong learning regarding the practice of their profession and shall promote an ethical approach to the practice of the profession.
ACM/IEEE Code of ethics.
Scrivi risposta

Ritorna a “Wily Werewolf 15.10”

Chi c’è in linea

Visualizzano questa sezione: 0 utenti iscritti e 7 ospiti