ZPool creation doesn't work for slower drives. · Issue #2582 · zfsonlinux/zfs
ZPool creation doesn't work for slower drives. #2582
dmikalova opened this Issue
Aug 10, 2014· 8 comments
I got this error:
the kernel failed to rescan the partition table: 16
cannot label 'sdc': try using parted(8) and then provide a specific slice: -1
I believe I had this issue where ZPool creation fails if it takes longer than 1 second. I'm on an up to date Arch Linux using ZFS version 0.6.3_r0_g07dabd2_3.15.8_1-1. Brand new drives were showing really slow burst rw on the order of ~20kB/s. Maybe it's because the heads were parking for energy saving or maybe because it's an older motherboard and SATA controller.
The suggested workaround is to keep trying until I lucked out with burst writes. That worked for 2 drives, but not 3. I ended up running dd if=/dev/sdb of=/dev/null for each drive at the same time, which increased burst writes to ~20Mb/s, and then ran the zpool create command and it worked fine.
The fact that zpool create worked after you forced the drives to stay spun up with dd does suggest that it may be related to energy-saving. Have you tried checking the parameters with hdparm?
I'm seeing this for standby:
Standby timer values: spec'd by Standard, no device specific minimum
And this for power management:
Advanced power management level: 128
The other problem with the device, and I'm not exactly sure of the details and wording, is that the SATA controller is over an IDE interface so they're in master slave pairs. It's only the slaves that have slow burst r/w. When trying to create a pool with 2 I would have to ensure that at least one was on a master port, if they were both slaves then again it was too slow.
Either way zpool creation shouldn't be stopped by slow burst r/w.
FYI, I have the same problem. Disks are brand new Seagate 4TB "green" (5900 tpm), connected in native (not over IDE) SATA, the APM level is 128. ZFS is version 0.6.3 on Gentoo 64 bit.
Using the dd trick on both disks, I managed to create a zpool once (after several tries), played with it, destroyed it, and have been unable to create a new one, even with dd.
This seems to be a pretty serious bug, happening to more than a few people; the bug is referenced in the Archlinux wiki.
This was actually fixed by commit d09a99f which will be in the next tag. It allows the utilities to wait a bit longer before giving up. It's a trivial patch you could cherry pick on top of 0.6.3, it would be helpful to get additional verification it resolves your problem.
Since the fix for this was merged I'm closing this issue.
I'm sorry, I did not see the ticket was closed. I will update the ticket if the patch does not fix the problem.
Thank you !
Actually this ticket ended up getting a little lost, I just closed it. If the patch doesn't solve the issue please let us know and we'll reopen it.
I can confirm that this bugfix fixed two issues for me:
- I was occasionally unable to create a pool on WD "red" 4TB disks
- I was occasionally unable to import a pool when using flag -d /dev/disk/by-id
Both problems gone after I've patched my copy of 0.6.3-1.2 with commit d09a99f
Still can't create zpool with this script:
echo probe partprobe echo remove part parted /dev/sdb rm 1 parted /dev/sdb rm 1 echo dd clean dd if=/dev/zero of=/dev/sdb bs=512 count=1 echo labelclear zpool labelclear /dev/sdb echo probe partprobe lsblk echo zpool create zpool create -f -o ashift=9 -m /pool/pool4 pool4 /dev/sdb echo probe partprobe lsblk
I've tried hundreds of times. And every time I try it just end up with
the kernel failed to rescan the partition table: 2
cannot label 'sdb': try using parted(8) and then provide a specific slice: -1
Running dd if=/dev/sdX of=/dev/null on background still doesn't work.
My hard drive is
Model: ATA WDC WD4000FYYZ-0 (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/512B