In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
How to fix Linux server disk bad sectors? In response to this problem, today's Xiaobian summarizes this article about disk repair, hoping to help more friends who want to solve this problem find a simpler and easier way.
I. Process
1, disk bad track check
After the problem occurred, the business was stopped first, and then the disk was unloaded for repair. This problem may be caused by bad tracks on the disk. I first checked the bad track of the disk.
badblocks -sv /dev/sdb
Almost checked for some time, found that there is no bad road.
2. Repair disk file system
When repairing the file system, it is found that it cannot be repaired, and the Superblock invalid is displayed.
[root@ad4 ~]# fsck -t ext4 /dev/sdb
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/sdb
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193
3. View file system backup Superblock
[root@ad4 ~]# mke2fs -n /dev/sdb
mke2fs 1.41.12 (17-May-2010)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
122093568 inodes, 488364854 blocks
24418242 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
14904 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
4. Repair file system
e2fsck -b 214990848 -y /dev/sdb
There are a lot of things to fix, and the fix is successful.
After reading this article, have you learned how to fix bad disk sectors on Linux servers? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.