fdisk doesn't complete and hangs on a USB drive
fdisk problem.
OS: linux centos 7
I used fdisk on a usb drive. It has hung and I haven't been able to kill it or get out of it.
As an additional problem, since then, in trying to remedy this problem, I physically removed other USB drives that showed up in /dev/. However, those still show in /dev/ even though are no longer physically attached.
Here is lsblk (I removed from this listing other devices that are listed)
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
I made the choices below following the notes I made when a friend formatted another USB drive for me (same exact USB drive type). The intention is to format it as ext4.
Below is the set of choices (emboldened):
[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!
Here I tried both Control C and Control Z:
^[[B^[[B^[[B
^[[6~
^C^[[5~
linux hard-drive usb formatting
add a comment |
fdisk problem.
OS: linux centos 7
I used fdisk on a usb drive. It has hung and I haven't been able to kill it or get out of it.
As an additional problem, since then, in trying to remedy this problem, I physically removed other USB drives that showed up in /dev/. However, those still show in /dev/ even though are no longer physically attached.
Here is lsblk (I removed from this listing other devices that are listed)
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
I made the choices below following the notes I made when a friend formatted another USB drive for me (same exact USB drive type). The intention is to format it as ext4.
Below is the set of choices (emboldened):
[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!
Here I tried both Control C and Control Z:
^[[B^[[B^[[B
^[[6~
^C^[[5~
linux hard-drive usb formatting
1
Could you post dmesg output right after it hang?
– Nikita Kipriyanov
Dec 6 '15 at 17:20
The fdisk command was invoked about 24 hours ago - I am showing here what I think it might be but am not sure: [3398520.474203] INFO: task fdisk:31778 blocked for more than 120 seconds. [3398520.474208] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [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
– Mike T
Dec 7 '15 at 1:54
add a comment |
fdisk problem.
OS: linux centos 7
I used fdisk on a usb drive. It has hung and I haven't been able to kill it or get out of it.
As an additional problem, since then, in trying to remedy this problem, I physically removed other USB drives that showed up in /dev/. However, those still show in /dev/ even though are no longer physically attached.
Here is lsblk (I removed from this listing other devices that are listed)
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
I made the choices below following the notes I made when a friend formatted another USB drive for me (same exact USB drive type). The intention is to format it as ext4.
Below is the set of choices (emboldened):
[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!
Here I tried both Control C and Control Z:
^[[B^[[B^[[B
^[[6~
^C^[[5~
linux hard-drive usb formatting
fdisk problem.
OS: linux centos 7
I used fdisk on a usb drive. It has hung and I haven't been able to kill it or get out of it.
As an additional problem, since then, in trying to remedy this problem, I physically removed other USB drives that showed up in /dev/. However, those still show in /dev/ even though are no longer physically attached.
Here is lsblk (I removed from this listing other devices that are listed)
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
I made the choices below following the notes I made when a friend formatted another USB drive for me (same exact USB drive type). The intention is to format it as ext4.
Below is the set of choices (emboldened):
[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!
Here I tried both Control C and Control Z:
^[[B^[[B^[[B
^[[6~
^C^[[5~
linux hard-drive usb formatting
linux hard-drive usb formatting
edited Dec 6 '15 at 22:12
Archemar
1,53221018
1,53221018
asked Dec 6 '15 at 17:14
Mike TMike T
1114
1114
1
Could you post dmesg output right after it hang?
– Nikita Kipriyanov
Dec 6 '15 at 17:20
The fdisk command was invoked about 24 hours ago - I am showing here what I think it might be but am not sure: [3398520.474203] INFO: task fdisk:31778 blocked for more than 120 seconds. [3398520.474208] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [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
– Mike T
Dec 7 '15 at 1:54
add a comment |
1
Could you post dmesg output right after it hang?
– Nikita Kipriyanov
Dec 6 '15 at 17:20
The fdisk command was invoked about 24 hours ago - I am showing here what I think it might be but am not sure: [3398520.474203] INFO: task fdisk:31778 blocked for more than 120 seconds. [3398520.474208] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [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
– Mike T
Dec 7 '15 at 1:54
1
1
Could you post dmesg output right after it hang?
– Nikita Kipriyanov
Dec 6 '15 at 17:20
Could you post dmesg output right after it hang?
– Nikita Kipriyanov
Dec 6 '15 at 17:20
The fdisk command was invoked about 24 hours ago - I am showing here what I think it might be but am not sure: [3398520.474203] INFO: task fdisk:31778 blocked for more than 120 seconds. [3398520.474208] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [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
– Mike T
Dec 7 '15 at 1:54
The fdisk command was invoked about 24 hours ago - I am showing here what I think it might be but am not sure: [3398520.474203] INFO: task fdisk:31778 blocked for more than 120 seconds. [3398520.474208] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [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
– Mike T
Dec 7 '15 at 1:54
add a comment |
1 Answer
1
active
oldest
votes
This seem so be analogous to the problem you were facing: https://access.redhat.com/solutions/369623
Maybe try # dmsetup remove
with some of the flag in the man page (--force --deferred --retry
)
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1009857%2ffdisk-doesnt-complete-and-hangs-on-a-usb-drive%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This seem so be analogous to the problem you were facing: https://access.redhat.com/solutions/369623
Maybe try # dmsetup remove
with some of the flag in the man page (--force --deferred --retry
)
add a comment |
This seem so be analogous to the problem you were facing: https://access.redhat.com/solutions/369623
Maybe try # dmsetup remove
with some of the flag in the man page (--force --deferred --retry
)
add a comment |
This seem so be analogous to the problem you were facing: https://access.redhat.com/solutions/369623
Maybe try # dmsetup remove
with some of the flag in the man page (--force --deferred --retry
)
This seem so be analogous to the problem you were facing: https://access.redhat.com/solutions/369623
Maybe try # dmsetup remove
with some of the flag in the man page (--force --deferred --retry
)
answered Jul 21 '17 at 11:20
AdamKaliszAdamKalisz
40946
40946
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1009857%2ffdisk-doesnt-complete-and-hangs-on-a-usb-drive%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Could you post dmesg output right after it hang?
– Nikita Kipriyanov
Dec 6 '15 at 17:20
The fdisk command was invoked about 24 hours ago - I am showing here what I think it might be but am not sure: [3398520.474203] INFO: task fdisk:31778 blocked for more than 120 seconds. [3398520.474208] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [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
– Mike T
Dec 7 '15 at 1:54