Libvirt blockresize » История » Версия 4
Андрей Волков, 2013-06-27 18:50
1 | 1 | Андрей Волков | h1. Libvirt blockresize |
---|---|---|---|
2 | |||
3 | host: # *lvresize -L +44g mirror/kvm602-guest-storage* |
||
4 | |||
5 | <pre> |
||
6 | Using stripesize of last segment 64.00 KiB |
||
7 | Extending logical volume kvm602-guest-storage to 92.00 GiB |
||
8 | Logical volume kvm602-guest-storage successfully resized |
||
9 | </pre> |
||
10 | |||
11 | host: # *lvs --units k mirror/kvm602-guest-storage* |
||
12 | |||
13 | <pre> |
||
14 | 2 | Андрей Волков | LV VG Attr LSize |
15 | 1 | Андрей Волков | kvm602-guest-storage mirror -wi-ao 96468992.00k |
16 | </pre> |
||
17 | |||
18 | host:~# *virsh* |
||
19 | |||
20 | <pre> |
||
21 | Welcome to virsh, the virtualization interactive terminal. |
||
22 | |||
23 | Type: 'help' for help with commands |
||
24 | 'quit' to quit |
||
25 | </pre> |
||
26 | |||
27 | virsh # *list* |
||
28 | |||
29 | <pre> |
||
30 | virsh # list |
||
31 | Id Name State |
||
32 | ---------------------------------------------------- |
||
33 | ... |
||
34 | 7 kvm602-guest running |
||
35 | ... |
||
36 | </pre> |
||
37 | |||
38 | virsh # *domblklist kvm602-guest* |
||
39 | |||
40 | <pre> |
||
41 | Target Source |
||
42 | ------------------------------------------------ |
||
43 | vda /dev/mirror/kvm602-guest-root |
||
44 | vdb /dev/mirror/kvm602-guest-storage |
||
45 | </pre> |
||
46 | |||
47 | virsh # *blockresize kvm602-work-backup --path /dev/mirror/kvm602-guest-storage --size 96468992* |
||
48 | |||
49 | <pre> |
||
50 | Block device '/dev/mirror/kvm602-work-storage' is resized |
||
51 | </pre> |
||
52 | |||
53 | 4 | Андрей Волков | Смотрим, чтобы ядро было старше 3.0 |
54 | |||
55 | guest # *uname -r* |
||
56 | |||
57 | <pre> |
||
58 | 3.2.0-0.bpo.4-amd64 |
||
59 | </pre> |
||
60 | |||
61 | 1 | Андрей Волков | guest # *dmesg |tail* |
62 | |||
63 | <pre> |
||
64 | [838729.810179] vdb: detected capacity change from 51539607552 to 98784247808 |
||
65 | </pre> |
||
66 | 3 | Андрей Волков | |
67 | guest # *blockdev --rereadpt /dev/vdb* |
||
68 | |||
69 | guest # *pvresize /dev/vdb* |
||
70 | |||
71 | <pre> |
||
72 | Physical volume "/dev/vdb" changed |
||
73 | 1 physical volume(s) resized / 0 physical volume(s) not resized |
||
74 | </pre> |