What are Logical block size and Physical block size and How to find it ?

In simple words, logical block size is the unit used by the  ‘kernel’ for read/write operations.. Physical block sizes are the ones which ‘disk controllers’ use for read/write operations.

Is there any way to display logical/ physical block sizes in your system?

Yep, there are:

1) Fetch this information from the ‘sysfs’:

‘sda’ is the example device

[root@humbles-lap ]# cat /sys/block/sda/queue/logical_block_size 512 [root@humbles-lap ]# cat /sys/block/sda/queue/physical_block_size 512 [root@humbles-lap ]#

2) Use ‘blockdev’ command to display the same information.

[root@humbles-lap ]# rpm -qf which blockdev util-linux-XXXX [root@humbles-lap ]#

–getss get logical block (sector) size –getpbsz get physical block (sector) size

[root@humbles-lap ]# blockdev –getss /dev/sda 512 [root@humbles-lap ]# blockdev –getpbsz /dev/sda 512 [root@humbles-lap ]#

Where are guest configuration files located in KVM

I know it is a very simple question, but at the same time, if you don’t know the answer, it is not simple to you. That made me blog this information here.

In Fedora/RHEL, the guest configuration files are located under “/etc/libvirt/qemu” directory in the ‘name’ of the guest created in KVM.

[root@humbles-lap qemu]# pwd /etc/libvirt/qemu [root@humbles-lap qemu]#  ls networks rhel5.4-x86_64-kvm_backup.xml rhel5.4-x86_64-kvm.xml RHEL-5.xml rhevh.xml Window-2008.xml  [root@humbles-lap qemu]# cat rhel5.4-x86_64-kvm.xml |head -n 2 <domain type=’kvm’> <name>rhel5.4-x86_64-kvm</name> [root@humbles-lap qemu]#

Above output means, I have guests created in my system with names like rhevh, window-2008, rhel5.. etc

SR-IOV fails/error "SR-IOV: bus number out of range or ""not enough MMIO resources"

I have seen SR-IOV ( Single Root I/O Virtulaization) fails with these error messages (“SR-IOV: bus number out of range or “not enough MMIO resources” ) when using SR-IOV capable hardware devices. Couple of things can contribute to this issue. One of them can be the subjected kernel calculate the size of a SR-IOV bar …

Read more

Set scsi disk timeout value for guest virtio disks in qemu kvm…

Today my friend asked me, how can he set “timeout” value for his KVM guest which uses virtio disks. ?. In guest, virtio devices will be represented as “vd{a,b,c..} devices.. He experienced to set that value for a scsi device (ex: echo 180 > /sys/block/sdd/device/timeout) .. My answer was, it is NOT required , so …

Read more

virsh undefine delete guest configuration file in kvm

Sometimes you may execute “virsh undefine” command .. but if you really didnt meant to delete the guest configuration from disk, please make sure you have a backup of the guest configuraiton file in a location which is NOT default for libvirt ie /etc/libvirt/qemu. Otherwise you may wonder where it went after virsh undefine command. …

Read more

libvirt-guests

The service called libvirt-guests are not familiar to most of the guys..This service has been provided by libvirt-client package. This service is on in 3,4,5 runlevels by default as you can see below : ### BEGIN INIT INFO # Provides: libvirt-guests # Required-Start: libvirtd # Required-Stop: libvirtd # Default-Start: 3 4 5 This is the …

Read more

hdparm failed with error ” HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device. “

One of my friend was trying to run ‘hdparm’ command against guest disk called ‘vdb’ and received above mentioned error. [root@lap]hdparm -t /dev/vdb **** HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device If the guest disk is shown as ‘vda,vdb..etc’ , those are virtio disks which run by virtio bus. ‘hdparm’ is a …

Read more

How to know disk image format and other details of a guest disk using ‘qemu’ commands ?

As you know there are different image formats which can be used for guest space.. Below are some of them with brief notes on it. > raw Raw disk image format (default). This format has the advantage of being simple and easily exportable to all other emulators. If your file system supports holes (for example …

Read more

Network ports need to be opened in your firewall in context of RHEV

Below services or operations happens on below mentioned ports.. So make sure that, those are opened..
54321                                : vdsm

22                                       : ssh

5634 – 6166                        : guest console access ports

49152 – 49216                   : VM migration port range

32023                                : Spice  usb redirection

 

It is already mentioned here .

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Hypervisor_Deployment_Guide/chap-Deployment_Guide-Security_topics.html