AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1828526
Accepted
Erwann
Erwann
Asked: 2024-02-02 22:25:56 +0800 CST2024-02-02 22:25:56 +0800 CST 2024-02-02 22:25:56 +0800 CST

由于源和目标之间轻微的大小不匹配而导致磁盘克隆问题

  • 772

我尝试将 sdb 克隆到 sdc 上,但由于边缘大小不匹配而失败。我尝试使用 gdisk 进行恢复选项,但没有成功。现在我有什么选择可以从头开始?源磁盘有大量可用空间,我不需要克隆。

$ sudo dd if=/dev/sdb of=/dev/sdc bs=4M status=progress
1000165343232 bytes (1.0 TB, 931 GiB) copied, 100383 s, 10.0 MB/s[A
dd: error writing '/dev/sdc': No space left on device
238460+0 records in
238459+0 records out

$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: EXTERNAL_USB    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: F051C4EE-2188-44D2-8988-A6BFB515F49B

Device         Start        End   Sectors   Size Type
/dev/sdb1       2048  644534271 644532224 307.3G unknown
/dev/sdb2  896489472  994146303  97656832  46.6G unknown
/dev/sdb3  644534272  675784703  31250432  14.9G Microsoft basic data
/dev/sdb4  675784704  896489471 220704768 105.2G unknown
/dev/sdb5  994146304 1105475583 111329280  53.1G unknown

Partition table entries are not in disk order.


$ sudo gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.9.1

Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: ERROR
Main partition table: OK
Backup partition table: ERROR

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
clone
  • 1 1 个回答
  • 24 Views

1 个回答

  • Voted
  1. Best Answer
    u1686_grawity
    2024-02-02T22:35:23+08:002024-02-02T22:35:23+08:00

    fdisk -l使用或比较 /dev/sdb 和 /dev/sdc 的分区布局gdisk -l。如果它们都匹配,则忽略这些消息并让 gdisk 写出正确的备份分区表(使用命令w- 或者可能v先,然后w)。

    您可能还想使用x(专家菜单)→ e(将备份重新定位到磁盘末尾),或者 gdisk 可能会自动执行此操作,我不确定。

    备份分区表从磁盘末尾开始,这意味着无论目标磁盘比源磁盘小还是大,它都永远不会被正确克隆。(例如,即使磁盘更大并且有足够的空闲空间,分区表最终也会离末尾太远而无法找到。)

    以后,克隆此类磁盘需要两步:

    1. 仅克隆分区布局sfdisk --dump(这将在目标磁盘中正确生成分区表);
    2. 使用常规cp/ dd(或其文件系统感知变体;例如ntfsclone支持跳过 NTFS 分区中未使用的空间,同时partclone可以对 Ext4 执行相同操作)单独克隆每个分区。
    • 1

相关问题

  • 如何更改引导棒上的 UUID 并更新 GRUB?

  • git clone --single-branch 包含松散的对象,如何避免?

  • 克隆的 Windows 10 在带有光标的黑屏中挂起

  • 克隆时在 mercurial 中进行预克隆任务

  • 我可以使用任何块大小的 dd 克隆包含操作系统的硬盘驱动器吗?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve