fdisk问题。
操作系统:Linux centos 7
我在USB驱动器上使用了fdisk。它已挂起,我无法杀死它或摆脱它。
从那以后,作为一个附加问题,在尝试解决此问题时,我物理上删除了显示在/ dev /中的其他USB驱动器。但是,即使不再物理连接,它们仍显示在/ dev /中。
这是lsblk(我已从此列表中删除了列出的其他设备)lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdf 8:80 0 1.8T 0 disk
└─sdf1 8:81 0 1.8T 0 part
sr0 11:0 1 1024M 0 rom
我按照朋友为我格式化另一个USB驱动器(相同的USB驱动器类型)时所做的注释进行了以下选择。目的是将其格式化为ext4。
以下是一组选项(有插图):
[root@linux18 ~]# fdisk /dev/sdf
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): **m**
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
g create a new empty GPT partition table
G create an IRIX (SGI) partition table
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): **d**
Selected partition 1
Partition 1 is deleted
Command (m for help): **n**
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-3906963455, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-3906963455, default 3906963455):
Using default value 3906963455
Partition 1 of type Linux and of size 1.8 TiB is set
Command (m for help): **t**
Selected partition 1
Hex code (type L to list all codes): 83
Changed type of partition 'Linux' to 'Linux'
Command (m for help): **w**
The partition table has been altered!
在这里,我尝试了Control C和Control Z:
^[[B^[[B^[[B
^[[6~
^C^[[5~
1
您能否在挂起后立即发布dmesg输出?
—
Nikita Kipriyanov
fdisk命令大约在24小时前被调用-我在这里显示我认为可能是什么,但不确定:[3398520.474203]信息:任务fdisk:31778被阻止了120秒以上。[3398520.474208]“回显0> / proc / sys / kernel / hung_task_timeout_secs”禁用此消息。[3398520.474210] fdisk的d ffff88045fd13680 0 31778 21459 0x00000080 [3398520.474214] ffff880013e17cc8 0000000000000086 ffff8800021a8000 ffff880013e17fd8 [3398520.474218] ffff880013e17fd8 ffff880013e17fd8 ffff8800021a8000 ffff88045fd13f48 [3398520.474220] ffff88045ff9cee8 0000000000000002 ffffffff811562e0
—
麦克Ť