On Fri, Jul 4, 2014 at 8:43 PM, David C. Rankin <drankinatty@suddenlinkmail.com> wrote:
On 07/04/2014 07:30 PM, David C. Rankin wrote:
So the disk internal sector size will prevent cloning of any old drive for use on a new drive?? Damn, I've got more reading to do. Surely some of the tools take this into account. Bummer -- I really, really didn't want to spend 3 days tweaking a new install.
What about using ibs=512 obs=4096? Will that cause the desired 512 read and 4096 write, or will there be alignment issues attempting to copy from 512 and write 4096? And as Berny suggested could iflags or oflags set to fullblock help?
I just ran across this post again. No, using ibs / obs with dd will not help the long term efficiency of the partitions / filesystems at all. The issue is purely alignment between the physical sectors and the filesystems blocks. File systems are written to optimize performance based on the assumption that a block write is a single atomic operation by the drive. If the alignment is off, the drive has to implement a read / modify / write cycle instead. Since that cycle involves a rotation of the platter, it is extremely inefficient. fyi: Raid 5 and 6 have the same issue, but the most efficient write size is the size of a full raid stripe. XFS as an example will try to structure it's writes to be full stripes when working with Raid. Thus a full stripe write becomes: write all data and parity chunks. A partial stripe write becomes: - read data about to be overwritten, - read old parity info. - Calculate new parity info. - - Write new data, - write new parity info Thus a single partial stripe write to a raid 5 requires at least 4 i/o operations. For a raid 6, it is a minimum of 5 i/o's. Having the filesystem invoke properly aligned full stripe writes is significantly more efficient. Greg Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org