linux-lvm Digest, Vol 22, Issue 5
A message that is not in the archive (sent off-list or not yet received): [email protected]
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
Quoted 470 lines · On 12/7/05, [email protected] <[email protected]> wrote:
Send linux-lvm mailing list submissions to
[email protected]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
[email protected]You can reach the person managing the list at
[email protected]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 <[email protected]>
Subject: Re: [linux-lvm] Which size for snapshot volume for a *safe*
backup?
To: LVM general discussion and development <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-asciiQuoted 4 lines · Marc-Jano Knopp
But for files smaller than that (like 512 bytes), it erronously prints:
Device
/dev/loop/0not foundMaybe should be changed to:
Device/dev/loop/0not 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 2Alasdair
--
[email protected]------------------------------
Message: 2
Date: Tue, 6 Dec 2005 01:10:17 +0000
From: Alasdair G Kergon <[email protected]>
Subject: Re: [linux-lvm] Which size for snapshot volume for a *safe*
backup?
To: LVM general discussion and development <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-asciiQuoted 3 lines · Marc-Jano Knopp
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.
Quoted 3 lines
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
--
[email protected]------------------------------
Message: 3
Date: Tue, 6 Dec 2005 11:56:00 +0100
From: Heinz Mauelshagen <[email protected]>
Subject: Re: [linux-lvm] Dumb LVM question
To: LVM general discussion and development <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-asciiQuoted 9 lines · Greg Freemyer
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>Quoted 13 lines
Greg
--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century--
Greg Freemyer
The Norcross Group
Forensics for the 21st CenturyQuoted 5 lines
_______________________________________________
linux-lvm mailing list
[email protected]
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 [email protected] +49 2626 141200 FAX 924446=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
------------------------------
Message: 4
Date: Tue, 6 Dec 2005 12:36:29 +0100
From: Marc-Jano Knopp <[email protected]>
Subject: Re: [linux-lvm] Which size for snapshot volume for a *safe*
backup?
To: LVM general discussion and development <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-asciiQuoted 7 lines · Alasdair G Kergon
Quoted 3 lines · Marc-Jano Knopp
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]
Quoted 2 lines
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 <[email protected]>
Subject: [linux-lvm] invalid lv in extent map
To: LVM general discussion and development <[email protected]> Message-ID:<[email protected]>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.0I 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 <[email protected]>
Subject: [linux-lvm] LVM problems
To: [email protected]
Message-ID: <[email protected]>
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 activeIt 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 <[email protected]>
Subject: [linux-lvm] Re: invalid lv in extent map
To: LVM general discussion and development <[email protected]> Message-ID:<[email protected]>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
Quoted 13 lines · Greg Freemyer
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 foundQuoted 6 lines
# pvscan --version LVM version: 2.01.14 (2005-08-04) Library version: 1.01.04 (2005-08-02) Driver version: 4.4.0I did not run vgconvert manually, so I assume I still have LVM1
metadata.
Quoted 5 lines
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.
Quoted 7 lines
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 <[email protected]>
Subject: Re: [linux-lvm] LVM problems
To: [email protected], LVM general discussion and development
<[email protected]>
Message-ID: <[email protected]>
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 <[email protected]>
Subject: Re: [linux-lvm] LVM problems
To: [email protected], LVM general discussion and development
<[email protected]>
Message-ID:<[email protected]>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 # lvscanthiese 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.confU 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
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvmEnd of linux-lvm Digest, Vol 22, Issue 5
****************************************
Quoted 4 lines · neelima dahiya
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...........
I can't help you with the device mapper programming, but you should have a look at
http://en.wikipedia.org/wiki/Top-posting
Thanks. :-)
{ Fullquote deleted }
Best regards
Marc-Jano
P.S.: Oh, another thing: You should also choose an appropriate subject
line, like "Device Mapper Programming Information?" or similar. This way, people knowing about that topic can answer you, and those who cannot help on this topic don't have to deal with that thread, as they can see from the subject line that they can't help.