Answer the question
In order to leave comments, you need to log in
Why won't the disk be formatted and mounted in Linux?
There is a server on Debian. I add a 3TB hard disk (one 3TB disk is already there).
cfdisk make a gpt partition and try to format it: # mkfs.ext4 /dev/sdbb1
I get an error:
/dev/sdbb1 is apparently in use by the system; will not make a filesystem here!
# fdisk -l /dev/sdbb
Disk /dev/sdbb: 2,7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D5070E08-C07A-4407-AA88-6FD4DBBDDAB7
Device Start End Sectors Size Type
/dev/sdbb1 2048 5860532223 5860530176 2,7T Linux filesystem
#mount /dev/sdbb1 /mnt/local-hdd/
mount: /dev/sdbb1 is already mounted or /mnt/local-hdd busy
Answer the question
In order to leave comments, you need to log in
Here's what the solution was:
Multipath is to blame for everything, it is he who "holds" the disk for change.
...
3600304800f704e0021ba6c54160d09df dm-2 SMC,SMC2108
size=2.7T features='1 retain_attached_hw_handler' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
`- 0:2:0:0 sda 8:0 active ready running
#vim /etc/multipath.conf (если нет - создать)
blacklist {
wwid 3600304800f704e0021ba6c54160d09df
}
#/etc/init.d/mutlipath-tools restart
#multipath -ll
As I understand it, the disk is already mounted somewhere, look at mount without parameters, or like this:
mount | grep sdbb
The message on the screen in English on white says that when reading the partition table, an I / O error occurs. (sector 0 and sector 2048 are the same). Either the machine does not understand disks > 2Tb in size, or there is actually a failure. Check the beginning of the disc with Victoria.
Yes, some unhealthy mentions about dm-47... it's most likely some scraps from RAID getting in the way...
You can go in two ways:
1. wipe the first 2048 sectors and the last ones on the disk with zeros, and only after that make a partition table and mark up the section.
2. remove from mdadm systems and everything connected with it. But it's like shooting at sparrows from a howitzer...
You can erase the disk with the dd command, something like
dd if=/dev/zero of=/dev/sdbb bs=512 count =2048
To erase the end, you also need to set an offset ( it must be calculated based on the size of the disk).
dd if=/dev/zero of=/dev/sdbb bs=512 count =2048 seek=<calculated block count>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question