Fordern Sie 100 GB auf der Festplatte zurück, die von fdisk nicht "gesehen" wurde, jedoch teilweise angezeigt wird

1092
harijay

Ich verwende Ubuntu 14.04 und verwende lvm für die Root- und Swap-Partitionen. Wenn ich parted (oder gparted) verwende, sehe ich 110 GB nicht partitioniert auf / dev / sda.

hari@Ubuntu02:~$ sudo parted /dev/sda unit GB print free Model: VMware Virtual disk (scsi) Disk /dev/sda: 3408GB Sector size (logical/physical): 512B/512B Partition Table: msdos  Number Start End Size Type File system Flags 0.00GB 0.00GB 0.00GB Free Space 1 0.00GB 0.26GB 0.25GB primary ext2 boot 0.26GB 0.26GB 0.00GB Free Space 2 0.26GB 805GB 805GB extended 5 0.26GB 805GB 805GB logical lvm 3 805GB 1636GB 831GB primary lvm 4 1636GB 3299GB 1662GB primary lvm 3299GB 3408GB 110GB Free Space 

Wenn ich jedoch fdisk zum Erstellen der Partition verwende, wird dieser freie Speicherplatz nicht angezeigt.

hari@Ubuntu02:~$ sudo fdisk -l /dev/sda  Disk /dev/sda: 3408.5 GB, 3408486045696 bytes 255 heads, 63 sectors/track, 414391 cylinders, total 6657199308 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000d989d  Device Boot Start End Blocks Id System /dev/sda1 * 2048 499711 248832 83 Linux /dev/sda2 501758 1572861951 786180097 5 Extended /dev/sda3 1572861952 3196057599 811597824 8e Linux LVM /dev/sda4 3196057600 6442450943 1623196672 8e Linux LVM /dev/sda5 501760 1572861951 786180096 8e Linux LVM 

Es scheint, dass der freie Speicherplatz bei 6442450943 beginnt und bis 6657199308 geht.

Ich habe naiv ein lvextend ausprobiert, aber es gibt mir die folgende Nachricht.

hari@Ubuntu02:~$ sudo lvextend -L+100G /dev/ubuntu-vg/root Extending logical volume root to 3.63 TiB Insufficient free space: 25600 extents needed, but only 2 available 

Angesichts der Tatsache, dass / dev / sda2 mein einziger logischer Datenträger ist und die freien Sektoren nach / dev / sda5 liegen, wie kann ich den nicht partitionierten Speicherplatz von 110 GB wiedergewinnen und ihn mithilfe von parted-, fdisk- und lv-Befehlen meiner lvm-Volume-Gruppe hinzufügen.

0
Was ist das eigentliche Problem hier? Abgesehen von "fdisk" werden auf KEINEN Laufwerken KEINE freien Speicherplätze für JEDER angezeigt. Tom Yan vor 7 Jahren 0
"Wie kann ich den nicht partitionierten Speicherplatz von 110 GB wiedergewinnen und ihn mithilfe von parted, fdisk und lv- Befehlen zu meiner Lvm-Volume-Gruppe hinzufügen?" harijay vor 7 Jahren 0
Ich bin überrascht über das negative Votum ... die Kachel und der Kommentar oben ist meine Frage harijay vor 7 Jahren 0
Sie müssen / dev / sda4 entweder mit fdisk oder parted erweitern, bevor Sie lvextend verwenden können. fpmurphy1 vor 7 Jahren 1

1 Antwort auf die Frage

0
harijay

Ich habe es geschafft, diese 100 GB durch einen vierstufigen Prozess wiederherzustellen

Mounted a new Disk (/dev/sdc) with same size as incompletely used disk (/dev/sda4) and used pvcreate and lvextend to add it as a logical volume to the LVM volume group   I used pvmove to move the data from /dev/sda4 . This took ~16 hrs but was seamless. It automagically moved it to new /dev/sdc volume and then showed that /dev/sda4 was unused. I pvremoved the /dev/sda4 from the volume group   I used fdisk to remove the existing partition and repartitioned the space using gparted.   I added this volume to the volume group( pvcrate and lvextend) and then was able to use up all size with a sudo lvresize -r -l +100%FREE /dev/ubuntu-vg/root   This added back that 100GB which was not incorporated into the partition and also the volume-group.