[CentOS] EL6: Hard Disk upgrade howto?

Lamar Owen lowen at pari.edu
Sat Jul 30 15:51:04 UTC 2011


On Saturday, July 30, 2011 11:18:34 AM Robert Heller wrote:
> dd can be problematic if the target and source disks are different
> (sizes, geometry, etc.), since dd will do a literal sector-by-sector
> copy, which is not generally advisable (and why o why to people *keep*
> suggesting it? -- it is really a misuse of dd, unless you *really* know
> what you are doing).

Geometry on an LBA device should not be an issue.  If it is an issue, that is a bug, since it is impossible to specify the actual geometry of the disk, even if the manufacturer makes that information available due to varying numbers of sectors per track across the platters.  CHS geometry is an archaic thing.

For direct clones dd and its variants work well, and get data that isn't in any filesystem or partition (boot loaders, in particular, often use the space before the first partition on the disk).  The default upstream EL6.1 install leaves a full megabyte in front of the first partition; some bootloaders and other utilities use this space.

Things like Dell's MediaDirect, for instance..... and that's but one example.  Restore partitions (not just for Windows; Dell systems with Ubuntu preinstalled have them, and extended MBR boot sectors to handle them (LBA 3 is a common place to put the 'extended' boot loader for such things)).

And that's part of the reason I'll use dd or a variant (ddrescue or dd_rescue, etc) if doing a clone to a disk of the same size or larger.  Then I can resize partitions as needed for the larger disk using any one of a number of tools for the job.



More information about the CentOS mailing list