From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] problem with lvcreate and redirection
Date: Sat, 20 Feb 2016 16:04:34 +0100 [thread overview]
Message-ID: <56C88082.4010404@gmail.com> (raw)
In-Reply-To: <724866179.5061938.1455974751462.JavaMail.zimbra@helmholtz-muenchen.de>
Dne 20.2.2016 v 14:25 Lentes, Bernd napsal(a):
>
>
> ----- Am 19. Feb 2016 um 21:31 schrieb Zdenek Kabelac zdenek.kabelac@gmail.com:
>
>> Dne 19.2.2016 v 19:40 Lentes, Bernd napsal(a):
>>> 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.
>>>
>>> last lines of the log:
>>> ======================================================
>>>
>>> ...
>>> 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 volume
>> 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
>>
>
> Hi Zdenek,
>
> thanks for your answer. I redirected the output already to another partition, but system still stopped. Maybe because the partition is on the same disk as the lv ? Whole disk is suspended ? It's not possible to suspend just a partition ? I will try with tmpfs or something else.
> But does that mean that redirection is generally not possible when suspending a lv ? Or just in my case because i invoke lvcreate ? What is about other programs having redirections during the suspend ? And why does it work when i just rediredt stdout ? When i redirect stdout and stderr system stops.
>
Your 'partition' layout isn't clear - but anyway - debugging command when you
run it from a partition you try to suspend is 'tricky'.
Suspend basically stops any read/write operation from suspended device.
So you just need to be sure there is nothing on logging path which might be
blocked.
So is your command blocked when you log into ramdisk ?
Are you using some recent version of lvm2 ?
Zdenek
next prev parent reply other threads:[~2016-02-20 15:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-19 18:40 [linux-lvm] problem with lvcreate and redirection Lentes, Bernd
2016-02-19 20:31 ` Zdenek Kabelac
2016-02-20 4:52 ` Марк Коренберг
2016-02-20 13:25 ` Lentes, Bernd
2016-02-20 15:04 ` Zdenek Kabelac [this message]
2016-02-20 16:50 ` Lentes, Bernd
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=56C88082.4010404@gmail.com \
--to=zdenek.kabelac@gmail.com \
--cc=linux-lvm@redhat.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.