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

mdadm takeover RAID 5 to RAID 1 hanging there.

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • rhel-9.4
    • 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?

      Please provide the package NVR for which bug is seen:

      kernel-5.14.0-427.el9.x86_64

      mdadm-4.2-10.el9.x86_64

       

      How reproducible:

      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?

      """

       

      //  After first umount command hanging there, re-ssh to the host.
      
      [root@amd-genoa-03 05-raid5]# lsblk
      NAME                         MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
      loop1                          7:1    0     2G  0 loop  
      └─md0                          9:0    0     2G  0 raid1 
      loop2                          7:2    0     2G  0 loop  
      └─md0                          9:0    0     2G  0 raid1 
      loop3                          7:3    0     2G  0 loop  
      └─md0                          9:0    0     2G  0 raid1 
      nvme0n1                      259:0    0 465.8G  0 disk  
      ├─nvme0n1p1                  259:1    0   600M  0 part  /boot/efi
      ├─nvme0n1p2                  259:2    0     1G  0 part  /boot
      └─nvme0n1p3                  259:3    0 464.2G  0 part  
        ├─rhel_amd--genoa--03-root 253:0    0    70G  0 lvm   /
        ├─rhel_amd--genoa--03-swap 253:1    0     4G  0 lvm   [SWAP]
        └─rhel_amd--genoa--03-home 253:2    0 390.2G  0 lvm   /home
      [root@amd-genoa-03 05-raid5]# umount /dev/md0 
      umount: /dev/md0: not mounted.
      [root@amd-genoa-03 05-raid5]# mdadm --stop /dev/md0 
      mdadm: Cannot get exclusive access to /dev/md0:Perhaps a running process, mounted filesystem or active volume group?
      [root@amd-genoa-03 05-raid5]# 
       

       

            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: