Forums

Home / Forums

You need to log in to create posts and topics. Login · Register

online resize disk.

Pages: 1 2

Hi,

we are using version 2.3.0.

How can I change the display size of a volume (metadata) in PetaSAN with the admin cli tools?

Thanks

from the ui, you can stop and edit the disk

from cli, you can use the ceph rbd tool  resize command

https://docs.ceph.com/docs/master/man/8/rbd/

i would recommend the disk is not running and client are not connected while you run this.

Hi,

maybe we have a misunderstanding. We already did the resize "online" like in the thread explained before.
This went without any problems.

But PetaSAN still shows the old size under iSCSI Disks.

What I would like to do is changing the metadata like you mentioned before:

If you did change the size dynamically via cli as you stated and everything worked fine aside from the ui display of old size, you can just ignore the size in the ui for now, it does not have a functional effect. In version 2.3 we are adding some additional admin cli tools which includes commands to read and write the image metadata (we use it internally to support async replication), you could use these to modify the display size.

The whole purpose of this is, that we don't have to STOP and START the iSCSI Disks 🙂
Or was this a misunderstanding? It there another "manual" way to just change the displayed Size under SCSI Disks? (I know it is just a display flaw)

Thank you.

Yes as stated, if you change the disk size outside the system, it will not be correct in the ui, but that is all. From version 2.3 we added a script

/opt/petasan/scripts/util/disk_meta.py

to read/write iSCSI metada to the Ceph image, it uses json format. So you can read to file, change the size then write it and refersh ui.

The reason of the issue is we save the disk size in the disk metadata we read during listing of disks for performance reasons. We do this rather than making an extra call to Ceph to read the image size which can be slow if you have a lot of disks ( in our tests we go above 1K, which will slow doen the ui listing ).   This is really an exception, as we always read data dynamically from Ceph to support external changes. So if you change the size without using the ui, the metada will still show old size.

I am also not sure if online resizing is supported by clients in all environments, i can see hypervisors can support this with their vms, but a bare-metal Windows connected to iSCSI not sure it expects the disk size to change without stoping.

 

 

Thanks for the information.

Just to confirm the usage of disk_meta.py:

/opt/petasan/scripts/util/disk_meta.py rd -image <imagename> -pool <poolname> >  /tmp/metadata

-> Change value behind "size":

/opt/petasan/scripts/util/disk_meta.py wr -image <imagename> -pool <poolname> -file /tmp/metadata

The parameter syntax was modified in later version. there is a multi level help in the command, so just verify it.

Pages: 1 2