Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZPool creation doesn't work for slower drives. #2582

Closed
dmikalova opened this issue Aug 10, 2014 · 8 comments
Closed

ZPool creation doesn't work for slower drives. #2582

dmikalova opened this issue Aug 10, 2014 · 8 comments
Milestone

Comments

@dmikalova
Copy link

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.

@salazaj
Copy link
Contributor

salazaj commented Aug 12, 2014

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?

@dmikalova
Copy link
Author

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.

@behlendorf behlendorf added this to the 0.8.0 milestone Aug 14, 2014
@behlendorf behlendorf added the Bug label Aug 14, 2014
@galdor
Copy link

galdor commented Oct 3, 2014

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.

@behlendorf
Copy link
Contributor

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.

@galdor
Copy link

galdor commented Oct 3, 2014

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 !

@behlendorf
Copy link
Contributor

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.

@Bronek
Copy link

Bronek commented Jan 2, 2015

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

@cdluminate
Copy link
Contributor

cdluminate commented Sep 23, 2016

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants