大佬们求助,硬盘没法格式化/dev/sda1 is apparently in use by the system; will not make a filesystem here!

187 天前
 wk1399
root@debian:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 2.7T 0 disk
└─sda1 8:1 0 2.7T 0 part
.
.
root@debian:~# fdisk -l /dev/sda
Disk /dev/sda: 2.73 TiB, 3000592982016 bytes, 5860533168 sectors
Disk model: ST3000VX010-2E31
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: BD227131-9A7E-483A-A10A-168B10B1F0FD

Device Start End Sectors Size Type
/dev/sda1 2048 5859375103 5859373056 2.7T Linux filesystem
.
.
root@debian:~# dmraid -s
no raid disks
.
.
root@debian:~# mkfs.ext4 /dev/sda1
mke2fs 1.47.0 (5-Feb-2023)
/dev/sda1 is apparently in use by the system; will not make a filesystem here!
.
.
root@debian:~# umount /dev/sda1
umount: /dev/sda1: not mounted.

束手无策了
1252 次点击
所在节点    Linux
5 条回复
busier
187 天前
确定该盘不再使用,并取消了自动挂载

否则不要继续下面的操作


以 root 身份执行命令 wipefs -a -f /dev/sda1

重启后再格式化
wk1399
187 天前
@busier woc 可以了,感谢大佬
busier
187 天前
还有忘了说了 确定他不是 lvm zfs 或 btrfs 的一部分

Fdisk -l 只看了分区类型 这只是分区表的设定值 没啥用

用 blkid 看下分区文件系统是啥
wk1399
187 天前
@busier 刚刚按你说的重启后可以格式化了,非常感谢!!!

root@debian:~# blkid
/dev/sda5: UUID="99c0f93b-3d3a-4fbb-a4a5-c5a2b32731e7" TYPE="swap" PARTUUID="d987e546-05"
/dev/sda1: UUID="4438800b-7de1-461d-b53e-dd211a727fb4" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="d987e546-01"
/dev/sdb1: UUID="afe668e3-7b85-4042-a333-582e2747c172" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="3a51ff32-fbbb-494d-9753-7225aca6c248"
/dev/sdc1: UUID="90f6dbb8-6aff-4476-95c1-4d3e1487a9d2" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="f1897131-f67c-44a3-97e0-4ccaa4d1b056"
Acatdef
186 天前
做过 zfs 吗?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1116187

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX