Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-29428

mdadm takeover RAID 5 to RAID 1 hanging there.

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • rhel-8.8.0
    • mdadm
    • None
    • None
    • None
    • sst_logical_storage
    • ssg_filesystems_storage_and_HA
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      RHEL-8.10.0-20240301.1

      Kernel-4.18.0-544.el8.x86_64

      mdadm-4.2-13.el8.x86_64

      Please provide the package NVR for which bug is seen:

      Actually running:

      https://gitlab.cee.redhat.com/kernel-qe/kernel/-/blob/master/storage/mdadm/20230831-new/05-raid5/0512-raid5_takeover_5_to_1.sh?ref_type=heads

       

      Steps to reproduce

      1.  Create a RAID 5 with 3  2GB loop devices first  .
        1. mdadm -CR /dev/md0 -l 5 -n 3 /dev/loop1 /dev/loop2 /dev/loop3
      2. mkfs.ext4 mount to the mount point
        1. mkdir -p /mnt/md_test
        2. mkfs.ext4 /dev/md0
        3. mount /dev/md0 /mnt/md_test
      3. Takeover RAID 5 to RAID 1
        1. mdadm --grow /dev/md0 --array-size 2094080
        2. mdadm --grow -n 2 /dev/md0 --backup=internal
        3. mdadm --grow /dev/md0 -l1
      4. Trying to umount or stop the /dev/md0 device
        1. umount /dev/md0
        2. mdadm --stop /dev/md0

      Expected results

      umount successfully ,and stop the mdadm device successfully.

      Actual results

      When umount , it hanging there. I have to close my terminal then re-ssh to the host .checkout the mount status with lsblk , the mount point doesn't mount yet. but when I trying to mdadm --stop /dev/md0 got below error.

      """

      mdadm: Cannot get exclusive access to /dev/md0:Perhaps a running process, mounted filesystem or active volume group?

      """

       

      // code placeholder
      
      [root@el810-202403011 20230831-new]# lsblk
      NAME          MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
      loop1           7:1    0    2G  0 loop  
      └─md0           9:0    0    2G  0 raid1 /mnt/md_test
      loop2           7:2    0    2G  0 loop  
      └─md0           9:0    0    2G  0 raid1 /mnt/md_test
      loop3           7:3    0    2G  0 loop  
      └─md0           9:0    0    2G  0 raid1 /mnt/md_test
      sda             8:0    0   50G  0 disk  
      ├─sda1          8:1    0  600M  0 part  /boot/efi
      ├─sda2          8:2    0    1G  0 part  /boot
      └─sda3          8:3    0 48.4G  0 part  
        ├─rhel-root 253:0    0 46.4G  0 lvm   /
        └─rhel-swap 253:1    0  2.1G  0 lvm   [SWAP]
      sr0            11:0    1 1024M  0 rom   
      [root@el810-202403011 20230831-new]# umount /dev/md0 
      umount: /mnt/md_test: target is busy.
      [root@el810-202403011 20230831-new]# mdadm --stop /dev/md0 
      mdadm: Cannot get exclusive access to /dev/md0:Perhaps a running process, mounted filesystem or active volume group?
      [root@el810-202403011 20230831-new]# 
      
      
      

       

            ncroxon@redhat.com Nigel Croxon
            fan.fan Fan Fan
            Nigel Croxon Nigel Croxon
            Fan Fan Fan Fan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: