Page 1 of 7 123 ... LastLast
Results 1 to 10 of 66

Thread: Clone 750G drive to 750G drive with different sector size

  1. #1

    Default Clone 750G drive to 750G drive with different sector size

    The source HDD is a 750G drive with 512B logical and physical sectors. The target HDD is also 750G but has 512B logical sectors but 4096B physical sectors. I want to do a full cloning and tried it with GNU ddrescue. The session ran and didn't indicate any errors, but the target drive isn't bootable. The assumption is the difference in the size of the physical sectors ruined the clone attempt.

    The cloning is to move everything off an old, failing HDD to a fresh, ready for infant mortality drive.
    Sometimes I sits and thinks, sometimes I just sits...

  2. #2

    Default Re: Clone 750G drive to 750G drive with different sector size

    Quote Originally Posted by RBEmerson View Post
    The session ran and didn't indicate any errors, but the target drive isn't bootable.
    The reason for that may be a different one than that the data wasn't copied 1:1.

    Booting from drives with a physical sector size of 4096 Bytes may not be possible on any PC (especially if it's an older one).

    Further you should tell a bit more about the way you tried to boot from the new drive (i.e. the one with the physical sector size of 4096 Bytes).

    Did you, for example, unplug the old drive and replace it whith the new drive during boot ?

    How did you mount partitions from your old drive ?

  3. #3

    Default Re: Clone 750G drive to 750G drive with different sector size

    Quote Originally Posted by ratzi View Post
    How did you mount partitions from your old drive ?
    I meant:

    Using e.g. the partitioner of YaST you can set fstab options for how to mount a partition/drive,
    e.g. by

    - Device Name
    - Device ID
    - Volume Label
    - Device Path
    - UUID

    If the respective entry isn't the same for your new drive,
    then this would explain your problem.

  4. #4

    Default Re: Clone 750G drive to 750G drive with different sector size

    The more I read about 4Kn or Advanced Format drives, the more I wonder if the Hitachi's logical/physical 512B/512B layout vs the WD's 512B/4096B layout is, in fact, a problem. That is, it appears the WD's firmware makes it appear, to the world beyond the drive, that this is still a 512B-sized device. As far as I can see, the real problem is getting a partition started at the correct place (a cylinder number evenly divisible by 8 - e.g., cylinder 64) - performance suffers as a result of poor placement.

    Or maybe it really does matter after all?
    Sometimes I sits and thinks, sometimes I just sits...

  5. #5

    Default Re: Clone 750G drive to 750G drive with different sector size

    Quote Originally Posted by RBEmerson View Post
    The more I read about 4Kn or Advanced Format drives, the more I wonder if the Hitachi's logical/physical 512B/512B layout vs the WD's 512B/4096B layout is, in fact, a problem. That is, it appears the WD's firmware makes it appear, to the world beyond the drive, that this is still a 512B-sized device. As far as I can see, the real problem is getting a partition started at the correct place (a cylinder number evenly divisible by 8 - e.g., cylinder 64) - performance suffers as a result of poor placement.

    Or maybe it really does matter after all?
    Yes, 4k may be a problem.

    On the other hand, am I writing chinese ?

    Please post the contents of your /etc/fstab of your old failing hard disk !
    Or perhaps the contents of the copy of that from your new clone of that.

    The contents of my /etc/fstab are

    Code:
    /dev/disk/by-id/ata-Hitachi_HDS723020BLA642_MN3220F33TJJDE-part6 /                    ext3       acl,user_xattr        1 1
    /dev/disk/by-id/ata-Hitachi_HDS723020BLA642_MN3220F33TJJDE-part5 swap                 swap       defaults              0 0
    /dev/disk/by-id/ata-Hitachi_HDS723020BLA642_MN3220F33TJJDE-part8 /home                ext3       acl,user_xattr        1 2
    /dev/disk/by-id/ata-Hitachi_HDS723020BLA642_MN3220F33TJJDE-part9 /home121             ext3       user,noauto,acl,user_xattr 0 0
    /dev/disk/by-id/ata-Hitachi_HDS723020BLA642_MN3220F33TJJDE-part7 /sys121              ext3       noauto,acl,user_xattr 0 0
    proc                 /proc                proc       defaults              0 0
    sysfs                /sys                 sysfs      noauto                0 0
    debugfs              /sys/kernel/debug    debugfs    noauto                0 0
    usbfs                /proc/bus/usb        usbfs      noauto                0 0
    devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
    /dev/disk/by-id/ata-Hitachi_HDS723020BLA642_MN3220F33TJJDE-part3 /windows/C           ntfs-3g    ro,noauto,users,gid=users,fmask=133,dmask=022,locale=de_DE.UTF-8 0 0
    /dev/disk/by-id/ata-Hitachi_HDS723020BLA642_MN3220F33TJJDE-part4 /windows/D           ntfs-3g    locale=de_DE.UTF-8                                          0 0
    /dev/disk/by-id/ata-Hitachi_HDS723020BLA642_MN3220F33TJJDE-part1 /windows/reserviert  ntfs-3g    ro,noauto,users,gid=users,fmask=133,dmask=022,locale=de_DE.UTF-8 0 0

  6. #6

    Default Re: Clone 750G drive to 750G drive with different sector size

    It's a little chewed up, but here's /etc/fstab
    Code:
    /dev/system/swap    swap    swap    defaults 0 0 
    /dev/system/root    /    ext4    acl,user_xattr 1 1 
    /dev/disk/by-id/ata-Hitachi_HDS721075CLA332_JP2740HP04Y2NH-part1    /boot    ext4    acl,user_xattr 1 2 
    /dev/system/home    /home    ext4    acl,user_xattr 1 2 
    proc    /proc    proc    defaults 0 0 
    sysfs    /sys    sysfs    noauto 0 0 
    debugfs    /sys/kernel/debug    debugfs    noauto 0 0 
    usbfs    /proc/bus/usb    usbfs    noauto 0 0 
    devpts    /dev/pts    devpts    mode=0620,gid=5 0 0 
    /dev/disk/by-id/ata-WDC_WD7500BPKX-22HPJT0_WD-WX41A93N7736-part1 /tmp                 ext4       acl,user_xattr        1 2
    The real stunner in all of this is the last line. Why, why, why does a non-existant device show up as providing a home for /tmp???
    What does it take to put the real location for /tmp (on the Hitachi drive) in the fstab? Unless I miss my guess (and my batting average on guesses is abysmal), this is what keeps the original system on the Hitach drive from booting up completely.
    Sometimes I sits and thinks, sometimes I just sits...

  7. #7

    Default Re: Clone 750G drive to 750G drive with different sector size

    Quote Originally Posted by ratzi View Post
    I meant:

    Using e.g. the partitioner of YaST you can set fstab options for how to mount a partition/drive,
    e.g. by

    - Device Name
    - Device ID
    - Volume Label
    - Device Path
    - UUID

    If the respective entry isn't the same for your new drive,
    then this would explain your problem.
    The Hitachi drive contents are relatively old. That is, they were generated when 12.1 was fresh. The layout was done by the installer. I don't recall any particular input into the partitioning process. I just sat back and watched the process happen.

    The new (target or WD) drive was basically taken back to zero. That is, all partitions were deleted. Anything that's on the new drive came from ddrescue's cloning of the old (source or Hitachi) drive.
    Sometimes I sits and thinks, sometimes I just sits...

  8. #8
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,288

    Default Re: Clone 750G drive to 750G drive with different sector size

    Just to be on the same page the boot start it just never complete right??

    Are you sure you are looking at the drive file and not the cd/dvd file?

    You need to mount the root partition from the drive then look at the /et/fstab on that partition

    You will need to edit that file any way to point to the new device

    Also I think you need to do a chroot and remake grub and perhaps do an initd

    The device names have changed and you have to adjust for that.

    If you can see and mount the partitions then the clone probably worked

  9. #9

    Default Re: Clone 750G drive to 750G drive with different sector size

    Quote Originally Posted by gogalthorp View Post
    Just to be on the same page the boot start it just never complete right??
    Right - it gets through the process for a couple of minutes and then stops, leaving the machine in emergency mode.

    Are you sure you are looking at the drive file and not the cd/dvd file?
    The only physical HDD of any sort present is the old, source Hitachi HDD. No sticks, no CD's, no DVD's, no net boots, just the one HDD.

    You need to mount the root partition from the drive then look at the /et/fstab on that partition
    Yep. Got there. See post #6 above.

    You will need to edit that file any way to point to the new device
    If the startup log is to be believed, I need to take the new device (seen in the last line of the fstab from the old device) out of the fstab.

    Also I think you need to do a chroot and remake grub and perhaps do an initd
    Perhaps on the new, target drive.

    WAIT! NEWS FLASH!

    Thanks to the above questions, I ran dmesg, with the idea of capturing all the info from the startup. My next thought was to pipe the output to a temporary file, trim it down with emacs, and write it to a stick, and post that stuff here. Hmmm... temporary file... hmmm... speaking of temporary files, I wonder what happens when I do "dir /tmp"?

    In fact, /dev/sda's (the old Hitachi HDD) /tmp exists and the directory is easily listed. Which says /dev/sda has a functional tmp directory tree.

    The problem is a very simple one: /dev/sda's /etc/fstab is broken. It wants to mount the /tmp tree from a drive that doesn't exist! Going through /etc/fstab again:
    Code:
    /dev/system/swap    swap    swap    defaults 0 0 
    /dev/system/root    /    ext4    acl,user_xattr 1 1 
    /dev/disk/by-id/ata-Hitachi_HDS721075CLA332_JP2740HP04Y2NH-part1    /boot    ext4    acl,user_xattr 1 2 
    /dev/system/home    /home    ext4    acl,user_xattr 1 2 
    proc    /proc    proc    defaults 0 0 
    sysfs    /sys    sysfs    noauto 0 0 
    debugfs    /sys/kernel/debug    debugfs    noauto 0 0 
    usbfs    /proc/bus/usb    usbfs    noauto 0 0 
    devpts    /dev/pts    devpts    mode=0620,gid=5 0 0 
    /dev/disk/by-id/ata-WDC_WD7500BPKX-22HPJT0_WD-WX41A93N7736-part1 /tmp                 ext4       acl,user_xattr        1 2
    This line:/dev/disk/by-id/ata-WDC_WD7500BPKX-22HPJT0_WD-WX41A93N7736-part1 /tmp ext4 acl,user_xattr 1 2 should be changed to mount the /tmp on the Hitachi HDD. Remember that, at the moment, the WD HDD does not exist. It is physically disconnected from the desktop box.

    The device names have changed and you have to adjust for that.

    If you can see and mount the partitions then the clone probably worked
    I see that vaguely. First off, I need to address the issue listed above. The best place to follow that up is the Need to fix broken LVM2 volume thread.

    Once that's done, I'll address the business of cloning the two "same but different" drives with their same size and different physical sector sizes.
    Sometimes I sits and thinks, sometimes I just sits...

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Clone 750G drive to 750G drive with different sector size

    On 2014-01-23 04:46, RBEmerson wrote:
    >
    > gogalthorp;2618639 Wrote:


    >> You will need to edit that file any way to point to the new device

    > If the startup log is to be believed, I need to take the new device
    > (seen in the last line of the _fstab_from_the_-old-_device_) out of the
    > fstab.


    Correct.

    I can not imagine how that line got there.

    >
    >> Also I think you need to do a chroot and remake grub and perhaps do an
    >> initd

    > Perhaps on the new, target drive.


    Yes.


    > WAIT! NEWS FLASH!


    > The problem is a very simple one: /dev/sda's /etc/fstab is broken. It
    > wants to mount the /tmp tree from a drive that doesn't exist! Going
    > through /etc/fstab again:


    Right.


    > This
    > line:-/dev/disk/by-id/ata-WDC_WD7500BPKX-22HPJT0_WD-WX41A93N7736-part1
    > /tmp ext4 acl,user_xattr 1 2- should be
    > changed to mount the /tmp on the Hitachi HDD. Remember that, at the
    > moment, _the_WD_HDD_does_not_exist_. It is physically disconnected from
    > the desktop box.


    Right.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

Page 1 of 7 123 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •