Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
Uni9k
V2EX  ›  Linux

关于 GPT 下使用了 fdisk

  •  
  •   Uni9k · Jun 29, 2016 · 3501 views
    This topic created in 3614 days ago, the information mentioned may be changed or developed.

    之前不小心用 fdisk 把 sda 中加了一个分区

    Device Boot Start End Blocks Id System /dev/sda1 1 6528 52428799+ ee GPT /dev/sda2 6528 65270 471852475 83 Linux

    然后 df -h 的话

    Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-Vol_root 45G 4.0G 39G 10% / tmpfs 1.9G 228K 1.9G 1% /dev/shm /dev/sda2 190M 79M 101M 44% /boot /dev/sda1 200M 264K 200M 1% /boot/efi

    我在 fdisk 中删除 sda2 会不会把 df -h 中的 sda2 给删除了啊

    [root@localhost ~]# vgs VG #PV #LV #SN Attr VSize VFree VolGroup 1 2 0 wz--n- 49.61g 0 [root@localhost ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda3 VolGroup lvm2 a-- 49.61g 0

    如果是 应该怎么操作啊,把这 500G 还原出来

    6 replies    2016-06-30 14:16:29 +08:00
    fcicq
        1
    fcicq  
       Jun 29, 2016
    use testdisk or gdisk
    Tink
        2
    Tink  
    PRO
       Jun 29, 2016 via iPhone
    你为啥不用 gdisk 呢
    Uni9k
        3
    Uni9k  
    OP
       Jun 30, 2016
    @fcicq
    Disk /dev/sda: 1048576000 sectors, 500.0 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): 7C732A22-1471-4543-B522-6EFC1F318607
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 1048575966
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 943722429 sectors (450.0 GiB)

    Number Start (sector) End (sector) Size Code Name
    1 2048 411647 200.0 MiB EF00
    2 411648 821247 200.0 MiB 0700
    3 821248 104855551 49.6 GiB 8E00

    现在还有 450G 空余的空间 怎么扩大到 3 中啊
    Uni9k
        4
    Uni9k  
    OP
       Jun 30, 2016
    @Tink

    Disk /dev/sda: 1048576000 sectors, 500.0 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): 7C732A22-1471-4543-B522-6EFC1F318607
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 1048575966
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 943722429 sectors (450.0 GiB)

    Number Start (sector) End (sector) Size Code Name
    1 2048 411647 200.0 MiB EF00
    2 411648 821247 200.0 MiB 0700
    3 821248 104855551 49.6 GiB 8E00

    现在还有 450G 空余的空间 怎么扩大到 3 中啊
    fcicq
        5
    fcicq  
       Jun 30, 2016
    楼主你建的 LVM 想扩大的话再建一个 450G 的分区, 加入 VG, 最后 resize2fs 就行了. LVM 底层分区感觉上没法扩大
    fcicq
        6
    fcicq  
       Jun 30, 2016
    啊. 忘了. 用 pvresize 确实可以.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1226 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 23:55 · PVG 07:55 · LAX 16:55 · JFK 19:55
    ♥ Do have faith in what you're doing.