2017-08-11 1 views
0

Meine Haupt-Partition montiert auf/ist 14 GB. Das gleiche Laufwerk verfügt über zusätzliche 47 GB freien, nicht partitionierten Speicherplatz. Wie füge ich den Space zur Root-Partition hinzu?Centos: Fügen Sie nicht portierten Speicherplatz zu Root hinzu

Vielen Dank für Ihre Hilfe.

df -h Ausgabe:

[[email protected] /]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 14G 13G 968M 94%/ devtmpfs 1.9G 0 1.9G 0% /dev tmpfs 1.9G 0 1.9G 0% /dev/shm tmpfs 1.9G 8.5M 1.9G 1% /run tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup /dev/sdb1 99G 9.2G 85G 10% /data /dev/sda1 497M 255M 243M 52% /boot tmpfs 380M 0 380M 0% /run/user/1294246044

lsblk Ausgang:

[[email protected] /]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 60G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 15.5G 0 part ├─centos-root 253:0 0 13.9G 0 lvm/ └─centos-swap 253:1 0 1.6G 0 lvm [SWAP] sdb 8:16 0 100G 0 disk └─sdb1 8:17 0 100G 0 part /data sr0 11:0 1 1024M 0 rom trennten Druck frei Ausgabe:

(parted) print free Model: VMware Virtual disk (scsi) Disk /dev/sda: 64.4GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 32.3kB 1049kB 1016kB Free Space 1 1049kB 525MB 524MB primary xfs boot 2 525MB 17.2GB 16.7GB primary lvm 17.2GB 64.4GB 47.2GB Free Space

Antwort

0

Konnten Sie die Antwort selbst. Nahm eine Weile. Die Lösung wie folgt:

Partition erstellen: [$]# fdisk /dev/sda Command (m for help): n Partition type: p primary (2 primary, 0 extended, 2 free) e extended Select (default p): p Partition number (3,4, default 3): 3 First sector (33554432-125829119, default 33554432): Using default value 33554432 Last sector, +sectors or +size{K,M,G} (33554432-125829119, default 125829119): Using default value 125829119 Partition 3 of type Linux and of size 44 GiB is set Command (m for help): w The partition table has been altered!

die Partition initialisieren: [$]# pvcreate /dev/sda3

Extend Volume: [$]# vgextend centos /dev/sda3

Partition Extend: [$]# lvextend /dev/centos/root /dev/sda3

Resize Partition: [$]# xfs_growfs /dev/centos/root