-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 create" fails on external HDD (USB) with 4K logical block size #1065
Comments
After downgrading to stable ppa (0.6.0.80-1ubuntu1~quantal1) it works. |
Does your code have a5c20e2? If so, can you try without it? With and without |
Yes I can confirm that this particular commit introduces the regression. It effectively makes external HDD unusable - for both create or import (they both fail with "bad block number" error). Unfortunately I can't test ashift option anymore as this disk holds the backup already, so this is only "zpool import" test. |
I think that's because your drive shows up as a true 4K drive to Linux. When I wrote a5c20e2 I thought that unaligned requests would work anyway. It seems I was wrong. @behlendorf: a5c20e2 is wrong and should be reverted. Ideally it should be modified so that it makes sure that requests are at least aligned to the device sector size as seen by the kernel. This way we can still use the optimization on "fake 512" drives. @Dremon: can you dump the contents of all files in |
/sys/block/sdh/queue/* dump: add_random 1 --- discard_granularity 0 --- discard_max_bytes 0 --- discard_zeroes_data 0 --- hw_sector_size 4096 --- iostats 1 --- logical_block_size 4096 --- max_hw_sectors_kb 120 --- max_integrity_segments 0 --- max_sectors_kb 120 --- max_segments 2048 --- max_segment_size 65536 --- minimum_io_size 4096 --- nomerges 0 --- nr_requests 128 --- optimal_io_size 0 --- physical_block_size 4096 --- read_ahead_kb 128 --- rotational 1 --- rq_affinity 1 --- scheduler [noop] deadline cfq --- |
Okay, so I think we should make sure I/O requests are at least aligned to |
Indeed, thanks guys for verifying this caused the regression. I've reverted the patch from master and referenced this issue for those interested. |
Closing issue. This should have been closes as part of 0.6.0-rc12 where the offending patch was reverted. |
This reverts commit a5c20e2 which accidentally introduced a regression for real 4k sector devices. See issue openzfs#1065 for details. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#1065
Running the following command:
sudo zpool create -f zbackup /dev/disk/by-id/usb-HitachiG_ST_31001204100000003369-0:0
Produces this error message:
filesystem 'zbackup' can not be mounted due to error 5
cannot mount 'zbackup': Invalid argument
In the kernel log:
sd 17:0:0:0: [sdh] Bad block number requested
I tried it also with "-o ashift=12" with the same result. Running zfs version 0.6.0.82-0ubuntu1~quantal1.
The text was updated successfully, but these errors were encountered: