Setup: -- Add '/dev/sda' from the host to a Focal LXD container:
$ lxc launch ubuntu:focal 'focal-container' $ lxc config device add 'focal-container' 'lxc-dev-sda' unix-block source='/dev/sda' path='/dev/sda' Device: --- $ grep ^ /sys/block/sda/{removable,device/{vendor,model,rev}} /sys/block/sda/removable:1 /sys/block/sda/device/vendor:Generic- /sys/block/sda/device/model:SD/MMC /sys/block/sda/device/rev:1.00 Original: --- Error messages: $ sudo vgs /dev/sda: open failed: No medium found /dev/sda: open failed: No medium found $ echo $? 0 NOTE syscalls/error codes for /dev/sda: $ sudo strace -f -e openat vgs 2>&1 | grep /dev/sda openat(AT_FDCWD, "/dev/sda", O_RDONLY|O_DIRECT|O_NOATIME) = -1 ENOMEDIUM (No medium found) openat(AT_FDCWD, "/dev/sda", O_RDONLY|O_NOATIME) = -1 ENOMEDIUM (No medium found) /dev/sda: open failed: No medium found openat(AT_FDCWD, "/dev/sda", O_RDONLY|O_DIRECT|O_NOATIME) = -1 ENOMEDIUM (No medium found) openat(AT_FDCWD, "/dev/sda", O_RDONLY|O_NOATIME) = -1 ENOMEDIUM (No medium found) /dev/sda: open failed: No medium found Patched: --- No messages: $ sudo vgs $ echo $? 0 SAME syscalls/error codes for /dev/sda: $ sudo strace -f -e openat vgs 2>&1 | grep /dev/sda openat(AT_FDCWD, "/dev/sda", O_RDONLY|O_DIRECT|O_NOATIME) = -1 ENOMEDIUM (No medium found) openat(AT_FDCWD, "/dev/sda", O_RDONLY|O_NOATIME) = -1 ENOMEDIUM (No medium found) openat(AT_FDCWD, "/dev/sda", O_RDONLY|O_DIRECT|O_NOATIME) = -1 ENOMEDIUM (No medium found) openat(AT_FDCWD, "/dev/sda", O_RDONLY|O_NOATIME) = -1 ENOMEDIUM (No medium found) ** Description changed: + [Impact] + + * `update-grub` (actually `vgs`) complains about + 'No medium found' on systems with card readers + that have no card in. + + * This may confuse users who aren't sure whether + it means problems occurred with the bootloader, + and concern their ability to safely boot again. + + * The workaround is to add a filter to LVM config, + but this might be hard to find and error prone. + (And not even seem relate to `update-grub` at + all, specially on non-LVM storage layouts.) + + [Test Plan] + + * Run `vgs` on a system with a card reader + and check for 'No medium found' messages. + + [Where problems could occur] + + * The patch changes syscall error reporting on the + 'scan' path, so problems could occur when listing + LVM resources in block devices (e.g., list volume + groups with `vgs`). + + * There's little to no changes upstream on this area, + and the change is present in Jammy; both help with + a lower chance of regression. + + [Info] + + * This upload is being staged (`block-proposed-focal`) + as it's just a cosmetic change, but affects `lvm2`, + which is present in so many systems, triggering a + lot of upgrades/boot risk (in case something else + broke and this upgrade could reveal it indirectly). + + * So, it will probably only be released once a more + serious issue has to be fixed in `lvm2`. + + [Original Bug Description] + sudo update-grub Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... - /dev/sdc: open failed: No medium found - /dev/sdd: open failed: No medium found - /dev/sde: open failed: No medium found - /dev/sdf: open failed: No medium found - /dev/sdc: open failed: No medium found - /dev/sdd: open failed: No medium found - /dev/sde: open failed: No medium found - /dev/sdf: open failed: No medium found - /dev/sdc: open failed: No medium found - /dev/sdd: open failed: No medium found - /dev/sde: open failed: No medium found - /dev/sdf: open failed: No medium found - /dev/sdc: open failed: No medium found - /dev/sdd: open failed: No medium found - /dev/sde: open failed: No medium found - /dev/sdf: open failed: No medium found - /dev/sdc: open failed: No medium found - /dev/sdd: open failed: No medium found - /dev/sde: open failed: No medium found - /dev/sdf: open failed: No medium found - /dev/sdc: open failed: No medium found - /dev/sdd: open failed: No medium found - /dev/sde: open failed: No medium found - /dev/sdf: open failed: No medium found - /dev/sdc: open failed: No medium found - /dev/sdd: open failed: No medium found - /dev/sde: open failed: No medium found - /dev/sdf: open failed: No medium found - /dev/sdc: open failed: No medium found - /dev/sdd: open failed: No medium found - /dev/sde: open failed: No medium found - /dev/sdf: open failed: No medium found - /dev/sdc: open failed: No medium found - /dev/sdd: open failed: No medium found - /dev/sde: open failed: No medium found - /dev/sdf: open failed: No medium found - /dev/sdc: open failed: No medium found - /dev/sdd: open failed: No medium found - /dev/sde: open failed: No medium found - /dev/sdf: open failed: No medium found + /dev/sdc: open failed: No medium found + /dev/sdd: open failed: No medium found + /dev/sde: open failed: No medium found + /dev/sdf: open failed: No medium found + /dev/sdc: open failed: No medium found + /dev/sdd: open failed: No medium found + /dev/sde: open failed: No medium found + /dev/sdf: open failed: No medium found + /dev/sdc: open failed: No medium found + /dev/sdd: open failed: No medium found + /dev/sde: open failed: No medium found + /dev/sdf: open failed: No medium found + /dev/sdc: open failed: No medium found + /dev/sdd: open failed: No medium found + /dev/sde: open failed: No medium found + /dev/sdf: open failed: No medium found + /dev/sdc: open failed: No medium found + /dev/sdd: open failed: No medium found + /dev/sde: open failed: No medium found + /dev/sdf: open failed: No medium found + /dev/sdc: open failed: No medium found + /dev/sdd: open failed: No medium found + /dev/sde: open failed: No medium found + /dev/sdf: open failed: No medium found + /dev/sdc: open failed: No medium found + /dev/sdd: open failed: No medium found + /dev/sde: open failed: No medium found + /dev/sdf: open failed: No medium found + /dev/sdc: open failed: No medium found + /dev/sdd: open failed: No medium found + /dev/sde: open failed: No medium found + /dev/sdf: open failed: No medium found + /dev/sdc: open failed: No medium found + /dev/sdd: open failed: No medium found + /dev/sde: open failed: No medium found + /dev/sdf: open failed: No medium found + /dev/sdc: open failed: No medium found + /dev/sdd: open failed: No medium found + /dev/sde: open failed: No medium found + /dev/sdf: open failed: No medium found Found linux image: /boot/vmlinuz-5.0.0-17-generic Found initrd image: /boot/initrd.img-5.0.0-17-generic Found linux image: /boot/vmlinuz-5.0.0-16-generic Found initrd image: /boot/initrd.img-5.0.0-16-generic - /dev/sdc: open failed: No medium found - /dev/sdd: open failed: No medium found - /dev/sde: open failed: No medium found - /dev/sdf: open failed: No medium found - /dev/sdc: open failed: No medium found - /dev/sdd: open failed: No medium found - /dev/sde: open failed: No medium found - /dev/sdf: open failed: No medium found - /dev/sdc: open failed: No medium found - /dev/sdd: open failed: No medium found - /dev/sde: open failed: No medium found - /dev/sdf: open failed: No medium found + /dev/sdc: open failed: No medium found + /dev/sdd: open failed: No medium found + /dev/sde: open failed: No medium found + /dev/sdf: open failed: No medium found + /dev/sdc: open failed: No medium found + /dev/sdd: open failed: No medium found + /dev/sde: open failed: No medium found + /dev/sdf: open failed: No medium found + /dev/sdc: open failed: No medium found + /dev/sdd: open failed: No medium found + /dev/sde: open failed: No medium found + /dev/sdf: open failed: No medium found Adding boot menu entry for EFI firmware configuration done -- lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT - sda 8:0 0 3.7T 0 disk + sda 8:0 0 3.7T 0 disk ├─sda1 8:1 0 512M 0 part /boot/efi ├─sda2 8:2 0 732M 0 part /boot - └─sda3 8:3 0 3.7T 0 part - └─sda3_crypt 253:0 0 3.7T 0 crypt - ├─kubuntu--vg-swap_1 253:1 0 976M 0 lvm [SWAP] - └─kubuntu--vg-root 253:2 0 3.7T 0 lvm / - sdb 8:16 0 3.7T 0 disk - └─sdb1 8:17 0 3.7T 0 part - sdg 8:96 0 7.3T 0 disk + └─sda3 8:3 0 3.7T 0 part + └─sda3_crypt 253:0 0 3.7T 0 crypt + ├─kubuntu--vg-swap_1 253:1 0 976M 0 lvm [SWAP] + └─kubuntu--vg-root 253:2 0 3.7T 0 lvm / + sdb 8:16 0 3.7T 0 disk + └─sdb1 8:17 0 3.7T 0 part + sdg 8:96 0 7.3T 0 disk └─sdg1 8:97 0 7.3T 0 part /media/scott/8TB Ext Drive - sr0 11:0 1 15.7G 0 rom + sr0 11:0 1 15.7G 0 rom -- cat /etc/default/grub GRUB_DEFAULT=0 GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on" GRUB_CMDLINE_LINUX="" ProblemType: Bug DistroRelease: Ubuntu 19.10 Package: grub2-common 2.02+dfsg1-12ubuntu3 ProcVersionSignature: Ubuntu 5.0.0-17.18-generic 5.0.8 Uname: Linux 5.0.0-17-generic x86_64 NonfreeKernelModules: nvidia_modeset nvidia ApportVersion: 2.20.11-0ubuntu3 Architecture: amd64 CurrentDesktop: KDE Date: Tue Jun 25 15:05:29 2019 InstallationDate: Installed on 2019-06-14 (10 days ago) InstallationMedia: Kubuntu 19.10 "Eoan Ermine" - Alpha amd64 (20190614) SourcePackage: grub2 UpgradeStatus: No upgrade log present (probably fresh install) ** Tags added: block-proposed-focal ** Description changed: [Impact] - * `update-grub` (actually `vgs`) complains about - 'No medium found' on systems with card readers - that have no card in. - - * This may confuse users who aren't sure whether - it means problems occurred with the bootloader, - and concern their ability to safely boot again. + * `update-grub` (actually `vgs`) complains about + 'No medium found' on systems with card readers + that have no card in. - * The workaround is to add a filter to LVM config, - but this might be hard to find and error prone. - (And not even seem relate to `update-grub` at - all, specially on non-LVM storage layouts.) + * This may confuse users who aren't sure whether + it means problems occurred with the bootloader, + and concern their ability to safely boot again. + + * The workaround is to add a filter to LVM config, + but this might be hard to find and error prone. + (And not even seem relate to `update-grub` at + all, specially on non-LVM storage layouts.) + [See comment #16] [Test Plan] - * Run `vgs` on a system with a card reader - and check for 'No medium found' messages. + * Run `vgs` on a system with a card reader + and check for 'No medium found' messages. + + * Run `strace -f -e openat vgs` to confirm + system calls/error codes have no changes. + + * [See comment #20] [Where problems could occur] - * The patch changes syscall error reporting on the - 'scan' path, so problems could occur when listing - LVM resources in block devices (e.g., list volume - groups with `vgs`). - - * There's little to no changes upstream on this area, - and the change is present in Jammy; both help with - a lower chance of regression. - + * The patch changes syscall error reporting on the + 'scan' path, so problems could occur when listing + LVM resources in block devices (e.g., list volume + groups with `vgs`). + + * There's little to no changes upstream on this area, + and the change is present in Jammy; both help with + a lower chance of regression. + [Info] - * This upload is being staged (`block-proposed-focal`) - as it's just a cosmetic change, but affects `lvm2`, - which is present in so many systems, triggering a - lot of upgrades/boot risk (in case something else - broke and this upgrade could reveal it indirectly). - - * So, it will probably only be released once a more - serious issue has to be fixed in `lvm2`. + * This upload is being staged (`block-proposed-focal`) + as it's just a cosmetic change, but affects `lvm2`, + which is present in so many systems, triggering a + lot of upgrades/boot risk (in case something else + broke and this upgrade could reveal it indirectly). + + * So, it will probably only be released once a more + serious issue has to be fixed in `lvm2`. [Original Bug Description] sudo update-grub Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found Found linux image: /boot/vmlinuz-5.0.0-17-generic Found initrd image: /boot/initrd.img-5.0.0-17-generic Found linux image: /boot/vmlinuz-5.0.0-16-generic Found initrd image: /boot/initrd.img-5.0.0-16-generic /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found Adding boot menu entry for EFI firmware configuration done -- lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 3.7T 0 disk ├─sda1 8:1 0 512M 0 part /boot/efi ├─sda2 8:2 0 732M 0 part /boot └─sda3 8:3 0 3.7T 0 part └─sda3_crypt 253:0 0 3.7T 0 crypt ├─kubuntu--vg-swap_1 253:1 0 976M 0 lvm [SWAP] └─kubuntu--vg-root 253:2 0 3.7T 0 lvm / sdb 8:16 0 3.7T 0 disk └─sdb1 8:17 0 3.7T 0 part sdg 8:96 0 7.3T 0 disk └─sdg1 8:97 0 7.3T 0 part /media/scott/8TB Ext Drive sr0 11:0 1 15.7G 0 rom -- cat /etc/default/grub GRUB_DEFAULT=0 GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on" GRUB_CMDLINE_LINUX="" ProblemType: Bug DistroRelease: Ubuntu 19.10 Package: grub2-common 2.02+dfsg1-12ubuntu3 ProcVersionSignature: Ubuntu 5.0.0-17.18-generic 5.0.8 Uname: Linux 5.0.0-17-generic x86_64 NonfreeKernelModules: nvidia_modeset nvidia ApportVersion: 2.20.11-0ubuntu3 Architecture: amd64 CurrentDesktop: KDE Date: Tue Jun 25 15:05:29 2019 InstallationDate: Installed on 2019-06-14 (10 days ago) InstallationMedia: Kubuntu 19.10 "Eoan Ermine" - Alpha amd64 (20190614) SourcePackage: grub2 UpgradeStatus: No upgrade log present (probably fresh install) -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to lvm2 in Ubuntu. https://bugs.launchpad.net/bugs/1834250 Title: update-grub complains about non-existent drives (due to cardreader) Status in lvm2 package in Ubuntu: Fix Released Status in lvm2 source package in Focal: In Progress Bug description: [Impact] * `update-grub` (actually `vgs`) complains about 'No medium found' on systems with card readers that have no card in. * This may confuse users who aren't sure whether it means problems occurred with the bootloader, and concern their ability to safely boot again. * The workaround is to add a filter to LVM config, but this might be hard to find and error prone. (And not even seem relate to `update-grub` at all, specially on non-LVM storage layouts.) [See comment #16] [Test Plan] * Run `vgs` on a system with a card reader and check for 'No medium found' messages. * Run `strace -f -e openat vgs` to confirm system calls/error codes have no changes. * [See comment #20] [Where problems could occur] * The patch changes syscall error reporting on the 'scan' path, so problems could occur when listing LVM resources in block devices (e.g., list volume groups with `vgs`). * There's little to no changes upstream on this area, and the change is present in Jammy; both help with a lower chance of regression. [Info] * This upload is being staged (`block-proposed-focal`) as it's just a cosmetic change, but affects `lvm2`, which is present in so many systems, triggering a lot of upgrades/boot risk (in case something else broke and this upgrade could reveal it indirectly). * So, it will probably only be released once a more serious issue has to be fixed in `lvm2`. [Original Bug Description] sudo update-grub Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found Found linux image: /boot/vmlinuz-5.0.0-17-generic Found initrd image: /boot/initrd.img-5.0.0-17-generic Found linux image: /boot/vmlinuz-5.0.0-16-generic Found initrd image: /boot/initrd.img-5.0.0-16-generic /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found Adding boot menu entry for EFI firmware configuration done -- lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 3.7T 0 disk ├─sda1 8:1 0 512M 0 part /boot/efi ├─sda2 8:2 0 732M 0 part /boot └─sda3 8:3 0 3.7T 0 part └─sda3_crypt 253:0 0 3.7T 0 crypt ├─kubuntu--vg-swap_1 253:1 0 976M 0 lvm [SWAP] └─kubuntu--vg-root 253:2 0 3.7T 0 lvm / sdb 8:16 0 3.7T 0 disk └─sdb1 8:17 0 3.7T 0 part sdg 8:96 0 7.3T 0 disk └─sdg1 8:97 0 7.3T 0 part /media/scott/8TB Ext Drive sr0 11:0 1 15.7G 0 rom -- cat /etc/default/grub GRUB_DEFAULT=0 GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on" GRUB_CMDLINE_LINUX="" ProblemType: Bug DistroRelease: Ubuntu 19.10 Package: grub2-common 2.02+dfsg1-12ubuntu3 ProcVersionSignature: Ubuntu 5.0.0-17.18-generic 5.0.8 Uname: Linux 5.0.0-17-generic x86_64 NonfreeKernelModules: nvidia_modeset nvidia ApportVersion: 2.20.11-0ubuntu3 Architecture: amd64 CurrentDesktop: KDE Date: Tue Jun 25 15:05:29 2019 InstallationDate: Installed on 2019-06-14 (10 days ago) InstallationMedia: Kubuntu 19.10 "Eoan Ermine" - Alpha amd64 (20190614) SourcePackage: grub2 UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1834250/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp