Skip to contentSkip to conversation

The way to solve problem when boot VM and root disk size is specified

RBD Haomai Wang 2 participants 4 messages Nov 12, 2013 – Nov 13, 2013

lore
Share & tools
lore
#0 lore raw

Hi all,

Now OpenStack Nova master branch still exists a bug when you boot a VM which root disk size is specified. The storage backend of Nova also is rbd. For example, you boot a VM and specify 10G as root disk size. But the image is only 1G. Then VM will be spawned and the root disk size will expands to 10G. The filesystem still is 1G.

Now I have a way to solve it. When we boot a VM and resize root disk size, we use "fuse-rbd" command to resize filesystem.

fuse-rbd -p pool -c /etc/ceph/ceph.conf /tmp-ceph-rbd cd /tmp-ceph-rbd
resize2fs volume-xxxxxxxxxxx

It seemed to work but I want to know whether exists problems when many volumes in a pool. I'm not sure that too many volumes cause performance problem.

Best regards,
Wheats

#1 lore raw
Quoted 11 lines · Haomai Wang

Hi all,

Now OpenStack Nova master branch still exists a bug when you boot a VM which root disk size is specified. The storage backend of Nova also is rbd. For example, you boot a VM and specify 10G as root disk size. But the image is only 1G. Then VM will be spawned and the root disk size will expands to 10G. The filesystem still is 1G.

Now I have a way to solve it. When we boot a VM and resize root disk size, we use "fuse-rbd" command to resize filesystem.

fuse-rbd -p pool -c /etc/ceph/ceph.conf /tmp-ceph-rbd cd /tmp-ceph-rbd
resize2fs volume-xxxxxxxxxxx

It seemed to work but I want to know whether exists problems when many volumes in a pool. I'm not sure that too many volumes cause performance problem.

fuse-rbd has a 128 image limit at the moment. It's more of a prototype than something I'd recommend relying on.

Interacting with an untrusted filesystem on a compute host is also a bit worrying from a security perspective. If you really need to resize the fs and can't use cloud-init, using libguestfs would be best. This isolates the operations into a vm, so the host kernel isn't interacting with untrusted filesystems.

Josh

#2 lore raw
Quoted 13 lines · Josh Durgin
Quoted 11 lines · Haomai Wang

Hi all,

Now OpenStack Nova master branch still exists a bug when you boot a VM which root disk size is specified. The storage backend of Nova also is rbd. For example, you boot a VM and specify 10G as root disk size. But the image is only 1G. Then VM will be spawned and the root disk size will expands to 10G. The filesystem still is 1G.

Now I have a way to solve it. When we boot a VM and resize root disk size, we use "fuse-rbd" command to resize filesystem.

fuse-rbd -p pool -c /etc/ceph/ceph.conf /tmp-ceph-rbd cd /tmp-ceph-rbd
resize2fs volume-xxxxxxxxxxx

It seemed to work but I want to know whether exists problems when many volumes in a pool. I'm not sure that too many volumes cause performance problem.

Quoted 8 lines

fuse-rbd has a 128 image limit at the moment. It's more of a prototype than something I'd recommend relying on.

Interacting with an untrusted filesystem on a compute host is also a bit worrying from a security perspective. If you really need to resize the fs and can't use cloud-init, using libguestfs would be best. This isolates the operations into a vm, so the host kernel isn't interacting with untrusted filesystems.

I expected libguestfs too. But the pity is that the python binding of libguestfs doesn't support "protocol" argument, extra protocols such as rbd can't be used.

Maybe cloud-init is the proper choice. I just want to find a way let not dependent to image.

Quoted 2 lines

Josh

Best regards,
Wheats

#3 lore raw
Quoted 25 lines · Haomai Wang
Quoted 13 lines · Josh Durgin
Quoted 11 lines · Haomai Wang

Hi all,

Now OpenStack Nova master branch still exists a bug when you boot a VM which root disk size is specified. The storage backend of Nova also is rbd. For example, you boot a VM and specify 10G as root disk size. But the image is only 1G. Then VM will be spawned and the root disk size will expands to 10G. The filesystem still is 1G.

Now I have a way to solve it. When we boot a VM and resize root disk size, we use "fuse-rbd" command to resize filesystem.

fuse-rbd -p pool -c /etc/ceph/ceph.conf /tmp-ceph-rbd cd /tmp-ceph-rbd
resize2fs volume-xxxxxxxxxxx

It seemed to work but I want to know whether exists problems when many volumes in a pool. I'm not sure that too many volumes cause performance problem.

Quoted 8 lines

fuse-rbd has a 128 image limit at the moment. It's more of a prototype than something I'd recommend relying on.

Interacting with an untrusted filesystem on a compute host is also a bit worrying from a security perspective. If you really need to resize the fs and can't use cloud-init, using libguestfs would be best. This isolates the operations into a vm, so the host kernel isn't interacting with untrusted filesystems.

Quoted 3 lines

I expected libguestfs too. But the pity is that the python binding of libguestfs doesn't support "protocol" argument, extra protocols such as rbd can't be used.

Oh, sorry. Newer python-libguest supports it. Good news, thanks! :-)

Quoted 12 lines

Maybe cloud-init is the proper choice. I just want to find a way let not dependent to image.

Quoted 2 lines

Josh

Best regards,
Wheats

Best regards,
Wheats