Марк Коренберг
2016-02-20 04:52:03 UTC
Hi,
i have a script in which i invoke lvremove and lvcreate. With lvremove i don't have proplems but with lvcreate.
I'm redirecting stdout and stderr to a file because the script is executed by cron and i'd like to have a look afterwards if everything went fine.
The command is: lvcreate -v -L 25G -n lv_root_snapshot -s vg1/lv_root > lvcreate_with_redirection.log 2>&1. Shell does not accept further commands afterwards, but host still responds to ping. You can have a look on lvcreate_with_redirection.log here: https://hmgubox.helmholtz-muenchen.de:8001/d/b4c7025bac/ .
System seems to stop while suspending.
======================================================
...
Creating vg1-lv_root_snapshot-cow
Loading vg1-lv_root_snapshot-cow table (252:3)
Resuming vg1-lv_root_snapshot-cow (252:3)
Loading vg1-lv_root_snapshot table (252:1)
Suspending vg1-lv_root (252:0) with filesystem sync with device flush
======================================================
Unfortunately you can't do that if you log to the SAME volume you are suspending - i.e. you run your command from your root volumei have a script in which i invoke lvremove and lvcreate. With lvremove i don't have proplems but with lvcreate.
I'm redirecting stdout and stderr to a file because the script is executed by cron and i'd like to have a look afterwards if everything went fine.
The command is: lvcreate -v -L 25G -n lv_root_snapshot -s vg1/lv_root > lvcreate_with_redirection.log 2>&1. Shell does not accept further commands afterwards, but host still responds to ping. You can have a look on lvcreate_with_redirection.log here: https://hmgubox.helmholtz-muenchen.de:8001/d/b4c7025bac/ .
System seems to stop while suspending.
======================================================
...
Creating vg1-lv_root_snapshot-cow
Loading vg1-lv_root_snapshot-cow table (252:3)
Resuming vg1-lv_root_snapshot-cow (252:3)
Loading vg1-lv_root_snapshot table (252:1)
Suspending vg1-lv_root (252:0) with filesystem sync with device flush
======================================================
which is also suspended.
We could likely 'buffer' the output while in suspend mode,
and throw out the output later - but as this is seen as 'debug' help it's assume user takes care and user place for logging which doesn't block.
So if you want to see logs - use something tmpfs location for it.
Regards
Zdenek
_______________________________________________
linux-lvm mailing list
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Zdenek
_______________________________________________
linux-lvm mailing list
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/