I’ve an OpenNebula 4.14 installation where I deployed a VM with Debian 7. Since I wanted to attach a new disk to the VM I made the following steps:
- Create a new image (datablock) of 100 GB (persistent because is for security copies purpose) and ext4.
- Shutdown the VM and attach the image.
- Start the VM and create a partition with fdisk (primary partition).
- Format the partition with mkfs.ext4
- Mount it in a specific directory.
- Check the new capacity with df -h
My problem is that there’re always some errors (all the same) on the last block of the disk:
[15489.082112] Buffer I/O error on device sdb, logical block 209715200
[15489.103363] sd 1:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[15489.103365] sd 1:0:0:0: [sdb] Sense Key : Aborted Command [current] [descriptor]
[15489.103377] sd 1:0:0:0: [sdb] Add. Sense: No additional sense information
[15489.103380] sd 1:0:0:0: [sdb] CDB: Read(10): 28 00 0c 80 00 00 00 00 01 00
This error starts happening after attaching the disk through SunStone interface and starting the VM but remains even if I create the partition on the disk and I mount it.
Something that I saw is that independently on the disk size this always happens with the last sector.
Thank you very much.
Can you show the image details? eg oneimage show <image_id>
Yes, this is the output:
oneimage show 3
IMAGE 3 INFORMATION
ID : 3
NAME : par2
USER : oneadmin
GROUP : oneadmin
DATASTORE : default
TYPE : DATABLOCK
REGISTER TIME : 04/25 12:35:30
PERSISTENT : Yes
SOURCE : /var/lib/one//datastores/1/8f88bfa9af1dbfdf923066e23c7ce6ce
FSTYPE : ext4
SIZE : 100G
STATE : used
RUNNING_VMS : 1
OWNER : um-
GROUP : —
OTHER : —
ID USER GROUP NAME STAT UCPU UMEM HOST TIME
20 oneadmin oneadmin debian7 runn 1.0 2G ONE1 2d 17h49
In my case, i never set FSTYPE. I will create either raw/qcow2 image and format the disk once attached to a VM.
Hi, thank you very much for your response.
Unfortunately, this error remains in the disk after attached, formated, etc. when I make the changes you specified.
I tried to make some read or write file operations and everything is ok however I wouldn’t like to take the risk to storing security copies in that image with this kind of error.
Hi, I found a solution.
After checking the creation of the new disk with raw format, as you said I wanted to try with the qcow2 format.
I created a datablock in Sunstone interface with qcow2 driver but I couldn’t launch the VM I attached the new image to.
After that I created an image from command line like this:
qemu-img create -f qcow2 sample.qcow2 10G
Then I created an image through SunStone interface from the sample.qcow2 and I attached it to the VM.
Now I can format the new disk and there are no I/O errors when starting OS.
Thank you very much