Glam Prestige Journal

Bright entertainment trends with youth appeal.

Our Ubuntu turned to read-only filesystem.

I checked the dmesg log and found the following:

kernel: ata5.00: exception Emask 0x0 SAct 0x200000 SErr 0x0 action 0x0
kernel: ata5.00: irq_stat 0x40000008
kernel: ata5.00: failed command: READ FPDMA QUEUED
kernel: ata5.00: cmd 60/08:a8:68:08:80/00:00:3f:00:00/40 tag 21 ncq dma 4096 in res 51/40:08:68:08:80/00:00:3f:00:00/40 Emask 0x409 (media error) <F>
kernel: ata5.00: status: { DRDY ERR }
kernel: ata5.00: error: { UNC }
kernel: ata5.00: configured for UDMA/133
kernel: sd 4:0:0:0: [sda] tag#21 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
kernel: sd 4:0:0:0: [sda] tag#21 Sense Key : Medium Error [current]
kernel: sd 4:0:0:0: [sda] tag#21 Add. Sense: Unrecovered read error - auto reallocate failed
kernel: sd 4:0:0:0: [sda] tag#21 CDB: Read(10) 28 00 3f 80 08 68 00 00 08 00
kernel: blk_update_request: I/O error, dev sda, sector 1065355368 op 0x0:(READ) flags 0x3000 phys_seg 1 prio clas>
kernel: EXT4-fs error (device sda1): ext4_wait_block_bitmap:519: comm kworker/u16:0: Cannot read block bitmap - b>
kernel: ata5: EH complete
kernel: Aborting journal on device sda1-8.
kernel: EXT4-fs (sda1): Remounting filesystem read-only

Tried getting smartctl data but wasnt installed (and can't install now).

The only info I get from all that is: Unrecovered read error - auto reallocate failed

I havent turned off the computer yet... but does this mean the hard disk is dieing? Can a fcsk fix it? Is there anything relevant from the log that I am missing? Or should I start looking for a new drive?

3

1 Answer

NCQ Errors

kernel: ata5.00: failed command: READ FPDMA QUEUED
kernel: ata5.00: cmd 60/08:a8:68:08:80/00:00:3f:00:00/40 tag 21 ncq dma 4096 in

Native Command Queuing (NCQ) is an extension of the Serial ATA protocol allowing hard disk drives to internally optimize the order in which received read and write commands are executed.

Edit sudo -H gedit /etc/default/grub and change the following line to include this extra parameter. Then do sudo update-grub to write the changes to disk. Reboot. Monitor hangs/etc., and watch grep -i FPDMA /var/log/syslog* or dmesg for continued error messages.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.force=noncq"

File System Check

  • boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
  • open a terminal window by pressing Ctrl+Alt+T
  • type sudo fdisk -l
  • identify the /dev/sdXX device name for your "Linux Filesystem"
  • type sudo fsck -f /dev/sda1, replacing sdXX with the number you found earlier
  • repeat the fsck command if there were errors
  • type reboot

Bad Block

Note: do NOT abort a bad block scan!

Note: do NOT bad block a SSD

Note: backup your important files FIRST!

Note: this will take many hours

Note: you may have a pending HDD failure

Boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode.

In terminal...

sudo fdisk -l # identify all "Linux Filesystem" partitions

sudo e2fsck -fcky /dev/sdXX # read-only test

or

sudo e2fsck -fccky /dev/sda1 # non-destructive read/write test (recommended)

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.

The -fccky parameter...

 -f Force checking even if the file system seems clean. -c This option causes e2fsck to use badblocks(8) program to do a read-only scan of the device in order to find any bad blocks. If any bad blocks are found, they are added to the bad block inode to prevent them from being allocated to a file or direc‐ tory. If this option is specified twice, then the bad block scan will be done using a non-destructive read-write test. -k When combined with the -c option, any existing bad blocks in the bad blocks list are preserved, and any new bad blocks found by running badblocks(8) will be added to the existing bad blocks list. -y Assume an answer of `yes' to all questions; allows e2fsck to be used non-interactively. This option may not be specified at the same time as the -n or -p options.
10

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy