Изменение размера образа XEN DomU

xm shutdown billing1

cd /home/xen
root@node0001:/home/xen# ls
billing1-disk.img

dd if=/dev/zero bs=1024 count=8000000 >> billing1-disk.img
8000000+0 records in
8000000+0 records out
8192000000 bytes (8.2 GB) copied, 153.065 s, 53.5 MB/s

e2fsck -f billing1-disk.img
e2fsck 1.40.8 (13-Mar-2008)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
billing1-disk.img: 48913/1048576 files (13.5% non-contiguous), 1590869/2097152 blocks

resize2fs billing1-disk.img
resize2fs 1.40.8 (13-Mar-2008)
Resizing the filesystem on billing1-disk.img to 4097152 (4k) blocks.
The filesystem on billing1-disk.img is now 4097152 blocks long.

ls -l
total 54905548
-rw-r--r-- 1 root root 16781934592 2008-09-10 11:05 billing1-disk.img

xm create /etc/xen/auto/billing1.cfg
Using config file "/etc/xen/auto/billing1.cfg".
Started domain billing1

xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 357 4 r----- 44359.2
billing1 109 128 1 r----- 2.4

Взято с:
http://www.tehfear.com/2007/10/08/resize-loop-disk-image/

Комментариев нет:

Отправить комментарий