linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Jonathan Tripathy <jonnyt@abpni.co.uk>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] Snapshots and disk re-use
Date: Wed, 06 Apr 2011 02:45:14 +0100	[thread overview]
Message-ID: <4D9BC5AA.6050306@abpni.co.uk> (raw)
In-Reply-To: <4D9BBFF9.3040706@ankh.org>



On 06/04/2011 02:20, James Hawtin wrote:
> On 06/04/2011 00:50, Jonathan Tripathy wrote:
>>
>> If the PV used for snapshots were to fail while the snapshot was 
>> open, or the server rebooted and the PV wasn't available at boot, 
>> what would happen? I ask these questions because a loopback device or 
>> iSCSI is really my only feasible option right now for the snapshot PV...
>
> What would happen is... if the file systems are mounted at boot time 
> (in  the fstab) it will fail the fsck because the device is not there. 
> and drop to single user mode, you could then edit the fstab to to 
> remove those file systems that would bring the system online, at which 
> point you could fix what stopped the iscsi from working, and mount the 
> file systems.
>
> At one place I worked they never mounted the data file systems at 
> "boot" but in a rc.local so the system always got to be interactive 
> before any problems so it was easy to go in and fix.
Since my vg is used purly for virtualisation, I don't mount any LVs in 
fstab in my host OS. LVs only get mounted once VMs start up.
>
> DO NOT... create a loop back device on the same on a file system that 
> the loopback that will then form a pv of, if you do your system is 
> DOOOMMMED! to get it to boot again your have to mount a part volume 
> group and block copy the devices to a new one, even worse if you 
> extended the file system with the loop back on it onto the pv of the 
> loop back it will NEVER work again. So the only place you can create a 
> loopback device is outside of a vg it is to be a part of and frankley 
> better that its in NO vg as you may get recursion problems.
Oh no, wouldn't dare to do that :) I was thinking of creating the image 
file on a non-LVM area of the drive (somewhere in the host OS partition)
>
> The problem with a loop back is that you need to do a the loopback 
> setup to enable the device before the vgscan and vgchange can bring it 
> online in the volume, very hard to get right at boot time.  If you 
> have partitioned it you will also need to do kpartx.
Well I wouldn't partition the image file, seems more trouble than it's 
worth. I did find an article from Novell that seems to guide me through 
what to do if my machine were to reboot with a PV missing:

http://www.novell.com/coolsolutions/appnote/19386.html

>
> If you use loopbacks i  would extend the volume group onto the disk 
> only during backups then nreduce it out afterwards to reduce risks.
Good Idea.

  reply	other threads:[~2011-04-06  1:45 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23 12:36 [linux-lvm] Snapshots and disk re-use Jonathan Tripathy
2011-02-23 13:09 ` Joe Thornber
2011-02-23 13:57   ` Jonathan Tripathy
2011-02-23 14:16     ` Joe Thornber
2011-02-23 14:18       ` Jonathan Tripathy
2011-02-23 16:12         ` Ray Morris
2011-02-23 16:55           ` Jonathan Tripathy
2011-02-23 17:54             ` Stuart D. Gathman
2011-02-23 18:05               ` Jonathan Tripathy
2011-02-23 19:34                 ` Stuart D. Gathman
2011-02-23 18:05               ` Stuart D. Gathman
2011-02-23 18:19                 ` Jonathan Tripathy
2011-02-23 18:39                   ` Les Mikesell
2011-02-23 19:39                     ` Stuart D. Gathman
2011-02-23 20:03                       ` Les Mikesell
2011-02-23 20:37                         ` Stuart D. Gathman
2011-02-23 20:49                           ` Jonathan Tripathy
2011-02-23 23:25                             ` Stuart D. Gathman
2011-02-23 23:42                               ` Stuart D. Gathman
2011-02-24  0:09                               ` Jonathan Tripathy
2011-02-24  0:32                                 ` Stuart D. Gathman
2011-02-24  0:37                                   ` Jonathan Tripathy
2011-02-24  0:40                                     ` Jonathan Tripathy
2011-02-24  2:00                                       ` Stuart D. Gathman
2011-02-24  7:33                                         ` Jonathan Tripathy
2011-02-24 14:50                                           ` Stuart D. Gathman
2011-02-24 14:57                                             ` Jonathan Tripathy
2011-02-24 15:13                                               ` Stuart D. Gathman
2011-02-24 15:20                                                 ` Jonathan Tripathy
2011-02-24 16:41                                                   ` Jonathan Tripathy
2011-02-24 19:15                                                     ` Nataraj
2011-02-24 19:25                                                       ` Les Mikesell
2011-02-24 19:55                                                       ` Stuart D. Gathman
2011-02-24 19:19                                                     ` Stuart D. Gathman
2011-02-24 19:45                                                   ` Stuart D. Gathman
2011-02-24 21:22                                                     ` Jonathan Tripathy
2011-04-05 20:09                                                   ` Jonathan Tripathy
2011-04-05 20:41                                                     ` Stuart D. Gathman
2011-04-05 20:48                                                       ` Jonathan Tripathy
2011-04-05 20:59                                                         ` James Hawtin
2011-04-05 21:36                                                           ` Jonathan Tripathy
2011-04-05 22:42                                                             ` James Hawtin
2011-04-05 22:52                                                               ` Jonathan Tripathy
2011-04-05 23:11                                                                 ` James Hawtin
2011-04-05 23:19                                                                   ` Jonathan Tripathy
2011-04-05 23:39                                                                     ` James Hawtin
2011-04-06  0:00                                                                       ` Jonathan Tripathy
2011-04-06  0:08                                                                         ` Stuart D. Gathman
2011-04-06  0:14                                                                           ` Jonathan Tripathy
2011-04-06  0:16                                                                         ` James Hawtin
2011-04-06  0:28                                                                           ` Jonathan Tripathy
2011-04-06  0:38                                                                             ` Stuart D. Gathman
2011-04-06  0:43                                                                               ` Stuart D. Gathman
2011-04-06  1:36                                                                                 ` James Hawtin
2011-04-06  1:47                                                                                   ` Jonathan Tripathy
2011-04-06  1:53                                                                                     ` James Hawtin
2011-04-06  0:47                                                                               ` Jonathan Tripathy
2011-04-06  0:42                                                                             ` James Hawtin
2011-04-06  0:50                                                                               ` Jonathan Tripathy
2011-04-06  1:20                                                                                 ` James Hawtin
2011-04-06  1:45                                                                                   ` Jonathan Tripathy [this message]
2011-02-23 19:49                     ` Nataraj
2011-02-23 19:24                   ` Stuart D. Gathman
2011-02-23 19:07                 ` [linux-lvm] Problem executing lvm related commands Tinni
2011-02-23 19:33               ` [linux-lvm] Snapshots and disk re-use Phillip Susi
2011-02-23 19:45                 ` Stuart D. Gathman
2011-02-23 19:56                   ` Nataraj
2011-02-23 13:18 ` Sunil_Gupta2

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=4D9BC5AA.6050306@abpni.co.uk \
    --to=jonnyt@abpni.co.uk \
    --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 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).