Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I can't find a way to create a filesystem on one of my disks.

first i'm geting the following output:

[root@~]# mkfs.xfs /dev/sdb1
mkfs.xfs: /dev/sdb1 appears to contain a partition table (dos).
mkfs.xfs: Use the -f option to force overwrite.

after using -F flag:

[root@~]# mkfs.xfs -f /dev/sdb1
meta-data=/dev/sdb1              isize=256    agcount=32, agsize=22892696 blks
         =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=732566272, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal log           bsize=4096   blocks=357698, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
**mkfs.xfs: libxfs_device_zero write failed: Input/output error**


Disk /dev/sdb: 3001GB
 1      1049kB  3001GB  3001GB               primary


Centos 6.3 Linux 1 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

what i've tried so far: recreating partition with parted rm 1

share|improve this question
Disk /dev/sdb: 3001GB 1 1049kB 3001GB 3001GB primary –  Crazy_Bash Oct 24 '12 at 20:26
Version of Linux and distribution? –  ewwhite Oct 24 '12 at 20:33
Centos 6.3 Linux 1 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux –  Crazy_Bash Oct 24 '12 at 20:36

2 Answers 2

mkfs.xfs: libxfs_device_zero write failed: Input/output error

The message is very clear: it's a hardware problem. If it's a simple SATA or SAS drive, check connections, look dmesg for driver error messages. You could also give badblocks a try; my guess is that the disk is failing and needs to be replaced, plain and simple.

share|improve this answer

Assuming this is a disk and you're interested in dedicating it entirely to an XFS filesystem...

I prefer fdisk, but my process look like this:

fdisk /dev/sdb
delete partitions with "d"
create new partition with "n"
write the partition table with "w"

Exit fdisk.

From here, you can create your XFS filesystem.

mkfs.xfs -f /dev/sdb1

Grab the UUID with blkid.

Add a mount in /etc/fstab.

UUID=c048a73f-2535-4edc-a1d2-ecc69d1558d4 /data  xfs     defaults 1 2
share|improve this answer
fdisk doesn't support 3TB! –  Crazy_Bash Oct 24 '12 at 21:07
Oh, then use parted. The point is, you need to create your partitions, write the partition table, and then create your filesystems. –  ewwhite Oct 24 '12 at 21:08
I know this. it's not the first time i'm creating fs –  Crazy_Bash Oct 24 '12 at 21:14
Try this with a partition size smaller than 2TB... It may be an issue with the xfs_progs. –  ewwhite Oct 24 '12 at 21:16
i'm afraid maybe it's a hard drive failure –  Crazy_Bash Oct 24 '12 at 21:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.