Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using cgroups to cap disk IO that a VM does by using libvirt's support for cgroups.

So, I'm getting the major/minor number of the device from a 'ls -lL' on the drive where the '.img' file for the VM is located.

However, when I try to cap the IO, I get an error - root@Silver:/sys/fs/cgroup/blkio/sysdefault/libvirt/qemu/debian1# echo "8:6 1048576" > blkio.throttle.read_bps_device bash: echo: write error: No such device

Any idea what I'm doing wrong?

share|improve this question

It looks like you might be mixing sysctl syntax and filesystem syntax for these options. Check what the actual path is to the sysfs file you are wanting to write to (is it /sys/fs/cgroup/blkio/sysdefault/libvirt/qemu/debian1/blkio/throttle/read_bps_device?).

share|improve this answer
no, the path seems right. There are no subfolders in 'debian1'.. – vineet May 3 '12 at 1:22
Yeah, but is there a file blkio.throttle.read_bps_device in that folder? All the files in /sys/ that can be there are already there; you cannot create them normally. Therefore it's likely that you have the wrong path. Alternatively, you need a kernel module you've not built, or you are doing it from the host when you should be doing it from the VM or visa versa. – Falcon Momot May 3 '12 at 4:18
yes, there is a blkio.throttle.read_bps_device and I am writing it correctly. In fact, there another CentOS machine at school where it works fine for me, but this does not work on my Kubuntu system. So i think I must be missing a configuration setting somewhere, dont know what.. – vineet May 3 '12 at 4:58
Try doing stat on that file. It's possible you may be missing a kernel module for it... – Falcon Momot May 3 '12 at 5:15
stat does not show any errors - stat blkio.throttle.read_bps_device File: blkio.throttle.read_bps_device Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 19h/25d Inode: 13206 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2012-05-03 09:55:23.762720263 -0400 Modify: 2012-05-03 09:55:23.762720263 -0400 Change: 2012-05-03 09:55:23.762720263 -0400 Birth: - – vineet May 3 '12 at 13:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.