Die Anleitung im Wiki funktioniert (auch vor der Änderung) schon
nun gut.
hier dann meine aufgezeichnete Sitzung (streng nach Wiki):
wo ist mein Fehler ?
zunächst im Normalsystem:
root@server2:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/volume-root
39G 1.5G 36G 4% /
tmpfs 1007M 0 1007M 0% /lib/init/rw
udev 1002M 116K 1001M 1% /dev
tmpfs 1007M 0 1007M 0% /dev/shm
/dev/vda1 248M 26M 210M 11% /boot
root@server2:~# fdisk -l
Disk /dev/vda: 83.8 GB, 83751862272 bytes
16 heads, 63 sectors/track, 162279 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e7311
Device Boot Start End Blocks Id System
/dev/vda1 * 3 523 262144 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/vda2 523 162280 81525760 83 Linux
Partition 2 does not end on cylinder boundary.
Disk /dev/dm-0: 42.2 GB, 42165338112 bytes
255 heads, 63 sectors/track, 5126 cylinders
Units = cylinders of 16065 * 512 = 8225280 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: 511 MB, 511705088 bytes
255 heads, 63 sectors/track, 62 cylinders
Units = cylinders of 16065 * 512 = 8225280 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
root@server2:~#
Alles anzeigen
Dann boote ich ins Rettungssystem:
(am Ende dann der Fehler welchen ich mit [n] beantworte...
root@123:~# /etc/init.d/lvm2 stop
Shutting down LVM Volume Groups 0 logical volume(s) in volume group "volume" now active
.
root@123:~# fdisk /dev/vda
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): u
Changing display/entry units to sectors
Command (m for help): c
DOS Compatibility flag is not set
Command (m for help): d
Partition number (1-4): 2
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First sector (526336-163577855, default 526336):
Using default value 526336
Last sector, +sectors or +size{K,M,G} (526336-163577855, default 163577855):
Using default value 163577855
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
n
root@123:~# pvresize /dev/vda2
Physical volume "/dev/vda2" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
root@123:~# /etc/init.d/lvm2 start
Setting up LVM Volume Groups Reading all physical volumes. This may take a while...
Found volume group "volume" using metadata type lvm2
2 logical volume(s) in volume group "volume" now active
.
root@123:~# lvresize -l 100%free /dev/volume/root
WARNING: Reducing active logical volume to 38.00 GiB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce root? [y/n]:
Alles anzeigen