Bug 1393632 - udev db not updated for a mmc partition
Summary: udev db not updated for a mmc partition
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-10 03:11 UTC by Alois Mahdal
Modified: 2017-08-08 19:13 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 19:13:04 UTC
Type: Bug


Attachments (Terms of Use)

Description Alois Mahdal 2016-11-10 03:11:19 UTC
Description of problem
======================

lsblk is not updated after change of UUID or LABEL on an exfat partition on a micro SD card:

    @fullmoon|work:~$ lsblk -o +UUID,LABEL /dev/mmcblk0
    NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT UUID                                 LABEL
    mmcblk0     179:0    0 58.3G  0 disk                                                 
    └─mmcblk0p1 179:1    0 58.3G  0 part /mnt/gnail 0123-4567                            
    @fullmoon|work:~$ blkid /dev/mmcblk0p1 
    /dev/mmcblk0p1: LABEL="gnail" UUID="EF42-AD12" TYPE="exfat" PTTYPE="dos"
    @fullmoon|work:~$ 

Here, LABEL is missing and UUID is incorrect: 0123-4567 (the card is new so this was probably left there by manufacturer).  At the same time, blkid already "knows" the changed data; I can't see why lsblk should behave differently.

Other devices look fine.  Behavior under root is the same.

Removing and re-inserting the card triggers the update.  partprobe alone only updates blkid but not lsblk.


Version-Release number of selected component
============================================

util-linux-2.28.2-1.fc24.x86_64

Comment 1 Karel Zak 2016-11-10 08:56:24 UTC
lsblk reads info from udev db, try

  udevadm info --export /dev/mmcblk0p1

and see ID_FS_UUID and ID_FS_LABEL. 

lsblk has fallback to get LABEL/UUID also from libblkid, but you have to be root to access FS superblok. Your blkid example reads cached information, try "blkid -p" to bypass the cache.

Comment 2 Alois Mahdal 2016-11-10 21:53:02 UTC
Yesterday I loaded the card with some data (nothing of particular value) just to find out today that neither this Thinkpad T430s nor my Jolla phone do not detect the filesystem.  It's quite possible the card is faulty.

However, what I did now:

 1. Overwrote 100M of whole device with zeroes

 2. # mkfs.vfat -n gnail /dev/mmcblk0

 3. # partprobe

 4. immedately:

        $ blkid | grep mmc
        /dev/mmcblk0: LABEL="gnail" UUID="7070-34F8" TYPE="vfat"
        $ sudo blkid -p /dev/mmcblk0
        [sudo] password for amahdal: 
        /dev/mmcblk0: LABEL="gnail" UUID="7070-34F8" VERSION="FAT32" TYPE="vfat" USAGE="filesystem"
        $ udevadm info --export /dev/mmcblk0
        P: /devices/pci0000:00/0000:00:1c.2/0000:04:00.0/mmc_host/mmc0/mmc0:0007/block/mmcblk0
        N: mmcblk0
        S: disk/by-id/mmc-SD64G_0x00261f1a
        E: DEVLINKS=/dev/disk/by-id/mmc-SD64G_0x00261f1a
        E: DEVNAME=/dev/mmcblk0
        E: DEVPATH=/devices/pci0000:00/0000:00:1c.2/0000:04:00.0/mmc_host/mmc0/mmc0:0007/block/mmcblk0
        E: DEVTYPE=disk
        E: ID_DRIVE_FLASH_SD=1
        E: ID_DRIVE_MEDIA_FLASH_SD=1
        E: ID_NAME=SD64G
        E: ID_PART_TABLE_TYPE=dos
        E: ID_SERIAL=0x00261f1a
        E: MAJOR=179
        E: MINOR=8
        E: MPATH_SBIN_PATH=/sbin
        E: SUBSYSTEM=block
        E: TAGS=:systemd:
        E: UDISKS_PARTITION_TABLE=1
        E: UDISKS_PARTITION_TABLE_COUNT=1
        E: UDISKS_PARTITION_TABLE_SCHEME=mbr
        E: UDISKS_PRESENTATION_NOPOLICY=0
        E: USEC_INITIALIZED=20463258277

        $ lsblk /dev/mmcblk0 
        NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT UUID LABEL
        mmcblk0 179:8    0 58.3G  0 disk                 
        $ 

As you can see, both blkid show updated information right away, but neither udevadm nor lsblk can see the FS.

(I hope this is useful, I'm still learning...)

Comment 3 Karel Zak 2016-11-11 10:31:42 UTC
Seems like udev does not call blkid for the mmc device. Maybe systemd guys will help us ... reassigning.

Comment 4 Fedora End Of Life 2017-07-25 23:49:48 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2017-08-08 19:13:04 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.