Resizing dmraid partition removes device path entry

Bug #1332139 reported by Curtis Gedak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gparted (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I booted my computer using the ubuntu-14.04-desktop-i386.iso image, and then tried to grow a 20 GiB ext4 partition to 40 GiB. Unfortunately this failed because at some point the underlying /dev/mapper partition entry disappeared.

Following are some details from before and after the grow operation:

*** Boot ubuntu 14.04 i386 from Live CD (before running GParted)

ubuntu@ubuntu:~$ ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Jun 12 16:43 control
brw-rw---- 1 root disk 252, 1 Jun 12 16:43 isw_efjbbijhh_Vol0
brw------- 1 root root 252, 0 Jun 12 16:43 isw_efjbbijhh_Vol0p1
ubuntu@ubuntu:~$ ls -l /dev/dm*
brw-rw---- 1 root disk 252, 0 Jun 12 16:43 /dev/dm-0
brw-rw---- 1 root disk 252, 1 Jun 12 16:43 /dev/dm-1
ubuntu@ubuntu:~$ ls -l /dev/md*
ls: cannot access /dev/md*: No such file or directory
ubuntu@ubuntu:~$

*** Start GParted, but do not perform any operations

ubuntu@ubuntu:~$ ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Jun 12 16:43 control
brw-rw---- 1 root disk 252, 1 Jun 12 16:43 isw_efjbbijhh_Vol0
brw------- 1 root root 252, 0 Jun 12 16:43 isw_efjbbijhh_Vol0p1
ubuntu@ubuntu:~$ ls -l /dev/dm*
brw-rw---- 1 root disk 252, 0 Jun 12 16:43 /dev/dm-0
brw-rw---- 1 root disk 252, 1 Jun 12 16:43 /dev/dm-1
ubuntu@ubuntu:~$ ls -l /dev/md*
ls: cannot access /dev/md*: No such file or directory
ubuntu@ubuntu:~$

*** Queue and Apply operation to grow ext4 partition from 20 GiB to 40 GiB
*** --> FAILS - see attached gparted_details-ubuntu1404-dm-grow.htm log file

ubuntu@ubuntu:~$ ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Jun 12 16:43 control
brw-rw---- 1 root disk 252, 1 Jun 12 16:50 isw_efjbbijhh_Vol0
ubuntu@ubuntu:~$ ls -l /dev/dm*
brw-rw---- 1 root disk 252, 0 Jun 12 16:50 /dev/dm-0
brw-rw---- 1 root disk 252, 1 Jun 12 16:43 /dev/dm-1
ubuntu@ubuntu:~$ ls -l /dev/md*
ls: cannot access /dev/md*: No such file or directory
ubuntu@ubuntu:~$

*** The missing entry can be re-added using kpartx

ubuntu@ubuntu:~$ sudo kpartx -l /dev/mapper/isw_efjbbijhh_Vol0
isw_efjbbijhh_Vol0p1 : 0 83886080 /dev/mapper/isw_efjbbijhh_Vol0 2048
ubuntu@ubuntu:~$ sudo kpartx -a /dev/mapper/isw_efjbbijhh_Vol0
ubuntu@ubuntu:~$ ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Jun 12 16:43 control
brw-rw---- 1 root disk 252, 1 Jun 12 16:50 isw_efjbbijhh_Vol0
brw-rw---- 1 root disk 252, 0 Jun 12 16:57 isw_efjbbijhh_Vol0p1
ubuntu@ubuntu:~$

*** I tried several other operations. The one thing in common is that the partition entry in /dev/mapper disappears whenever a change it made to it by GParted through the libparted library.

Revision history for this message
Curtis Gedak (gedakc) wrote :

gparted_details.htm log file that failed when attempting to grow an ext4 20 GiB dmraid partition to 40 GiB.

Revision history for this message
Phillip Susi (psusi) wrote :

Hi Curtis, are you still able to reproduce this? Do you have a dedicated machine for testing this on? If so, would you mind giving me remote access to debug it?

Revision history for this message
Curtis Gedak (gedakc) wrote :

Hi Phillip,

Good news! This problem does not exist with Ubuntu 15.10.

I booted my computer using the ubuntu-15.10-desktop-i386.iso image,
and then successfully grew a 20 GiB ext4 partition to 40 GiB on my
Intel Software RAID (Fake RAID).

Following are the details of the successful test.

*** Boot ubuntu 15.10 i386 from Live CD (before running GParted)

ubuntu@ubuntu:~$ ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Nov 11 21:40 control
brw-rw---- 1 root disk 252, 1 Nov 11 21:39 isw_efjbbijhh_Vol0
lrwxrwxrwx 1 root root 7 Nov 11 21:40 isw_efjbbijhh_Vol0p1 -> ../dm-0
ubuntu@ubuntu:~$ ls -l /dev/dm*
brw-rw---- 1 root disk 252, 0 Nov 11 21:40 /dev/dm-0
brw-rw---- 1 root disk 252, 1 Nov 11 21:40 /dev/dm-1
ubuntu@ubuntu:~$

*** Use GParted to queue and apply operation to grow ext4 partition
    from 20 GiB to 40 GiB

ubuntu@ubuntu:~$ sudo gparted
======================
libparted : 3.2
======================
ubuntu@ubuntu:~$

*** SUCCESS!

*** Device entries after successful resize.

ubuntu@ubuntu:~$ ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Nov 11 21:40 control
brw-rw---- 1 root disk 252, 1 Nov 11 21:46 isw_efjbbijhh_Vol0
lrwxrwxrwx 1 root root 7 Nov 11 21:47 isw_efjbbijhh_Vol0p1 -> ../dm-0
ubuntu@ubuntu:~$ ls -l /dev/dm*
brw-rw---- 1 root disk 252, 0 Nov 11 21:47 /dev/dm-0
brw-rw---- 1 root disk 252, 1 Nov 11 21:40 /dev/dm-1
ubuntu@ubuntu:~$

Based on this test I suggest this problem be closed as resolved with
ubuntu 15.10. :-)

Curtis

Revision history for this message
Phillip Susi (psusi) wrote :

That is good, but does it still exist on 14.04?

Revision history for this message
Curtis Gedak (gedakc) wrote :

I don't have 14.04 installed on this computer. I tested using the ubuntu-14.04-desktop-i386.iso live image.

Did you change anything in libparted for ubuntu 14.04 since it was first released?

If you like I can test using the ubuntu-14.04.3-desktop-i386.iso live image.

Revision history for this message
Phillip Susi (psusi) wrote :

That would be great. If it still is a problem in 14.04.3 it would be good to get it fixed there since it is an LTS and will still be supported for a few more years.

Revision history for this message
Curtis Gedak (gedakc) wrote :

Hi Phillip,

I tested growing an ext4 file system from 20 GiB to 40 GiB on Intel Software RAID (Fake RAID) using the ubuntu-14.04.3-desktop-i386.iso image and all worked as it should. :-)

Hence in my opinion this bug can be closed.

Curtis

Revision history for this message
Phillip Susi (psusi) wrote :

Thanks Curtis.

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

Other bug subscribers

Remote bug watches

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