in my bash script I want to add timeout for the lvresize command so if the command is waiting ,
I will exit after 5 second , as the follwing:
timeout 5 lvresize -L 1M /dev/mapper/rootvg-home Rounding size to boundary between physical extents: 32.00 MiB WARNING: Reducing active and open logical volume to 32.00 MiB THIS MAY DESTROY YOUR DATA (filesystem etc.) Do you really want to reduce home? [y/n]:
but from some unclear reason timeout not works on lvresize?
why? timeout not exit the command after 5 sec?