Public bug reported:

dmsetup: there is no any warning about 4K logical block size (no warning
by programm, no warning in man page).

How to reproduce:

Followed page 7 of http://mbroz.fedorapeople.org/talks/DeviceMapperBasics/dm.pdf
I tried following:

dmsetup-test.sh:
-----------------------------------------
#!/bin/sh

sudo dmsetup create bad_disk << EOF
  0 8       linear /dev/sda1 0
  8 1       error
  9 100 linear /dev/sda1 9
EOF

sudo badblocks /dev/mapper/bad_disk
-----------------------------------------


Actual result:

Script output is:
4
5
6
7

In /var/log/kernel.log (tail -f, then press ENTER to make a gap and run script 
in another console).
Following was added during this script worked:

Jun 29 16:08:54 HP-635 kernel: [33498.146296] Buffer I/O error on device dm-1, 
logical block 8
Jun 29 16:08:54 HP-635 kernel: [33498.147299] Buffer I/O error on device dm-1, 
logical block 8
Jun 29 16:08:54 HP-635 kernel: [33498.147614] Buffer I/O error on device dm-1, 
logical block 8
Jun 29 16:08:54 HP-635 kernel: [33498.147981] Buffer I/O error on device dm-1, 
logical block 8
Jun 29 16:08:54 HP-635 kernel: [33498.148276] Buffer I/O error on device dm-1, 
logical block 8
Jun 29 16:08:54 HP-635 kernel: [33498.148639] Buffer I/O error on device dm-1, 
logical block 8


Expected result:

1. Warning from dmsetup: sectors in mapping table is not aligned by 8

2. Warning about aligment in 'man dmsetup' in section TABLE FORMAT.


Additional info:

$ sudo dmsetup table /dev/mapper/bad_disk 
0 8 linear 8:1 0
8 1 error 
9 100 linear 8:1 9

$ sudo blockdev --report /dev/mapper/bad_disk 
RO    RA   SSZ   BSZ   StartSec            Size   Device
rw   256   512   512          0           55808   /dev/mapper/bad_disk

$ sudo blockdev --report /dev/sda
RO    RA   SSZ   BSZ   StartSec            Size   Device
rw   256   512  4096          0    320072933376   /dev/sda

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: dmsetup 2:1.02.74-6ubuntu4
ProcVersionSignature: Ubuntu 3.8.0-25.37-generic 3.8.13
Uname: Linux 3.8.0-25-generic i686
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: i386
Date: Sat Jun 29 15:47:24 2013
InstallationDate: Installed on 2013-05-02 (58 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release i386 (20130424)
MarkForUpload: True
SourcePackage: lvm2
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: lvm2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386 raring

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1195980

Title:
  dmsetup: there is no any warning about 4K logical block size

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1195980/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to