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
    • 最新
    • 标签
主页 / user-419170

Antonio López's questions

Martin Hope
Antonio López
Asked: 2022-11-05 12:00:33 +0800 CST

Linux:1 TB HDD 显示 7 TB 分区!

  • 5

我用 2 TB 硬盘替换了一个 1 TB 硬盘(它包含一个 EXT4 分区,其中有很多硬链接到该分区内的备份文件/目录。它还有一堆常规文件/目录),现在我正在尝试将前者的数据从外部硬盘读取器复制回新磁盘。不幸的是,旧磁盘似乎不喜欢被拖回家,现在它拒绝安装唯一的分区。

gdisk /dev/sdf1显示:

GPT fdisk (gdisk) version 1.0.6

Warning: Partition table header claims that the size of partition table
entries is 0 bytes, but this program  supports only 128-byte entries.
Adjusting accordingly, but partition table may be garbage.
Warning: Partition table header claims that the size of partition table
entries is 0 bytes, but this program  supports only 128-byte entries.
Adjusting accordingly, but partition table may be garbage.

Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present

Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.

Warning! Secondary partition table overlaps the last partition by
1709333071 blocks!
You will need to delete this partition or resize it in another utility.
Disk /dev/sdf: 244190646 sectors, 931.5 GiB
Model: 003-1SB102
Sector size (logical/physical): 4096/4096 bytes
Disk identifier (GUID): 0B823749-13F7-4A4E-A8C4-F4F507A94A79
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 5
First usable sector is 6, last usable sector is 244190640
Partitions will be aligned on 256-sector boundaries
Total free space is 2042 sectors (8.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
1            2048      1953523711   7.3 TiB     8300  Linux filesystem

让我感到困惑的是报告末尾声称的奇怪的二级分区表和虚幻的7.3 TiB。磁盘在取出之前运行良好,即使是现在,通过外部方式连接,smartmontools显示其运行状况也没有问题。

更多信息:

我猜这个问题与swapspace磁盘运行时在该分区上启用服务有关。testdisk实用程序检测到几个交换分区,我猜它们是swapspace为保存交换数据而创建的交换文件。也许这些虚假的“分区”让 gdisk 误以为有 7 TB 的磁盘空间......

有什么想法/指导吗?

安东尼奥

hard-drive linux
  • 1 个回答
  • 26 Views
Martin Hope
Antonio López
Asked: 2018-11-27 02:24:27 +0800 CST

使用 mdadm 向后调整/重新排列 RAID1 的痛苦方式

  • 0

在基于 Debian 的两磁盘 RAID1 (mdadm) 服务器(不涉及 LVM)中得到以下场景:

分区(镜像 /dev/sdb 相同):

  • 未分配的空间(以前是 Windows 的 /dev/sda1)。
  • /dev/sda2 linux-raid /dev/md0 (/)
  • /dev/sda3扩展:
    • /dev/sda5 linux-raid /dev/md1(交换)
    • /dev/sda6 linux-raid /dev/md2 (/home)
    • /dev/sda7 linux-raid /dev/md3 (/usr/local/share/data)

理想情况下,为了磁盘空间,我想实现:

  • /dev/sda1 linux-raid /dev/md0 (/)。
  • /dev/sda2 linux-raid /dev/md1 (/home)
  • /dev/sda3扩展:
    • /dev/sda5 linux-raid /dev/md2(交换)
    • /dev/sda6 linux-raid /dev/md3 (/usr/local/share/data)

遵循(乍一看)更简单的方法,我也愿意尝试:

  • /dev/sda1 linux-raid /dev/md0 (/) (希望mdadm --grow /dev/md0 --size=max命令能够自动处理占用之前未使用的空间)
  • /dev/sda3扩展:
    • /dev/sda5 linux-raid /dev/md1(交换)
    • /dev/sda6 linux-raid /dev/md2 (/home)
    • /dev/sda7 linux-raid /dev/md3 (/usr/local/share/data)

我认为所有这些都必须离线完成(即通过实时发行版)。

我不确定(关于第一种方法)是我是否必须首先完全关闭 RAID1 阵列,然后逐个硬拷贝分区,然后重新创建 RAID1,或者还有另一种更简单的方法。

我想知道您对这两种/其他方法的经验/建议。

partition
  • 1 个回答
  • 335 Views

Sidebar

Stats

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

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve