linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Arkadiusz Miśkiewicz" <arekm@maven.pl>
To: linux-lvm@redhat.com
Subject: [linux-lvm] vgchange -a n --sysinit hangs without udevd
Date: Wed, 22 Sep 2021 09:19:02 +0200	[thread overview]
Message-ID: <fd7cf93d-4f51-28a9-d7a8-dd61fd59268b@maven.pl> (raw)


Hello.

Linux 5.10.67, glibc 2.34, lvm 2.03.13, udevd 246, simple init script
run on shutdown which does

vgchange -a n --sysinit

no other processes are running (just init, my script and vgchange),
vgstorage is vg on md raid 10 on 4 hdd disks.

it hangs with

+ /sbin/vgchange -a n --sysinit --verbose --debug
  Failed to find sysfs mount point
  No proc filesystem found: skipping sysfs filter
  No proc filesystem found: skipping multipath filter
  File locking initialisation failed.
  Deactivating logical volume vgstorage/lvhome.
  Removing vgstorage-lvhome (253:0)
  Deactivated 1 logical volumes in volume group vgstorage.

Note that running
vgchange -a n --sysinit --verbose --debug
on fully running system just works fine:

# vgchange -a n --sysinit --verbose --debug
  Deactivating logical volume vgstorage/lvhome.
  Removing vgstorage-lvhome (253:0)
  Deactivated 1 logical volumes in volume group vgstorage.
  0 logical volume(s) in volume group "vgstorage" now active
#


so I've restarted udevd just before vgchange call in my script and it
works.

Other test:

fully running system
# udevd --version
246
# killall udevd
# vgchange -a n --sysinit --verbose --debug
  Deactivating logical volume vgstorage/lvhome.
  Removing vgstorage-lvhome (253:0)
  Deactivated 1 logical volumes in volume group vgstorage.
and hangs


Why is udevd needed for vgchange there? It wasn't needed to deactivate
vg before AFAIK.


strace


> ioctl(3, DM_DEV_STATUS, {version=[4, 0, 0], data_size=2048, uuid="LVM-RHsosDyNlYziYbg37wzJcScURBWTgIsLKKLTWRdexUv1xoTudaMvkeXcNyg5JQiC-real", flags=DM_EXISTS_FLAG} => {version=[4, 43, 0], data_size=2048, uuid="LVM-RHsosDyNlYziYbg37wzJcScURBWTgIsLKKLTWRdexUv1xoTudaMvkeXcNyg5JQiC-real", flags=DM_EXISTS_FLAG}) = -1 ENXIO (No such device or address)
> ioctl(3, DM_DEV_STATUS, {version=[4, 0, 0], data_size=2048, uuid="LVM-RHsosDyNlYziYbg37wzJcScURBWTgIsLKKLTWRdexUv1xoTudaMvkeXcNyg5JQiC-cow", flags=DM_EXISTS_FLAG} => {version=[4, 43, 0], data_size=2048, uuid="LVM-RHsosDyNlYziYbg37wzJcScURBWTgIsLKKLTWRdexUv1xoTudaMvkeXcNyg5JQiC-cow", flags=DM_EXISTS_FLAG}) = -1 ENXIO (No such device or address)
> ioctl(3, DM_DEV_STATUS, {version=[4, 0, 0], data_size=2048, dev=makedev(0xfd, 0), flags=DM_EXISTS_FLAG|DM_PERSISTENT_DEV_FLAG} => {version=[4, 43, 0], data_size=305, dev=makedev(0xfd, 0), name="vgstorage-lvhome", uuid="LVM-RHsosDyNlYziYbg37wzJcScURBWTgIsLKKLTWRdexUv1xoTudaMvkeXcNyg5JQiC", target_count=1, open_count=0, event_nr=0, flags=DM_EXISTS_FLAG|DM_PERSISTENT_DEV_FLAG|DM_ACTIVE_PRESENT_FLAG}) = 0
> write(2, "  ", 2  )                       = 2
> write(2, "Removing vgstorage-lvhome (253:0)", 33Removing vgstorage-lvhome (253:0)) = 33
> write(2, "\n", 1
> )                       = 1
> openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 4
> read(4, "M\277", 2)                     = 2
> semget(0xd4dbf4d, 1, IPC_CREAT|IPC_EXCL|0600) = 1
> semctl(1, 0, SETVAL, 0x1)               = 0
> semctl(1, 0, GETVAL, NULL)              = 1
> close(4)                                = 0
> semtimedop(1, [{sem_num=0, sem_op=1, sem_flg=0}], 1, NULL) = 0
> semctl(1, 0, GETVAL, NULL)              = 2
> ioctl(3, DM_DEV_REMOVE, {version=[4, 0, 0], data_size=2048, dev=makedev(0xfd, 0), event_nr=6340429, flags=DM_EXISTS_FLAG|DM_PERSISTENT_DEV_FLAG|DM_SKIP_BDGET_FLAG} => {version=[4, 43, 0], data_size=305, dev=makedev(0xfd, 0), name="vgstorage-lvhome", uuid="LVM-RHsosDyNlYziYbg37wzJcScURBWTgIsLKKLTWRdexUv1xoTudaMvkeXcNyg5JQiC", flags=DM_EXISTS_FLAG|DM_PERSISTENT_DEV_FLAG|DM_SKIP_BDGET_FLAG|DM_UEVENT_GENERATED_FLAG}) = 0
> brk(0x55a3f9c90000)                     = 0x55a3f9c90000
> brk(0x55a3f9c88000)                     = 0x55a3f9c88000
> ioctl(3, DM_DEV_STATUS, {version=[4, 0, 0], data_size=2048, uuid="LVM-RHsosDyNlYziYbg37wzJcScURBWTgIsLKKLTWRdexUv1xoTudaMvkeXcNyg5JQiC", flags=DM_EXISTS_FLAG|DM_SKIP_BDGET_FLAG} => {version=[4, 43, 0], data_size=2048, uuid="LVM-RHsosDyNlYziYbg37wzJcScURBWTgIsLKKLTWRdexUv1xoTudaMvkeXcNyg5JQiC", flags=DM_EXISTS_FLAG|DM_SKIP_BDGET_FLAG}) = -1 ENXIO (No such device or address)
> rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
> rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f00fed2b480}, NULL, 8) = 0
> rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f00fed2b480}, NULL, 8) = 0
> write(2, "  ", 2  )                       = 2
> write(2, "Deactivated 1 logical volumes in volume group vgstorage.", 56Deactivated 1 logical volumes in volume group vgstorage.) = 56
> write(2, "\n", 1
> )                       = 1
> setpriority(PRIO_PROCESS, 0, 0)         = 0
> semget(0xd4dbf4d, 1, 000)               = 1
> semctl(1, 0, GETVAL, NULL)              = 2
> semtimedop(1, [{sem_num=0, sem_op=-1, sem_flg=IPC_NOWAIT}], 1, NULL) = 0
> semtimedop(1, [{sem_num=0, sem_op=0, sem_flg=0}], 1, NULL



-- 
Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org )

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

             reply	other threads:[~2021-09-22  7:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22  7:19 Arkadiusz Miśkiewicz [this message]
2021-09-22  7:40 ` Arkadiusz Miśkiewicz
2021-09-23 13:49 ` Zdenek Kabelac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fd7cf93d-4f51-28a9-d7a8-dd61fd59268b@maven.pl \
    --to=arekm@maven.pl \
    --cc=linux-lvm@redhat.com \
    --subject='Re: [linux-lvm] vgchange -a n --sysinit hangs without udevd' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).