All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Berra <bluca@comedia.it>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] lvremove: 'snapshot': can't remove 'active'? , non-mounted file system
Date: Tue, 13 Jul 2010 08:34:13 +0200	[thread overview]
Message-ID: <20100713063413.GA14204@maude.comedia.it> (raw)
In-Reply-To: <4C29FE21.10600@tlinx.org>

On Tue, Jun 29, 2010 at 07:07:29AM -0700, Linda A. Walsh wrote:
> lvremove -v /dev/Home/2010.06.27-06.18.55
>    Using logical volume(s) on command line
>  Can't remove open logical volume "2010.06.27-06.18.55"
>
> But it isn't mounted.
>
> So why is it saying it is 'open':
something is using it
try looking in /sys/block/dm-4/holders, fuser, lsof ...

> ll /dev/mapper shows:
>
>
> crw-rw---- 1  10, 58 2010-02-02 21:08 control
> brw-r----- 1 252,  4 2010-02-02 21:08 Home-2010.06.27--06.18.55
> brw-r----- 1 252,  3 2010-02-02 21:08 Home-2010.06.27--06.18.55-cow
> brw-r----- 1 252,  2 2010-02-02 21:08 Home-Home
> brw-r----- 1 252,  1 2010-02-02 21:08 Home-Home-real
> brw-r----- 1 252,  0 2010-02-02 21:08 Home-Share
> brw-r----- 1 252,  5 2010-02-02 21:08 Space-Backup
> brw-r----- 1 252, 11 2010-06-29 06:40 Space-boot
> brw-r----- 1 252,  6 2010-06-29 06:40 Space-root
> brw-r----- 1 252,  7 2010-06-28 17:45 Space-Torrents
> brw-r----- 1 252,  8 2010-06-29 06:40 Space-usr
> brw-r----- 1 252,  9 2010-06-29 06:40 Space-var
> brw-r----- 1 252, 10 2010-06-29 06:40 Space-var_cache
>
> So 252 is the mapper device?

252 is the dynamic major assigned to device-mapper on your system

> Is my real Home partition on 252,1?
before you created the snapshot your Home device was
/dev/mapper/Home-Home (aka dm-2)
in order to create a snapshot lvm will use 4 devices
1) Home-Home-real (linear) which has the same mapping as Home-Home before the
    snapshot took place
2) Home-2010.06.27--06.18.55-cow (linear) which maps the space that will
    contains the COW data
3) Home-2010.06.27--06.18.55 (snapshot) this is a combination of (1) and
    (2) in order to show the visible snapshot
4) Home-Home (snapshot-origin) this device replaces your Home device
    (keeping the same minor number)

so after taking the snapshot your Home device is still
/dev/mapper/Home-Home, which maps to /dev/mapper/Home-Home-real, but
before any write to /dev/mapper/Home-Home-real the original data is
saved to Home-2010.06.27--06.18.55-cow, so Home-2010.06.27--06.18.55
(which is based on Home-Home-real and Home-2010.06.27--06.18.55-cow) will
not change

please look also at linux/Documentation/device-mapper/snapshot.txt

> I just got a backup error when I tried to backup Home,
> which would correspond to 252,2 above.  It thinks it
> is no longer the same file system as the previous backup,
details please

> Should I be backing up Home-Home-real?  That doesn't
> seem right...
usually one backs up the snapshot, which is supposed to be a
point-in-time copy of the original, so i think you should backup
Home-2010.06.27--06.18.55

L.

-- 
Luca Berra -- bluca@comedia.it
         Communication Media & Services S.r.l.
  /"\
  \ /     ASCII RIBBON CAMPAIGN
   X        AGAINST HTML MAIL
  / \

  reply	other threads:[~2010-07-13  6:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 14:07 [linux-lvm] lvremove: 'snapshot': can't remove 'active'? , non-mounted file system Linda A. Walsh
2010-07-13  6:34 ` Luca Berra [this message]
2010-07-13 10:23   ` Ray Morris

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=20100713063413.GA14204@maude.comedia.it \
    --to=bluca@comedia.it \
    --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.