磁盘问题和解决: fsck,gdisk,fdisk等
错误: Resize inode not valid
对于gpt分区的硬盘一般fsck只能检查分区, 不能用于检查整个硬盘, 但是如果对硬盘设备运行时遇到这样的错误
$ sudo fsck -n /dev/sdc
fsck from util-linux 2.37.2
e2fsck 1.46.5 (30-Dec-2021)
GW1.5T was not cleanly unmounted, check forced.
Resize inode not valid. Recreate? no
用 gdisk检查一下分区表, 可能会提示下面的信息
$ sudo gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.8
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************
Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.
对于这种情况, 需要清空GPT和MBR, 命令 x -> z -> y * 2
Command (? for help): x
Expert command (? for help): z
About to wipe out GPT on /dev/sdc. Proceed? (Y/N): y
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Blank out MBR? (Y/N): y
之后再看就正常了
$ sudo gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.8
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
用gdisk分区
Command (? for help): n
Partition number (1-128, default 1):
First sector (34-2813066894, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-2813066894, default = 2813066894) or {+-}size{KMGTP}:
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300):
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdc.
The operation has completed successfully.
分区之后, 会显示GPT信息
$ sudo gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.8
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
错误: Bad magic number in super-block
如果用fsck直接检查GPT分区的硬盘时就会报这个错误
$ sudo fsck -n /dev/sdc
fsck from util-linux 2.37.2
e2fsck 1.46.5 (30-Dec-2021)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdc
需要指定文件系统对应的分区进行检查
$ sudo fsck -n /dev/sdc1
fsck from util-linux 2.37.2
e2fsck 1.46.5 (30-Dec-2021)
1T4B: clean, 11/87908352 files, 5800552/351633105 blocks
如果需要检查硬盘, 用 gdisk /dev/sdc, 然后在里面用 v 命令
错误 ata1: irq_stat 0x00400000, PHY RDY changed
在N2 NS-1 (CPU:hi3798mv200)上挂载一块 SanDisk ECO 1.92T SSD 时, 在dmesg中每隔100秒出现如下错误
[ 360.673489] ata1: exception Emask 0x10 SAct 0x0 SErr 0x10000 action 0xe frozen
[ 360.679463] ata1: irq_stat 0x00400000, PHY RDY changed
[ 360.683343] ata1: SError: { PHYRdyChg }
[ 360.685977] ata1: hard resetting link
[ 370.720684] ata1: softreset failed (device not ready)
[ 370.724476] ata1: hard resetting link
[ 375.681723] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 375.684718] ata1.00: configured for UDMA/133
[ 375.684745] ata1: EH complete
根据网上搜索到的结果, 大部分原因为: 供电问题, 硬盘硬件问题, 以及文件格式错误. 参考 https://forums.gentoo.org/viewtopic-t-815278.html
将整块SSD重新格式化为ext4后, 未再报错.
磁盘问题和解决: fsck,gdisk,fdisk等的更多相关文章
- docker磁盘空间不足解决办法
docker磁盘空间不足解决办法 导入docker镜像时,错误提示:磁盘空间不足. 1.查看docker镜像存放目录空间大小 du -hs /var/lib/docker/ 2.停止docker服务. ...
- Linux磁盘分区(一)之fdisk命令
Linux磁盘分区(一)之fdisk命令转自:https://www.cnblogs.com/machangwei-8/p/10353683.html 一.fdisk 的介绍fdsik 能划分磁盘成为 ...
- [CentOS7] 磁盘分区(gdisk, fdisk)
声明:本文主要总结自:鸟哥的Linux私房菜-第七章.Linux 磁碟與檔案系統管理,如有侵权,请通知博主 磁盘分区步骤: 1.先找出当前有哪些磁盘lsblk或blkid(也就是确定是sda还是vda ...
- ORA-19502: write error on file "", blockno (blocksize=)/linux下磁盘空间满了解决办法--Virtualbox
今天,在测试环境启动数据库时,报错: SQL> startup; ORACLE instance started. Total System Global Area 285212672 byt ...
- 避免VMware P2V 过程中遇到的磁盘问题及解决 版本5.5
正式步骤开始:填写红色框内相关要被转换成虚拟机的物理机器的账号信息 选择虚拟主机要转换到的目的主机,填写相关的账号信息 设置转换参数:这里要注意一下关于磁盘的设置,注意:如果源系统是LVM的磁盘卷不将 ...
- Linux 磁盘空间查询&&解决Linux 中“磁盘空间不足”的问题
一.linux 查看目录的剩余空间大小 两个命令df .du结合比较直观 df -h 查看整台服务器的硬盘使用情况 du -lh --max-depth=1 : 查看当前目录下一级子文件和子目录占用的 ...
- 磁盘管理|df、du|分区 fdisk |格式化
3.磁盘管理 3.1命令df ·用于查看已挂载磁盘的总容量,使用容量,剩余容量等. -i:查看inodes的使用情况 -h:使用合适的单位显示 -k:以KB为单位显示 -m:以MB为单位显示 3.1. ...
- 磁盘分区(1):fdisk和parted
一.Linux存储管理 关于Linux硬盘的识别: (1)如果是IDE设备,在计算机中将被识别为hd,第一个IDE设备会被识别为hda,第二个IDE设备会被识别为hdb,依此类推. (2)如果是SAT ...
- linux中df和du查看磁盘大小不一致解决方法
挂了一块50G到/data目录下# df -h Filesystem Size Used Avail Use% Mounted on /dev/xvdb1 50G 46G 1.2G 98% /dat ...
- Windows 10磁盘占用100%解决办法
开机后磁盘占用高,是因为 windows 10 默认启用了 superfetch 服务. 这个服务的主要功能是加快程序的启动速度.开机以后,系统将那些经常使用的程序,预先从硬盘加载到内存中,这样, ...
随机推荐
- shell脚本编程(一)
c81ba641-5ed7-4ab9-a7c0-e319e0f3890b 初识shell脚本编程 最近项目需求,需要了解下shell脚本编程,所以自己就必须玩玩了= = 初识shell脚本编程,找了几 ...
- SpringCloud之Nacos学习使用
文章目录 Nacos 注册中心 核心功能 配置启动 集群搭建 Nacos是SpringCloudAilibaba提供的开源组件,有了Nacos我们就可以代替Eureka和SpringCloudConf ...
- 可视化—gojs 超多超实用经验分享(一)
目录 1. 设置分组模板,默认样式,统一最小宽度,展开收起状态监听 2. 分组名称显示成员个数: 分组名称+成员个数: name(children) 3. 分组成员为空时,不显示 placeholde ...
- Pytorch数据操作
1.Pytorch中tensor的生成与访问 可以使用arange()创建一个张量:如,torch.arange(12)创建0开始的前12个整数: 除非特殊指定,否则新的张量将存放在内存中,并采用CP ...
- css3 flex弹性布局详解
一.flexbox弹性盒子 2009年,W3C 提出了一种新的方案----Flex 布局,可以简便.完整.响应式地实现各种页面布局.目前,它已经得到了所有浏览器的支持,这意味着,现在就能很安全地使用这 ...
- js 获取 ajax返回数据及处理
$.ajax({ url: "http://xiaocui.dgoods.cn/app/index.php?i=5&c=entry&do=check&m=stonef ...
- mac系统下,docker安装kibana报错,manifest for kibana:latest not found: manifest unknown: manifest unknown
1.问题描述:mac系统下,docker安装kibana报错,manifest for kibana:latest not found: manifest unknown: manifest unkn ...
- 聊聊Seata分布式解决方案AT模式的实现原理
什么是Seata分布式事务解决方案 Seata是一款开源的分布式事务解决方案,致力于提供高性能和简单易用的分布式事务服务.为用户提供了AT.TCC.SAGA和XA事务模式,为用户打造一站式的分布式解决 ...
- 蓝桥杯真题 k倍区间
考点: - 利用前缀和求子列和 - 同余作差是模的倍数 题目概要 给定一个长度为N的数列,A1, A2, - AN,如果其中一段连续的子序列Ai, Ai+1, - Aj(i <= j)之和是K的 ...
- Apache Hudi 1.x 版本重磅功能展望与讨论
Apache Hudi 社区正在对Apache Hudi 1.x版本功能进行讨论,欢迎感兴趣同学参与讨论,PR链接:https://github.com/apache/hudi/pull/8679/f ...