disk_io incompatible with LVM

Bug #723187 reported by Igor Feghali
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Medium
Unassigned
byobu (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

following our last discussion about LVM compatibility, here follows my system configuration:

(disk_io should read from /sys/block/dm-0, setting MONITORED_DISK doesn't work because it don't find it in mtab)

$ sh -x /usr/local/lib/byobu/disk_io

+ PKG=byobu
+ DATA=/u/uqn7/.byobu
+ color
+ '[' '' = 1 ']'
+ ICON_RD='<'
+ '[' '' = 1 ']'
+ ICON_WR='>'
+ '[' -z '' ']'
+ MP=/
+ case $MP in
++ grep -m 1 ' / ' /etc/mtab
++ sed -e 's: .*$::'
+ disk=/dev/mapper/ROOTVG-LVROOT
++ echo /dev/mapper/ROOTVG-LVROOT
++ sed -e 's: .*$::' -e 's:^.*/::' -e 's:\([hsv]d[a-z]\)[0-9]*$:\1:'
+ disk=ROOTVG-LVROOT
+ '[' '' = --detail ']'
+ '[' -d /var/run/screen/S-uqn7 ']'
+ DIR=/u/uqn7/.byobu
++ date +%s
+ t2=1298384278
+ for i in '"read"' '"write"'
+ cache=/u/uqn7/.byobu/byobu.disk_read
++ stat -c %Y /u/uqn7/.byobu/byobu.disk_read
+ t1=1298384274
+ unit=kB/s
+ '[' 1298384278 -le 1298384274 ']'
++ cat /u/uqn7/.byobu/byobu.disk_read
+ x1=
+ '[' read = read ']'
+ symbol='<'
++ awk '{print $3}' /sys/block/ROOTVG-LVROOT/stat
awk: cmd. line:1: fatal: cannot open file `/sys/block/ROOTVG-LVROOT/stat' for reading (No such file or directory)
+ x2=
+ echo ''
++ echo 1298384274 1298384278 '' ''
++ awk '{printf "%.0f", ($4 - $3) / ($2 - $1) * 512 / 1024 }'
+ rate=0
+ '[' 0 -lt 0 ']'
+ '[' 0 -gt 1024 ']'
++ color b M W
++ true
++ color -
++ true
++ color M W
++ true
++ color -
++ true
+ printf '<0kB/s '
+ for i in '"read"' '"write"'
+ cache=/u/uqn7/.byobu/byobu.disk_write
++ stat -c %Y /u/uqn7/.byobu/byobu.disk_write
+ t1=1298384275
+ unit=kB/s
+ '[' 1298384278 -le 1298384275 ']'
++ cat /u/uqn7/.byobu/byobu.disk_write
+ x1=
+ '[' write = read ']'
+ symbol='>'
++ awk '{print $7}' /sys/block/ROOTVG-LVROOT/stat
awk: cmd. line:1: fatal: cannot open file `/sys/block/ROOTVG-LVROOT/stat' for reading (No such file or directory)
+ x2=
+ echo ''
++ echo 1298384275 1298384278 '' ''
++ awk '{printf "%.0f", ($4 - $3) / ($2 - $1) * 512 / 1024 }'
+ rate=0
+ '[' 0 -lt 0 ']'
+ '[' 0 -gt 1024 ']'
++ color b M W
++ true
++ color -
++ true
++ color M W
++ true
++ color -
++ true
+ printf '>0kB/s '

$ cat /etc/mtab | grep '/ '
/dev/mapper/ROOTVG-LVROOT / ext3 rw 0 0

$ sudo /sbin/lvm lvdisplay
  --- Logical volume ---
  LV Name /dev/ROOTVG/LVROOT
  VG Name ROOTVG
  LV UUID erMVk8-D7o9-PaYD-j5jl-9kES-6N2H-utym66
  LV Write Access read/write
  LV Status available
  # open 1
  LV Size 20.00 GB
  Current LE 640
  Segments 1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 253:0

  --- Logical volume ---
  LV Name /dev/ROOTVG/LVWORK
  VG Name ROOTVG
  LV UUID AuNIqo-Af5c-XDZw-Mg7F-OIP0-vIZq-8FxJ4n
  LV Write Access read/write
  LV Status available
  # open 1
  LV Size 50.41 GB
  Current LE 1613
  Segments 1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 253:1

  --- Logical volume ---
  LV Name /dev/ROOTVG/LVSWAP
  VG Name ROOTVG
  LV UUID lAsNlZ-s8eL-SPGW-pzWK-Tivm-PWWF-8tFwoP
  LV Write Access read/write
  LV Status available
  # open 1
  LV Size 4.00 GB
  Current LE 128
  Segments 1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 253:2

$ cat /proc/partitions
major minor #blocks name

   8 0 78149687 sda
   8 1 104391 sda1
   8 2 78043770 sda2
 253 0 20971520 dm-0
 253 1 52854784 dm-1
 253 2 4194304 dm-2

Related branches

Changed in byobu:
status: New → Fix Committed
importance: Undecided → Medium
Changed in byobu (Ubuntu):
status: New → Fix Committed
importance: Undecided → Medium
Changed in byobu:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 3.29-0ubuntu1

---------------
byobu (3.29-0ubuntu1) natty; urgency=low

  [ Dustin Kirkland ]
  * usr/share/man/man1/byobu.1: document PS1 workaround, LP: #525552
  * usr/share/man/man1/byobu.1: fix minor manpage typo, add SERVICES example
  * usr/lib/byobu/wifi_quality, usr/share/man/man1/byobu.1: support overriding
    the default wireless interface, LP: #723260
  * usr/share/man/man1/byobu.1: document TERM=vt100 for Mac keyboard users,
    LP: #482623
  * usr/bin/byobu-janitor: use readlink, much more graceful
  * usr/lib/byobu/time_binary, usr/share/byobu/profiles/common,
    usr/share/man/man1/byobu.1: fixup a couple of minor issues with the binary
    clock commit
  * usr/bin/byobu-status: switch the interpreter from sh to bash; this is
    needed to support James' time_binary script, which is bash and cannot be
    simply sourced by byobu-status; if significant performance regressions
    occur, we will need to back this change out and approach it a different
    way

  [ James Hunt ]
  * etc/byobu/statusrc, usr/bin/byobu-config, usr/lib/byobu/time_binary,
    usr/share/byobu/profiles/common, usr/share/man/man1/byobu.1:
    - add support for the super-geeky-but-fun binary clock; requires
      UTF8 support in GNU Screen, LP: #705037

  [ Chow Loong Jin and Dustin Kirkland ]
  * usr/lib/byobu/disk_io: canonicalize symlinks so that disk_io works
    with raid, lvm, dm volumes, LP: #709224, #711373, #723187
 -- Dustin Kirkland <email address hidden> Wed, 23 Feb 2011 16:24:38 -0600

Changed in byobu (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.