goodfred
(Themenstarter)
Anmeldungsdatum: 18. Juni 2021
Beiträge: Zähle...
|
Hat leider nicht auf Anhieb geklappt. 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 | root@vs00034:~# fdisk /dev/sda
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sda: 602 GiB, 646392578048 bytes, 1262485504 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
Disklabel type: dos
Disk identifier: 0xbdef77f4
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 629143551 628142082 299,5G 5 Extended
/dev/sda5 1001472 629143551 628142080 299,5G 8e Linux LVM
Command (m for help): d
Partition number (1,2,5, default 5): 5
Partition 5 has been deleted.
Command (m for help): n
Partition type
p primary (1 primary, 1 extended, 2 free)
l logical (numbered from 5)
Select (default p): l
Adding logical partition 5
First sector (1003518-629143551, default 1003520):
Last sector, +sectors or +size{K,M,G,T,P} (1003520-629143551, default 629143551):
Created a new partition 5 of type 'Linux' and of size 299,5 GiB.
|
Der Startsektor von SDA5 ist nicht der gleiche wie vorher wenn ich das machen würde.
Außerdem konnte ich SDA5 nicht den freien Speicher zuweisen. Folgenden Workaround habe ich ermittelt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62 | root@vs00034:~# fdisk /dev/sda
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sda: 602 GiB, 646392578048 bytes, 1262485504 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
Disklabel type: dos
Disk identifier: 0xbdef77f4
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 629143551 628142082 299,5G 5 Extended
/dev/sda5 1001472 629143551 628142080 299,5G 8e Linux LVM
Command (m for help): d
Partition number (1,2,5, default 5): 2
Partition 2 has been deleted.
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): e
Partition number (2-4, default 2):
First sector (999424-1262485503, default 999424):
Last sector, +sectors or +size{K,M,G,T,P} (999424-1262485503, default 1262485503):
Created a new partition 2 of type 'Extended' and of size 601,5 GiB.
Command (m for help): n
All space for primary partitions is in use.
Adding logical partition 5
First sector (1001472-1262485503, default 1001472):
Last sector, +sectors or +size{K,M,G,T,P} (1001472-1262485503, default 1262485503):
Created a new partition 5 of type 'Linux' and of size 601,5 GiB.
Command (m for help): t
Partition number (1,2,5, default 5): 5
Partition type (type L to list all types): 8e
Changed type of partition 'Linux' to 'Linux LVM'.
Command (m for help): p
Disk /dev/sda: 602 GiB, 646392578048 bytes, 1262485504 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
Disklabel type: dos
Disk identifier: 0xbdef77f4
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 999424 1262485503 1261486080 601,5G 5 Extended
/dev/sda5 1001472 1262485503 1261484032 601,5G 8e Linux LVM
|
Nun könnte alles passen bis auf den Startsektor von SDA2. Ich versuche mal den manuell zu ändern und hoffe der Startsektor von SDA5 passt nachher auch. Kurze Zwischenfrage: Ist es schlimm wenn der Startsektor von SDA2 früher beginnt als vorher? Ich meinte vorher hat SDA2 "nur" 2 Blöcke gehabt die nicht von SDA5 benutzt wurden. (1001470 bis 1001472) 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 | Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): e
Partition number (2-4, default 2):
First sector (999424-1262485503, default 999424): 1001470
Last sector, +sectors or +size{K,M,G,T,P} (1001470-1262485503, default 1262485503):
Created a new partition 2 of type 'Extended' and of size 601,5 GiB.
Command (m for help): n
All space for primary partitions is in use.
Adding logical partition 5
First sector (1003518-1262485503, default 1003520):
|
Wenn ich den Startsektor von SDA2 auf den vorherigen ändere beginnt SDA5 später und nicht da wo er sollte. (1001472 vs 1003518) Erneut meine Frage: Kann ich SDA2 mit einem früheren Startsektor erstellen ohne mein System zu zerschießen? Weil wenn ja hätte SDA5 den korrekten Startsektor. Freue mich über Rat/Tipps/Hilfe! ☺ Ich bedanke mich schon mal recht herzlich für Antworten und verbleibe
mit freundlichen Grüßen
goodfred P.S.: mit cfdisk komme ich auf das gleiche Ergebnis. cfdisk scheint wohl genauso gut zu funktionieren! ☺ Hier ein Auszug aus cfdisk (habe natürlich kein Write gemacht, aber die Daten sind identick mit fdisk)
| Disk: /dev/sda
Size: 602 GiB, 646392578048 bytes, 1262485504 sectors
Label: dos, identifier: 0xbdef77f4
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 999424 1262485503 1261486080 601,5G 5 Extended
>> └─/dev/sda5 1001472 1262485503 1261484032 601,5G 8e Linux LVM
|
P.P.S.: Wenn ich mit dem ESXi ein Snapshot der VM mache könnte ich doch einfach mal ausprobieren ob das mit dem Startsektor von SDA2 passt und falls nicht den Snapshot wiederherstellen? Das wäre dann nur ein Verlust von Daten aus sagen wir mal 5 Minuten?
|
MartinW
Anmeldungsdatum: 23. Februar 2013
Beiträge: 114
|
Das sieht doch ganz gut aus. Die genauen Details mit diesen extended Partitionen kenne ich leider nicht (Ich benutze sowas nicht.). Aber es sollte eigentlich egal sein wenn /dev/sda2 früher beginnt, der Sektor von /dev/sda5 ist ja der um den es geht. Versuch es doch einfach mal. Genau dafür ist ja der Snapshot.
|
goodfred
(Themenstarter)
Anmeldungsdatum: 18. Juni 2021
Beiträge: 31
|
MartinW schrieb: Das sieht doch ganz gut aus. Die genauen Details mit diesen extended Partitionen kenne ich leider nicht (Ich benutze sowas nicht.). Aber es sollte eigentlich egal sein wenn /dev/sda2 früher beginnt, der Sektor von /dev/sda5 ist ja der um den es geht. Versuch es doch einfach mal. Genau dafür ist ja der Snapshot.
Das wollte ich hören! Danke! 😀 In paar Minuten ist das inkrementelle Backup fertig. Werde dann ein neues Snapshot machen und wünsche mir selber viel Glück das alles hinhaut.! 😀
|
goodfred
(Themenstarter)
Anmeldungsdatum: 18. Juni 2021
Beiträge: 31
|
Habe das Betriebssystem kurz neu-gestartet. Dann folgende Befehle. | root@vs00034:~# pvresize /dev/sda5
Physical volume "/dev/sda5" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
|
| root@vs00034:~# lvextend -l+100%FREE /dev/vs00034-vg/root
Size of logical volume vs00034-vg/root changed from 291,52 GiB (74630 extents) to 593,52 GiB (151942 extents).
Logical volume root successfully resized.
|
| root@vs00034:~# resize2fs /dev/mapper/vs00034--vg-root
resize2fs 1.42.13 (17-May-2015)
Dateisystem bei /dev/mapper/vs00034--vg-root ist auf / eingehängt; Online-Größenänderung ist
erforderlich
old_desc_blocks = 19, new_desc_blocks = 38
Das Dateisystem auf /dev/mapper/vs00034--vg-root is nun 155588608 (4k) Blöcke lang.
|
| root@vs00034:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3,9G 0 3,9G 0% /dev
tmpfs 799M 8,9M 790M 2% /run
/dev/mapper/vs00034--vg-root 585G 218G 340G 40% /
tmpfs 3,9G 0 3,9G 0% /dev/shm
tmpfs 5,0M 0 5,0M 0% /run/lock
tmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup
/dev/sda1 472M 105M 343M 24% /boot
tmpfs 799M 0 799M 0% /run/user/1000
|
Danke an alle und vor allem an MartinW. Werde dich vermissen! 😀 mfG goodfred ☺
|
goodfred
(Themenstarter)
Anmeldungsdatum: 18. Juni 2021
Beiträge: 31
|
Hallo! Da bin ich wieder! 😀 Ich bin dabei wieder Speicher zu erweitern, dieses mal ist das Setup aber ein bisschen anders. Damals hat er eine "Linux LVM" (ID 8e) Partition und eine "Extended" (ID 5) angezeigt. Dieses mal zeigt er zwei mal "Linux Filesystem" an. Im großen und ganzen anscheinend auch mit LVM.
Ich habe gerade im ESXi den Speicher um 100GB auf 300GB erhöht. Danach habe ich die Maschine neu-gestartet. Nun bekomme ich folgende Meldung: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 | root@loving-thompson:~# fdisk /dev/sda
Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
GPT PMBR size mismatch (419430399 != 629145599) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
Command (m for help): p
Disk /dev/sda: 300 GiB, 322122547200 bytes, 629145600 sectors
Disk model: Virtual disk
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: BB5F6EF9-CF06-4C40-A1C3-6E46DE33D0CA
Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 2101247 2097152 1G Linux filesystem
/dev/sda3 2101248 419428351 417327104 199G Linux filesystem
|
Danach habe ich ausprobiert was für Optionen kommen wenn ich die Partition /dev/sda3 löschen und neu anlegen will. Hier ist die Ausgabe: 1
2
3
4
5
6
7
8
9
10
11
12
13
14 | Command (m for help): d
Partition number (1-3, default 3): 3
Partition 3 has been deleted.
Command (m for help): n
Partition number (3-128, default 3):
First sector (2101248-629145566, default 2101248):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2101248-629145566, default 629145566):
Created a new partition 3 of type 'Linux filesystem' and of size 299 GiB.
Partition #3 contains a LVM2_member signature.
Do you want to remove the signature? [Y]es/[N]o:
|
Ich habe verneint, die Signatur soll nicht entfernt werden. Danach 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 | root@loving-thompson:~# pvresize /dev/sda3
Physical volume "/dev/sda3" changed
1 physical volume(s) resized or updated / 0 physical volume(s) not resized
root@loving-thompson:~# lvextend -l+100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
Size of logical volume ubuntu-vg/ubuntu-lv changed from <199.00 GiB (50943 extents) to <299.00 GiB (76543 extents).
Logical volume ubuntu-vg/ubuntu-lv successfully resized.
root@loving-thompson:~#
root@loving-thompson:~# resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs 1.45.5 (07-Jan-2020)
Filesystem at /dev/mapper/ubuntu--vg-ubuntu--lv is mounted on /; on-line resizing required
old_desc_blocks = 25, new_desc_blocks = 38
The filesystem on /dev/mapper/ubuntu--vg-ubuntu--lv is now 78380032 (4k) blocks long.
root@loving-thompson:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 797M 2.3M 794M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 294G 180G 100G 65% /
tmpfs 3.9G 4.0K 3.9G 1% /dev/shm
tmpfs 5.0M 16K 5.0M 1% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda2 976M 299M 610M 33% /boot
/dev/loop1 71M 71M 0 100% /snap/lxd/21029
/dev/loop2 56M 56M 0 100% /snap/core18/2066
/dev/loop0 56M 56M 0 100% /snap/core18/2074
/dev/loop3 33M 33M 0 100% /snap/snapd/12398
/dev/loop4 33M 33M 0 100% /snap/snapd/12159
/dev/loop5 68M 68M 0 100% /snap/lxd/20326
tmpfs 797M 0 797M 0% /run/user/1000
|
Ich konnte anscheinend mir selber helfen! Danke fürs lesen!
Somit ist die Sache erledigt und ich wünsche euch noch eine schöne Woche! Einen lieben Gruß lasse ich noch da! (ohne eure Hilfe das letzte mal hätte das jetzt nicht so gut geklappt! 😀) mfG goodfred
|