Debian 6.0.6 Squeeze: LVM erweitern, um erweiterte virtuelle Festplatten zu füllen

Debian 6.0.6 Squeeze: LVM erweitern, um erweiterte virtuelle Festplatten zu füllen

Ich verwende VMWare ESXi mit mehreren virtuellen Maschinen. Eine davon läuft unter Debian 6.0.6 Squeeze (x86_64) und verfügte über eine Thin Provisioning-Festplatte mit 16 GB. Diese ist nun voll, also habe ich den bereitgestellten Speicherplatz auf 20 GB erweitert.

Ich bin in die Root-Konsole gegangen, um den LVM zu erweitern und den neuen Speicherplatz auszufüllen, aber Debian hat nicht bemerkt, dass mehr Speicherplatz verfügbar ist – nicht einmal nach einem Neustart der virtuellen Maschine.fdiskhat jedoch eine größere Festplatte zu verwenden bemerkt,lvresizewird nicht.

Die obligatorischen Informationen:


df -H
Filesystem             Size   Used  Avail Use% Mounted on
/dev/mapper/hlds--ls-root 16G    16G   6.8M 100% /
tmpfs                  1.1G      0   1.1G   0% /lib/init/rw
udev                   1.1G   103k   1.1G   1% /dev
tmpfs                  1.1G      0   1.1G   0% /dev/shm
/dev/sda1              239M    17M   210M   8% /boot

fdisk -u -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 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: 0x000c1f94

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2          501758    33552383    16525313    5  Extended
/dev/sda5          501760    33552383    16525312   8e  Linux LVM

Disk /dev/dm-0: 16.2 GB, 16177430528 bytes
255 heads, 63 sectors/track, 1966 cylinders, total 31596544 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: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 742 MB, 742391808 bytes
255 heads, 63 sectors/track, 90 cylinders, total 1449984 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: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

Nicht ganz sicher, warum dm-0/dm-1 da sind. Dies ist ein Einzelplattensystem, allerdings ist immer noch die Debian 6.0.6-DVD (4 GB) eingelegt.

Ich sehe, dass ich zuerst /dev/sda2 und dann /dev/sda5 erweitern müsste. Ich gehe jedoch davon aus, dasslvresizekann keinen freien Speicherplatz sicher erkennen, dann mitfdiskDas Löschen/Neuerstellen der Partitionen wäre auch keine gute Idee.


pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda5
  VG Name               hlds-ls
  PV Size               15.76 GiB / not usable 2.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              4034
  Free PE               0
  Allocated PE          4034
  PV UUID               yUJaSH-2igx-6Yzt-0vba-Rg5b-3BSq-XfouDV

lvdisplay /dev/hlds-ls/root
  --- Logical volume ---
  LV Name                /dev/hlds-ls/root
  VG Name                hlds-ls
  LV UUID                svgWMF-kuUz-9Ip1-WGWc-cbkU-dy2m-QKfddW
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                15.07 GiB
  Current LE             3857
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0

vgdisplay hlds-ls
  --- Volume group ---
  VG Name               hlds-ls
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               15.76 GiB
  PE Size               4.00 MiB
  Total PE              4034
  Alloc PE / Size       4034 / 15.76 GiB
  Free  PE / Size       0 / 0
  VG UUID               1KS0Br-quDG-5vxV-LYz3-ZTsS-2dmo-0micLM

Antwort1

Sie müssen das physische Volumen erweitern mitpvresizeund erweitern Sie anschließend das logische Volume mitlvresize(oder erstellen Sie in diesem Bereich ein neues logisches Volume).

verwandte Informationen