fdisk is unable to partition my 4.4TB block device. It typically will only allow me to parition the first 223 cylinders (although the exact number seems to vary). I'm unsure if this is a problem with just fdisk or if it's a kernel issue. The kernel I'm running is built with large block device support. -- zcat /proc/config.gz | grep CONFIG_LBD CONFIG_LBD=y -- The output from fdisk -- # fdisk /dev/sdb The number of cylinders for this disk is set to 534921. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/sdb: 4399.8 GB, 4399876276224 bytes 255 heads, 63 sectors/track, 534921 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-223, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-223, default 223): 534921 Value out of range. Last cylinder or +size or +sizeM or +sizeK (1-223, default 223): Using default value 223 -- When attempting to write a parition table to disk, I get this message in my dmesg. -- sdb : very big device. try to use READ CAPACITY(16). SCSI device sdb: 8593508352 512-byte hdwr sectors (4399876 MB) SCSI device sdb: drive cache: write back, no read (daft) /dev/scsi/host4/bus0/target0/lun0: p1 -- Where the device is detected in my dmesg -- 3ware 9000 Storage Controller device driver for Linux v2.26.02.001. ACPI: PCI interrupt 0000:02:03.0[A] -> GSI 27 (level, low) -> IRQ 27 scsi4 : 3ware 9000 Storage Controller 3w-9xxx: scsi4: Found a 3ware 9000 Storage Controller at 0xfc8ffc00, IRQ: 27. 3w-9xxx: scsi4: Firmware FE9X 2.02.00.008, BIOS BE9X 2.02.01.037, Ports: 12. Vendor: 3ware Model: Logical Disk 00 Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 00 sdb : very big device. try to use READ CAPACITY(16). SCSI device sdb: 8593508352 512-byte hdwr sectors (4399876 MB) SCSI device sdb: drive cache: write back, no read (daft) /dev/scsi/host4/bus0/target0/lun0: p1 Attached scsi disk sdb at scsi4, channel 0, id 0, lun 0 Attached scsi generic sg1 at scsi4, channel 0, id 0, lun 0, type 0 -- Portage 2.0.51-r3 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r14 x86_64) ================================================================= System uname: 2.6.9-gentoo-r14 x86_64 AMD Opteron(tm) Processor 250 Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux26-headers-2.6.8.1-r2 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-O2 -march=k8 -pipe" CHOST="x86_64-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=k8 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig distlocks sandbox" GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X acpi alsa berkdb bitmap-fonts crypt cups emul-linux emul-linux-x86 f77 font-server fortran gif gnome2 gpm gtk2 ipv6 jp2 jpeg lzw lzw-tiff multilib mysql ncurses nls ntpl ntplonly opengl oss pam perl pic png python readline ssl sysvipc tcpd tiff truetype truetype-fonts type1-fonts usb userlocales xml2 xpm xrandr xv zlib" Reproducible: Always Steps to Reproduce: 1. 2. 3.
As as side note, I also tried partition this device with parted. At first this seemed to have actually work. mkfs.xfs ran (but way to fast) and all apears to be well... # df -H Filesystem Size Used Avail Use% Mounted on /dev/sda3 17G 3.1G 13G 20% / none 2.1G 0 2.1G 0% /dev/shm /dev/sdb1 4.4T 541k 4.4T 1% /backup but if I format the volume with mke2fs (which completes way, way too fast), the truth comes out... # df -H Filesystem Size Used Avail Use% Mounted on /dev/sda3 17G 3.1G 13G 20% / none 2.1G 0 2.1G 0% /dev/shm /dev/sdb1 1.9G 420M 1.4G 24% /backup I'm not sure that the partition size is correct either. This is a RAID5 volume with 12 x 372.61GB disks. By my math, after overhead, the volume should be a max of 4098.71GB.
to be honest, you're probably going to have to track this down yourself ... i know *i* dont have any 4TB disks to go testing with ;)
A fix such a problem went into the upstream util-linux 2.13-pre1. Can you test whether it fixes the problem for you? You can download this version from: ftp://ftp.kernel.org/pub/linux/utils/util-linux/testing/ Then do: - tar xzf util-linux-2.13-pre1.tar.gz - cd util-linux-2.13-pre1 - ./configure - make - ./fdisk/fdisk
I will test it as soon as I can. I don't have any volumes that large that aren't cut up into luns right now. Give me 2-3 weeks...
OK, I've gotten my hands on some hardware. It seems that this issue occurs with any volumne > 2TB. In this case with a 2.5TB volume. It also appears that this issue has not been fixed in the 2.13-preX series. with fdisk from util-linux-2.13-pre2: # ./fdisk/fdisk /dev/sdb The number of cylinders for this disk is set to 303927. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/sdb: 2499.8 GB, 2499889070080 bytes 255 heads, 63 sectors/track, 303927 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-36578, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-36578, default 36578): 303927 Value out of range. Last cylinder or +size or +sizeM or +sizeK (1-36578, default 36578): 303900 Value out of range. Last cylinder or +size or +sizeM or +sizeK (1-36578, default 36578): Using default value 36578 Command (m for help):
Is it time to send this upstream?
I am upstream... Unfortunately, I haven't yet found the time for looking deeper into this issue.
I'm still expirencing this issue with 2.12r. Is there any hope of getting this fixed upstream?
try the 2.13_pre in portage
That changed fdisk -l /dev/foo on a partition table setup by parted from Disk /dev/sdc: 0 MB, 0 bytes 255 heads, 63 sectors/track, 0 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 1 711 5708287+ 83 Linux Partition 1 has different physical/logical endings: phys=(1023, 254, 63) logical=(710, 165, 31) to: Disk /dev/sdc: 8801.9 GB, 8801938309120 bytes 255 heads, 63 sectors/track, 1070108 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 1 711 5708287+ 83 Linux I'll have to play with it a bit more before I trust it but this certainly looks promising!
It looks like 2.13_pre can correctly identify the number of blocks the device has but not setup a correct partition table. Command (m for help): p Disk /dev/sdc: 8801.9 GB, 8801938309120 bytes 255 heads, 63 sectors/track, 1070108 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 1 711 5707886+ 83 Linux Partition 1 does not end on cylinder boundary. Command (m for help): d Selected partition 1 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-711, default 1): 1070108 Value out of range.
I have same problem. I unable to build large partition on my 3.5TB array (sda). I also try to use fdisk but it create only one 1.2TB partition. Then I try use cfdisk. It were more successfull. But after rebooting created partition reduced to 1.2TB. But I can build up to 2TB partition without any problems. I don't want try parted because my disk always contain data. I think that is not only fdisk problem. May be it is also partition table problem.
So this is definately a partition table issue. This operation works correctly with GPT partition tables as created by parted. So the real problem is the msdos parition tables doesn't support single devices > 2TB, that this is well known or well documented, that fdisk happy attempts to to work on devices this big when it can't, and that it would be nice if fdisk support GPT paritions.
should be addressed with util-linux-2.13