Re: EL6: Hard Disk upgrade howto?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



At Sat, 30 Jul 2011 11:51:04 -0400 CentOS mailing list <centos@xxxxxxxxxx> wrote:

> 
> 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.

Presumably you '*really* know what you are doing'.  I would recogmend
*against* dd or a variant for a newbie, who is likely to get him or
herself into various sorts of trouble (yes, with modern LBA devices,
geometry is not going to be a problem) -- there was a thread not too
long ago about someone who was cloning SSD devices with dd and having
various problems.  If the destination disk is larger (or worse
smaller), dd can cause 'problems' -- if larger, there will be unused
parts of the disk requiring some sort of post hacking (futzing with the
partition table, fun with resize2fs, etc.), if smaller (even by the odd
cylinder's worth of sectors or so -- after all a 500G Seagate disk
might have *exactly* the same number of sectors/blocks as a 500G WD or
Fujitzu disk), well, opps!

Also: dd can be *slow* with a large disk that is nowhere near full.  It
can be a waste of time, etc. to copy 400G of empty sectors, when all
you really needed to copy was 100G worth of used file system space.  dd
will also preserve all of the 'warts' of the file system
(fragmentation, deleted files, directories that have grown huge from
having lots of files that have since been deleted, etc.).  dump/restore,
tar, etc. don't do that.

> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
> 
>                                                                                                   

-- 
Robert Heller             -- 978-544-6933 / heller@xxxxxxxxxxxx
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments


                        
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux