Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deal with disk failure Input/output error in Ubuntu18.04

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces how to deal with disk fault Input/output error in Ubuntu18.04, the content is very detailed, interested friends can refer to, hope to be helpful to you.

System environment

Cat / etc/os-release

NAME= "Ubuntu" VERSION= "18.04.1 LTS (Bionic Beaver)" ID=ubuntuID_LIKE=debianPRETTY_NAME= "Ubuntu 18.04.1 LTS" VERSION_ID= "18.04" normal disk information

Lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTloop0 7:0 0 89.1M1 loop / snap/core/8039loop1 7:1 089.1M1 loop / snap/core/7917sda 8:0 054.6T 0 disk └─ sda1 8:1 054.6T 0 part / datasdb 8:16 0111.8G 0 disk ├─ sdb1 8:17 01M 0 part └─ sdb2 8:18 0111.8G 0 part / fault phenomenon

Log in to the faulty machine normally and report the following error when executing the command in the / data directory, such as: ls,scp:

Ls: cannot access xxx: Input/output error

And the permission bits of the directory you view are all "?"

Troubleshooting

The troubleshooting procedures and steps for this time are as follows:

(1) check the error information related to the disk, and use dmesg | grep sd or dmesg | grep error to get detailed error information:

```[4188949.476468] EXT4-fs error (device sda1): ext4_lookup:1441: inode # 2: comm bash: deleted inode referenced: 14942209 [4188951.685099] EXT4-fs error (device sda1): ext4_lookup:1441: inode # 2: comm bash: deleted inode referenced: 14942209``` the above information tells us that there is a problem with the `/ dev/sda1` file system ~

(2) try to repair the hard disk manually

If `fsck / dev/sda1'is lucky, use the above command to repair the faulty disk. If you are unlucky, an error similar to ```fsck from util-linux 2.23.2 / dev/sda1 is mounted e2fsck: Cannot continue, aborting will occur. `

(3) try the following repair methods

If you are unlucky like a blogger, you can try the following methods: * restart the machine * enter single-user mode and try to use fsck to repair the file system. If you are using a CVM such as Aliyun, please give up this method. If you want to struggle, please contact Aliyun engineer to assist in troubleshooting ~ * (recommended) modify the `/ etc/fstab` configuration file and set the last location to 1. Restart the system again, and let the system do fsck repair automatically during restart, such as `/ dev/sda1 / data ext4 defaults 01` and others.

If you see an error in / dev/sda1 is mounted when you try to repair your hard drive manually, then execute umount-l / data and then mount-an or mount / dev/sda1 / data:

Mount: / dev/sda1 already mounted or / data busy

If you execute fuser-m / dev/sda1 again, if you return a non-null value, such as 36182c 23463c, and then execute fuser-km / dev/sda1, good, you will get the following error when you mount mount / dev/sda1 / data again:

/ dev/sda1 is not a valid block device

Are you in a bit of a panic? how to repair and lose the disk? this is too embarrassing, and then the operation is as fierce as tiger, fdisk-l, fdisk / dev/sda, parted, blkid, there is no SDA disk information, confused ~

Don't panic, use lsblk to check, the content is as follows:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTloop0 7:0 0 89.1M1 loop / snap/core/8039loop1 7:1 089.1M1 loop / snap/core/7917sda 8:0 054.6T 0 disk └─ sda1 8:1 054.6T 0 part # # is not mounted / data directory sdb 8:16 0111.8G 0 disk ├─ sdb1 8:17 01M 0 part sdb2 8:18 0111.8G 0 part /

The reassuring thing is that the disk is still there and the data is still there. For the above error report, you only need to perform the "modify / etc/fstab configuration file" in the troubleshooting directory. Fortunately, all the data is in ~

On how to deal with disk failures in Ubuntu18.04 Input/output error to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report