[linux-lvm] Re: linux-lvm Digest, Vol 22, Issue 5

neelima dahiya neelima.dahiya at gmail.com
Wed Dec 7 08:54:39 UTC 2005


hi

i am totally new to the field of system programming...........
i wanna know about the device mapper  per se ...........

can anyone guide me how to approach the task...........

pls reply
Neelima


On 12/7/05, linux-lvm-request at redhat.com <linux-lvm-request at redhat.com>
wrote:
>
> Send linux-lvm mailing list submissions to
>        linux-lvm at redhat.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://www.redhat.com/mailman/listinfo/linux-lvm
> or, via email, send a message with subject or body 'help' to
>        linux-lvm-request at redhat.com
>
> You can reach the person managing the list at
>        linux-lvm-owner at redhat.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of linux-lvm digest..."
>
>
> Today's Topics:
>
>   1. Re: Which size for snapshot volume for a *safe* backup?
>      (Alasdair G Kergon)
>   2. Re: Which size for snapshot volume for a *safe* backup?
>      (Alasdair G Kergon)
>   3. Re: Dumb LVM question (Heinz Mauelshagen)
>   4. Re: Which size for snapshot volume for a *safe* backup?
>      (Marc-Jano Knopp)
>   5. invalid lv in extent map (Greg Freemyer)
>   6. LVM problems (Kelly Harding)
>   7. Re: invalid lv in extent map (Greg Freemyer)
>   8. Re: LVM problems (Kelly Harding)
>   9. Re: LVM problems (Anil Kumar Sharma)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 6 Dec 2005 01:03:58 +0000
> From: Alasdair G Kergon <agk at redhat.com>
> Subject: Re: [linux-lvm] Which size for snapshot volume for a *safe*
>        backup?
> To: LVM general discussion and development <linux-lvm at redhat.com>
> Message-ID: <20051206010357.GF3647 at agk.surrey.redhat.com>
> Content-Type: text/plain; charset=us-ascii
>
> On Mon, Dec 05, 2005 at 11:39:11PM +0100, Marc-Jano Knopp wrote:
> >   But for files smaller than that (like 512 bytes), it erronously
> >   prints:
> >
> >     Device /dev/loop/0 not found
>
> Maybe should be changed to:
> Device /dev/loop/0 not found (or ignored by filters).
>
> Tiny devices are filtered out at a low level in the code as
> it is never valid for lvm2 to scan them to see if they
> are PVs.
>
> This was added for devices with extended partitions.
> # blockdev --getsize /dev/hda4
> 2
>
> Alasdair
> --
> agk at redhat.com
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 6 Dec 2005 01:10:17 +0000
> From: Alasdair G Kergon <agk at redhat.com>
> Subject: Re: [linux-lvm] Which size for snapshot volume for a *safe*
>        backup?
> To: LVM general discussion and development <linux-lvm at redhat.com>
> Message-ID: <20051206011017.GG3647 at agk.surrey.redhat.com>
> Content-Type: text/plain; charset=us-ascii
>
> On Mon, Dec 05, 2005 at 11:39:11PM +0100, Marc-Jano Knopp wrote:
> > So, obviously,
> >   snapshot volume size = original volume size
> > is not sufficient to hold a complete change of the original volume.
>
> Correct - there's a little bit of metadata required too to
> map each piece of data back into the right location.
>
> > Btw.: There's a bug in "lvscan", it still displayed the snapshot
> > as being "ACTIVE", while in fact (at least that's what I concluded),
> > it was "INACTIVE" due to the lack of space, as shown using "lvdisplay".
>
> The 'lvs' attributes should be accurate (and lvdisplay too I think).
> lvscan doesn't check properly and needs fixing, thanks.
>
> Alasdair
> --
> agk at redhat.com
>
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 6 Dec 2005 11:56:00 +0100
> From: Heinz Mauelshagen <mauelshagen at redhat.com>
> Subject: Re: [linux-lvm] Dumb LVM question
> To: LVM general discussion and development <linux-lvm at redhat.com>
> Cc: hjm at redhat.com
> Message-ID: <20051206105600.GB2778 at redhat.com>
> Content-Type: text/plain; charset=us-ascii
>
> On Mon, Dec 05, 2005 at 01:29:23PM -0500, Greg Freemyer wrote:
> > All,
> >
> > With LVM 2, how do I kill any and all snapshots.
> >
> > With LVM 1 it was "vgscan -r".
> >
> > I need to be able to do this with a script, so I'm hoping lvm 2 has a
> > way to kill all snapshots without knowing their names, etc.  If not, I
> > guess I can script up something to do the job.
>
> Yes, you could use something like:
>
> <quick_hacking_mode>
> lvs|perl -ne '@a = split /\s+/,$_;if ($a[3] =~ /^s/) {print
> "/dev/$a[2]/$a[1]\n";}'|xargs lvremove -f
> </quick_hacking_mode>
>
>
> >
> > Greg
> > --
> > Greg Freemyer
> > The Norcross Group
> > Forensics for the 21st Century
> >
> >
> > --
> > Greg Freemyer
> > The Norcross Group
> > Forensics for the 21st Century
> >
> > _______________________________________________
> > linux-lvm mailing list
> > linux-lvm at redhat.com
> > https://www.redhat.com/mailman/listinfo/linux-lvm
> > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
> --
>
> Regards,
> Heinz    -- The LVM Guy --
>
> *** Software bugs are stupid.
>    Nevertheless it needs not so stupid people to solve them ***
>
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> Heinz Mauelshagen                                 Red Hat GmbH
> Consulting Development Engineer                   Am Sonnenhang 11
> Cluster and Storage Development                   56242 Marienrachdorf
>                                                  Germany
> Mauelshagen at RedHat.com                            +49 2626 141200
>                                                       FAX 924446
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 6 Dec 2005 12:36:29 +0100
> From: Marc-Jano Knopp <pub_ml_lvm at marc-jano.de>
> Subject: Re: [linux-lvm] Which size for snapshot volume for a *safe*
>        backup?
> To: LVM general discussion and development <linux-lvm at redhat.com>
> Message-ID: <20051206113629.GB2867 at mjk.myfqdn.de>
> Content-Type: text/plain; charset=us-ascii
>
> On Tue, 06 Dec 2005 at 01:10 (+0000), Alasdair G Kergon wrote:
> > On Mon, Dec 05, 2005 at 11:39:11PM +0100, Marc-Jano Knopp wrote:
> > > So, obviously,
> > >   snapshot volume size = original volume size
> > > is not sufficient to hold a complete change of the original volume.
> >
> > Correct - there's a little bit of metadata required too to
> > map each piece of data back into the right location.
>
> Thought so, just wasn't sure if it gets stored inside the volume or in
> an extra file or device.
>
>
> I have noticed that lvdisplay <snapshot volume> prints:
>
> Allocated to snapshot:   5.00%
>
> But as I don't know the inner workings of LVM, I preferred not to take
> this value for all variants of logical volumes for granted, but instead
> ask here in this list for exact numbers.
>
>
> [lvscan displays inactive snapshot volume as active]
>
> > The 'lvs' attributes should be accurate (and lvdisplay too I think).
> > lvscan doesn't check properly and needs fixing, thanks.
>
> http://www.gotfuturama.com/Multimedia/EpisodeSounds/2ACV14/10.mp3
>
> :-)
>
>
> Best regards
>
> Marc-Jano
>
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 6 Dec 2005 17:40:36 -0500
> From: Greg Freemyer <greg.freemyer at gmail.com>
> Subject: [linux-lvm] invalid lv in extent map
> To: LVM general discussion and development <linux-lvm at redhat.com>
> Message-ID:
>        <87f94c370512061440s6b1b7ca0rffad7f53503309e4 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I have recently upgraded a test server from 2.4.x with LVM 1 to 2.6.13
> with LVM 2.
>
> I can mount my 3 LVs, but when I try to do basic lvm commands I get
> "invalid lv in extent map".
>
> # pvscan
> invalid lv in extent map
> Couldn't fill logical volume maps.
> invalid lv in extent map
> Couldn't fill logical volume maps.
> No matching physical volumes found
>
> # pvscan --version
> LVM version:     2.01.14 (2005-08-04)
> Library version: 1.01.04 (2005-08-02)
> Driver version:  4.4.0
>
> I did not run vgconvert manually, so I assume I still have LVM1 metadata.
>
> This is a test server, so none of the data in the LVs is important,
> but I hope to be upgrading my live file server soon, so I would like
> to figure out how to not lose any data.
>
> Thanks
> Greg
> --
> Greg Freemyer
> The Norcross Group
> Forensics for the 21st Century
>
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 07 Dec 2005 01:47:49 +0000
> From: Kelly Harding <kelly.harding at ntlworld.com>
> Subject: [linux-lvm] LVM problems
> To: linux-lvm at redhat.com
> Message-ID: <43963F45.5060104 at ntlworld.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I've just brought my Debian Linux box back up after a power failure and
> now my LVM set up seems to be non-functional.
>
> I'm not very clued up on LVM tbh, but it has worked so far fine for ages.
>
> I get the following error if I try  to run 'vgchange -a y 3diskvolume:
>
> device-mapper ioctl cmd 11 failed: Invalid argument
>   _deps: task run failed for (254:0)
>   Failed to add device (254:0) to dtree
>   1 logical volume(s) in volume group "3diskvolume" now active
>
> It obviously won't mount after that as mount tells me it can't find the
> superblock etc.
>
> any ideas? is one of the discs dead?
>
> Thanks,
>
> Kelly
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: kelly.harding.vcf
> Type: text/x-vcard
> Size: 149 bytes
> Desc: not available
> Url :
> https://www.redhat.com/archives/linux-lvm/attachments/20051207/5b45c848/kelly.harding.vcf
>
> ------------------------------
>
> Message: 7
> Date: Tue, 6 Dec 2005 20:52:21 -0500
> From: Greg Freemyer <greg.freemyer at gmail.com>
> Subject: [linux-lvm] Re: invalid lv in extent map
> To: LVM general discussion and development <linux-lvm at redhat.com>
> Message-ID:
>        <87f94c370512061752g3d948e01t15b17902a130da63 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Not sure how I caused the below, but after a reboot I was unable to
> use my VG at all.
>
> I wiped it out and rebuilt it.  Hopefully it does not happen again.
>
> Greg
>
> On 12/6/05, Greg Freemyer <greg.freemyer at gmail.com> wrote:
> > I have recently upgraded a test server from 2.4.x with LVM 1 to 2.6.13
> > with LVM 2.
> >
> > I can mount my 3 LVs, but when I try to do basic lvm commands I get
> > "invalid lv in extent map".
> >
> > # pvscan
> >   invalid lv in extent map
> >   Couldn't fill logical volume maps.
> >   invalid lv in extent map
> >   Couldn't fill logical volume maps.
> >   No matching physical volumes found
> >
> > # pvscan --version
> >   LVM version:     2.01.14 (2005-08-04)
> >   Library version: 1.01.04 (2005-08-02)
> >   Driver version:  4.4.0
> >
> > I did not run vgconvert manually, so I assume I still have LVM1
> metadata.
> >
> > This is a test server, so none of the data in the LVs is important,
> > but I hope to be upgrading my live file server soon, so I would like
> > to figure out how to not lose any data.
> >
> > Thanks
> > Greg
> > --
> > Greg Freemyer
> > The Norcross Group
> > Forensics for the 21st Century
> >
>
>
> --
> Greg Freemyer
> The Norcross Group
> Forensics for the 21st Century
>
>
>
> ------------------------------
>
> Message: 8
> Date: Wed, 07 Dec 2005 02:06:18 +0000
> From: Kelly Harding <kelly.harding at ntlworld.com>
> Subject: Re: [linux-lvm] LVM problems
> To: kelly.harding at ntlworld.com, LVM general discussion and development
>        <linux-lvm at redhat.com>
> Message-ID: <4396439A.7080500 at ntlworld.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi again,
>
> Forgot to add details:
>
> PC: dual PII/350mhz (p/pro overdrive), 512mb ram, SCSI LVD 80mb/s.
>
> The VG is across 3 36gb scsi drives attached to an adaptect 2940U2W card.
>
> I'm running kernel version 2.4.27 (2.6 doesn't seem to like this system).
>
> I noticed from the dmesg output the following:
>
> device-mapper: one of name or uuid must be supplied, cmd(11)
>
> This appears when the previously mentioned command is run.
>
> I've no idea what this means or if it isa case of a re-install of the
> base system might fix this? maybe something with the
> base system has gone a bit fubar?
>
> any help or advice on this would be greatly appreciated.
>
> If it comes ot it that I lose the data and have to format and star the
> LVM VG over again it won't be ideal but it won't
> be losing anything vital either (just video files, etc).
>
> Kelly
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: kelly.harding.vcf
> Type: text/x-vcard
> Size: 149 bytes
> Desc: not available
> Url :
> https://www.redhat.com/archives/linux-lvm/attachments/20051207/dfe376a0/kelly.harding.vcf
>
> ------------------------------
>
> Message: 9
> Date: Wed, 7 Dec 2005 13:36:57 +0530
> From: Anil Kumar Sharma <xplusaks at gmail.com>
> Subject: Re: [linux-lvm] LVM problems
> To: kelly.harding at ntlworld.com, LVM general discussion and development
>        <linux-lvm at redhat.com>
> Message-ID:
>        <52fe6b680512070006i7578827av304946cd51d37313 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Recently I also suffered problems with LVM(2)
>
> These are very basic things I presume U might have already done but just
> in
> case if not ...
>
> imho pl boot with rescue disk (or mode)
> As a precaution select read-only mount of file system
> if required chroot to /mnt/sysimage
> # mount  ! look for lvm things specifically a word - mapper
> # pvdisplay
> # vgdisplay
> # lvdisplay
> # pvscan
> # vgscan
> # lvscan
>
> thiese will tell status of lvm things
> Then check /etc/fstab (carefully)
>
> U may then "very very carefully" use e2fsck or fsck [{("after dismounting
> the volumes")}] as you may you deem fit.
> "very very carefully"  means, as a minimum, first read both manpages, try
> these commands in read-only mode + do not modify anything + verbose.
>
> ### use vgck with caution and also checkout /etc/lvm/lvm.conf
>
> U may try in init 1 mode also but more caution requested.
>
> good luck & Pl post if U get it right this way or anyway.
>
> --
> Anil Kumar Shrama
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> https://www.redhat.com/archives/linux-lvm/attachments/20051207/ca4d210f/attachment.html
>
> ------------------------------
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
>
> End of linux-lvm Digest, Vol 22, Issue 5
> ****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20051207/3e667914/attachment.htm>


More information about the linux-lvm mailing list