vgchange -a n --sysinit hangs without udevd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux