Fedora 30, pc wont poweroff

Hi,

when I shutdown the pc, screen and fans remain on, the system does not go down until I press the power button.

Reboot the system works well.

If I press “esc” during fedora shutdown splash screen, this is the output:
Imgur

Ho can I troubleshoot and resolve this problem?

You could try the journalctl --system command to review your system logs add a -r to get it in reverse order (newest first).

device-mapper: remove ioctl on fedora-root failed: Device or resource busy

Try to wait for ~10-20 minutes and see if there’s any change.

yeah, after a while the pc shuts down.
How can I understand the problem?

This is an example of my journalctl, nothing interesting, maybe because Journal stops before the poweroff

$ sudo journalctl -b -1 -r
-- Logs begin at Sat 2019-05-25 13:13:29 CEST, end at Mon 2019-07-22 20:55:05 CEST. --
Jul 22 20:47:12 toaster-tonedomain systemd-journald[665]: Journal stopped
Jul 22 20:47:12 toaster-tonedomain systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Jul 22 20:47:12 toaster-tonedomain systemd-shutdown[1]: Syncing filesystems and block devices.
Jul 22 20:47:12 toaster-tonedomain kernel: printk: systemd-shutdow: 70 output lines suppressed due to ratelimiting
Jul 22 20:47:12 toaster-tonedomain systemd[1]: Shutting down.
Jul 22 20:47:12 toaster-tonedomain systemd[1]: Stopping LVM2 metadata daemon...
Jul 22 20:47:12 toaster-tonedomain kernel: audit: type=1130 audit(1563821232.383:401): pid=1 uid=0 auid=4294967295 ses>
Jul 22 20:47:12 toaster-tonedomain systemd[1]: Reached target Power-Off.
Jul 22 20:47:12 toaster-tonedomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:sys>
Jul 22 20:47:12 toaster-tonedomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:sy>
Jul 22 20:47:12 toaster-tonedomain systemd[1]: Started Power-Off.
Jul 22 20:47:12 toaster-tonedomain systemd[1]: systemd-poweroff.service: Succeeded.
Jul 22 20:47:12 toaster-tonedomain systemd[1]: Reached target Final Step.
Jul 22 20:47:12 toaster-tonedomain systemd[1]: Reached target Shutdown.

@tonetonetone there is a bug that existed in Fedora 28, but was newer solved.

Here is a link referring to the bug you have
https://bugzilla.redhat.com/show_bug.cgi?id=1402073

I have the same messages when shutting down Fedora 30, but the shutdown newer hangs, the messages appear and the PC turns itself off.

Hello @tonetonetone,
Could you try to shut down the system from a terminal with systemctl poweroff instead of the power down icon? I’m curious if you get to any erro output from systemctl.

I launched systemctl poweroff, but i cannot see any output, it switch imediately to the shut down screen (plymouth).

Hello @tonetonetone,
Perhaps if you open a terminal and use the following command journalctl --system -S today to review your system journal for today, you could find an error or errors that point to what is going on.

1 Like

Like previous post, nothing interesting in journalctl, theese are the lastest lines:

Aug 23 21:12:12 toaster-tonedomain systemd[1]: Reached target Shutdown.
Aug 23 21:12:12 toaster-tonedomain kernel: audit: type=1131 audit(1566587532.018:358): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-remount-fs comm="systemd" exe="/usr/lib/systemd/systemd" >
Aug 23 21:12:12 toaster-tonedomain systemd[1]: Reached target Final Step.
Aug 23 21:12:12 toaster-tonedomain systemd[1]: systemd-poweroff.service: Succeeded.
Aug 23 21:12:12 toaster-tonedomain systemd[1]: Started Power-Off.
Aug 23 21:12:12 toaster-tonedomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-poweroff comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? r>
Aug 23 21:12:12 toaster-tonedomain systemd[1]: Reached target Power-Off.
Aug 23 21:12:12 toaster-tonedomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-poweroff comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? re>
Aug 23 21:12:12 toaster-tonedomain kernel: audit: type=1130 audit(1566587532.023:359): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-poweroff comm="systemd" exe="/usr/lib/systemd/systemd" ho>
Aug 23 21:12:12 toaster-tonedomain kernel: audit: type=1131 audit(1566587532.023:360): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-poweroff comm="systemd" exe="/usr/lib/systemd/systemd" ho>
Aug 23 21:12:12 toaster-tonedomain systemd[1]: Shutting down.
Aug 23 21:12:12 toaster-tonedomain lvm[3329]:   1 logical volume(s) in volume group "vg_raid" unmonitored
Aug 23 21:12:12 toaster-tonedomain lvm[3329]:   3 logical volume(s) in volume group "fedora" unmonitored
Aug 23 21:12:12 toaster-tonedomain kernel: printk: systemd-shutdow: 69 output lines suppressed due to ratelimiting
Aug 23 21:12:12 toaster-tonedomain systemd-shutdown[1]: Syncing filesystems and block devices.
Aug 23 21:12:12 toaster-tonedomain systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Aug 23 21:12:12 toaster-tonedomain systemd-journald[663]: Journal stopped

It’s likely a deactivation timeout for some unit.
Make sure all network file systems are successfully unmounted beforehand.
It might also be something closely related to hardware such as RAID, IPMI, etc.

What kind of RAID is this?
Try to disable the RAID if possible and test without this VG.

It’s a raid with mdadm:

$ lsblk
NAME                   MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
[...]
sdb                      8:16   0 931.5G  0 disk  
└─sdb1                   8:17   0 931.5G  0 part  
  └─md0                  9:0    0 931.4G  0 raid1 
    └─vg_raid-lv_data0 253:2    0   500G  0 lvm   
sdc                      8:32   0 931.5G  0 disk  
└─sdc1                   8:33   0 931.5G  0 part  
  └─md0                  9:0    0 931.4G  0 raid1 
    └─vg_raid-lv_data0 253:2    0   500G  0 lvm 

$ sudo mdadm --detail /dev/md0
/dev/md0:
           Version : 1.2
     Creation Time : Mon May 13 22:09:50 2019
        Raid Level : raid1
        Array Size : 976629440 (931.39 GiB 1000.07 GB)
     Used Dev Size : 976629440 (931.39 GiB 1000.07 GB)
      Raid Devices : 2
     Total Devices : 2
       Persistence : Superblock is persistent

     Intent Bitmap : Internal

       Update Time : Mon Aug 26 22:58:43 2019
             State : clean 
    Active Devices : 2
   Working Devices : 2
    Failed Devices : 0
     Spare Devices : 0

Consistency Policy : bitmap

              Name : toaster-tonedomain:0  (local to host toaster-tonedomain)
              UUID : 4709cbb9:aecaa9e2:f5889d7f:c6207b4f
            Events : 2960

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1

It was created like this:

sudo mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd[bc]1

Then I created pv, vg amd lv upon it:

sudo pvcreate /dev/md0
sudo pvdisplay
sudo vgcreate vg_raid /dev/md0
sudo vgdisplay
sudo lvcreate -L 500G vg_raid -n lv_data0
sudo lvdysplay
sudo mkfs.xfs /dev/vg_raid/lv_data0

I note now that when I use pvs, vgs and lvs commands, I cannot display raid vg and lv infos:

# pvs --all
  PV                    VG     Fmt  Attr PSize   PFree
  /dev/fedora/home                  ---       0     0 
  /dev/fedora/root                  ---       0     0 
  /dev/fedora/swap                  ---       0     0 
  /dev/md0                          ---       0     0 
  /dev/sda1             fedora lvm2 a--  231.88g    0 
  /dev/sda2                         ---       0     0 
  /dev/vg_raid/lv_data0             ---       0     0 
# vgs --all
  VG     #PV #LV #SN Attr   VSize   VFree
  fedora   1   3   0 wz--n- 231.88g    0 
# lvs --all
  LV   VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home fedora -wi-ao---- 154.05g                                                    
  root fedora -wi-ao----  70.00g                                                    
  swap fedora -wi-ao----  <7.83g

How about vgdisplay and lvdisplay?

It may be a race condition with the RAID assemble task leading to the deactivation timeout issue.

Hello @tonetonetone,

Sorry I haven’t been as active here lately. I too have had sometimes where the PC pauses at shutdown, and switching to tty2 see there are stop job’s waiting to be completed, often many of them are seemingly related as once one finally stops the rest fall in line and the system halts. In my case this often times seems to relate to my oddball MoBo and the AMD not quite right ACPI Tables.

1 Like

Here is the output:

$ sudo vgdisplay vg_raid
  --- Volume group ---
  VG Name               vg_raid
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               931.38 GiB
  PE Size               4.00 MiB
  Total PE              238434
  Alloc PE / Size       128000 / 500.00 GiB
  Free  PE / Size       110434 / 431.38 GiB
  VG UUID               lmGak5-0Y9O-Q5lc-hRlt-ErIm-8Z06-bqkhvX
$ sudo lvdisplay /dev/vg_raid/lv_data0
  --- Logical volume ---
  LV Path                /dev/vg_raid/lv_data0
  LV Name                lv_data0
  VG Name                vg_raid
  LV UUID                t05goS-ud4O-4Qd9-2VR4-MhIT-0E2l-Sex32t
  LV Write Access        read/write
  LV Creation host, time toaster-tonedomain, 2019-05-13 22:17:56 +0200
  LV Status              available
  # open                 0
  LV Size                500.00 GiB
  Current LE             128000
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3
1 Like

Try to rescan and check the consistency of VGs:

sudo vgmknodes -vvvv --refresh
sudo vgck -vvvv
sudo vgs -a

so, i launch the commands, there is a lot of output, I report all output at this link
https://drive.google.com/open?id=1XxBaXW4An4COupCoa_RxOW96KcF1JQs0

ok, i noted that sometimes sudo vgs -a displays vg_raid and sometimes not.

I rebooted the system, then

$ sudo vgs -a
  VG      #PV #LV #SN Attr   VSize   VFree  
  fedora    1   3   0 wz--n- 231.88g      0 
  vg_raid   1   1   0 wz--n- 931.38g 431.38g
$ sudo vgdisplay vg_raid
  --- Volume group ---
  VG Name               vg_raid
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               931.38 GiB
  PE Size               4.00 MiB
  Total PE              238434
  Alloc PE / Size       128000 / 500.00 GiB
  Free  PE / Size       110434 / 431.38 GiB
  VG UUID               lmGak5-0Y9O-Q5lc-hRlt-ErIm-8Z06-bqkhvX

I’m not very sure what is going on, but maibe I can destroy my raid, add a disk then recreate the raid with lvm (one disc for raid logs) and not use mdadm.

1 Like

Nope, now i have no disks in raid at all:

$ cat /proc/mdstat
Personalities : 
unused devices: <none>

The problem persists.

1 Like