Bug 11676

Summary: Something in cauldron blocks mounting of partitions on disks not containing the active root
Product: Mageia Reporter: Frank Griffin <ftg>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: High CC: mageia, nic
Version: CauldronKeywords: NEEDINFO
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: no idea CVE:
Status comment:

Description Frank Griffin 2013-11-15 17:01:53 CET
I have a running cauldron system.  I added a second drive to it, booted up off the primary drive, and ran diskdrake to define several partitions on the new drive (/dev/sdb, as expected).  This all went fine.  I gave no mount point for any of the /dev/sdbX partitions.

Then I tried to format them.  In every case, the format failed.  Running diskdrake from the command line, mke2fs complained that the partitions appeared to be in use by the system, and it would not create a filesystem.

Figuring that something in the partition definition was lingering around, I rebooted, but go the same error.  The error also occurs if I try mkfs.ext4 from the command line.  lsof /dev/sdb1 shows no users.

Apparently, whatever (dbus ?  systemd ?) is responsible for detecting the drive and creating the devices for the drive and the partitions is doing something to them that blocks mkfs, but I have no idea what, nor how to find out.

I've done this in the past with partitions on the primary drive without a problem.  I'm guessing that it's because the primary drive containing the root partition is recognized and set up earlier in the boot by something else.


Reproducible: 

Steps to Reproduce:
Comment 1 Frank Griffin 2013-11-18 14:32:24 CET
This has nothing to do with formatting.  I booted to single-user mode and formatted the partitions without a problem.  When I rebooted, mount refused to mount any of them, giving the same error described above.

Priority: Normal => High
Summary: Something in cauldron blocks formatting of unmounted partitions => Something in cauldron blocks mountng of partitions on disks not containing the active root
Severity: normal => major

Comment 2 Frank Griffin 2013-12-02 18:14:56 CET
I noticed the following, but I don't know if it is significant.  /dev/sda is my primary drive, formatted many moons ago.  /dev/sdb is the new drive, 2 TB and recently acquired:

******************************************************************
[root@ftgme2 ~]# fdisk /dev/sda

Welcome to fdisk (util-linux 2.24).                                            
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

[root@ftgme2 ~]# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.24).                                            
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000
**********************************************************************

Note that the new disk has a physical sector size of 4096 while the older one has a sector size of 512.  The mount point at which I'm trying to mount the /dev/sdb1 partition is a directory on /dev/sda1.  Is the mount failing because the two disks have differing physical sector sizes ?
Comment 3 Sander Lepik 2013-12-02 18:18:29 CET
Which partition table are you using on that 2TB disk. So big disks should use gpt AFAIK.

CC: (none) => mageia

Comment 4 Frank Griffin 2013-12-02 18:31:41 CET
I created the partitions with diskdrake, and it doesn't seem to have a problem seeing them.  Likewise fdisk:

Device     Boot      Start        End     Blocks  Id System
/dev/sdb1  *          2048   83875364   41936658+ 83 Linux
/dev/sdb2         83875840  167750729   41937445  83 Linux
/dev/sdb3        167751680  251626094   41937207+ 83 Linux
/dev/sdb4        251629560 2466154214 1107262327+  5 Extended
/dev/sdb5        251629568  285169814   16770123+ 82 Linux swap / Solaris
/dev/sdb6        285173760  318713534   16769887+ 83 Linux
/dev/sdb7        318715904  855573704  268428900+ 83 Linux
/dev/sdb8        855576576 1392433874  268428649+ 83 Linux
/dev/sdb9       1392437248 1929294044  268428398+ 83 Linux
/dev/sdb10      1929297920 2466154214  268428147+ 83 Linux

I assume diskdrake is still using a DOS-type PT ?
Comment 5 Frank Griffin 2013-12-02 19:03:34 CET
Alright, this is just weird...

I booted to single-user mode to see if the mount would work there.   It does.  I then exited single-user mode and allowed the full boot to continue.  When KDM came up, I logged in, and "df" showed that the mount was still there.  I had in the previous boot defined a second mount point, /mnt/disk2, and had tried mounting a partition there (just to rule out something holding /mnt/disk), and that didn't work.  Now, with /dev/sdb1 still mounted on /mnt/disk, /dev/sdb2 mounts successfully on /mnt/disk2.  I also umounted them both and was able to mount /dev/sdb1 on /mnt/disk again with no problem.

As long as I have them accessible, I'm going to do some work with them.  Then I'll try to reboot normally and see what happens...
Frank Griffin 2013-12-02 19:04:03 CET

Summary: Something in cauldron blocks mountng of partitions on disks not containing the active root => Something in cauldron blocks mounting of partitions on disks not containing the active root

Comment 6 Frank Griffin 2013-12-03 21:59:24 CET
Reboot normally, and the partitions are all "busy" again.
Comment 7 Samuel Verschelde 2015-05-17 00:42:00 CEST
Is this bug still happening in Mageia 5 RC?

Keywords: (none) => NEEDINFO

Comment 8 Frank Griffin 2015-05-20 13:54:55 CEST
The /dev/sda disk started to go bad, and /dev/sdb replaced it, so I can no longer test this.

I'd just be interested to hear if anyone knows why mount works differently in single-user mode and RL 3.  I've seen this "in use by the system" off and on over the years in other situations, and I've never understood what that means.

If no one knows, then I'm OK with WORKSFORME.
Comment 9 Nic Baxter 2016-01-04 03:08:33 CET
responding to previous comment

Status: NEW => RESOLVED
CC: (none) => nic
Resolution: (none) => WORKSFORME