* [linux-lvm] LVM-Snapshot + dm_crypt
@ 2005-02-13 16:43 Torben Viets
2005-02-13 16:51 ` Alasdair G Kergon
0 siblings, 1 reply; 4+ messages in thread
From: Torben Viets @ 2005-02-13 16:43 UTC (permalink / raw)
To: linux-lvm
Hello,
I've got 3 harddisks with 3* 60GB partitions in a software raid 5
(/dev/md0), on this device I have installed a volume group (/dev/data/)
and a logical volume mp3-crypt (the -crypt means that it is encrypt with
dm_crypt). Now I decrypt the mp3 lv with:
cryptsetup create mp3 /dev/data/mp3-crypt
and then mount it with
mount /dev/mapper/mp3 /mnt/mp3
until now everything works fine, but now I want to create a snapshot of
/dev/mapper/mp3.
My idea was that I make a volume group backup and then say: save the
snapshot on the volume group, but I have no idea how I can say lvcreate
on which volume group it has to save the snapshot.
If I make a
lvcreate -s -nsnap -L1G /dev/data/mp3-crypt
then I have a snapshot but it is encryptet and I can't mount it, even if
I make a new cryptsetup for this device, every times mount says: "You
must specifes a file system"
if I make a
lvcreate -s -nsnap -L1G /dev/mapper/mp3 (which ist my unencrypted device)
then I get a: "Volume group "mapper" doesn't exist"
How can I make a snapshot of a dm_crypt device?
Distribution is Debian sarge with kernel-2.6.10
Thanks for your help.
greetings
Viets
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] LVM-Snapshot + dm_crypt
2005-02-13 16:43 [linux-lvm] LVM-Snapshot + dm_crypt Torben Viets
@ 2005-02-13 16:51 ` Alasdair G Kergon
2005-02-13 17:46 ` Torben Viets
0 siblings, 1 reply; 4+ messages in thread
From: Alasdair G Kergon @ 2005-02-13 16:51 UTC (permalink / raw)
To: LVM general discussion and development
On Sun, Feb 13, 2005 at 05:43:55PM +0100, Torben Viets wrote:
> How can I make a snapshot of a dm_crypt device?
If you've not put data on it yet:
pvcreate on the device
vgcreate
lvcreate
mkfs
put your data onto it
lvcreate -s
But you have, you'd have to use 'dmsetup' to do the snapshot by hand
and it's tricky.
Alasdair
--
agk@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] LVM-Snapshot + dm_crypt
2005-02-13 16:51 ` Alasdair G Kergon
@ 2005-02-13 17:46 ` Torben Viets
2005-02-16 17:32 ` [linux-lvm] Suggestion for LVM Torben Viets
0 siblings, 1 reply; 4+ messages in thread
From: Torben Viets @ 2005-02-13 17:46 UTC (permalink / raw)
To: LVM general discussion and development
Hello,
thanks for your answer, you mean that I have to do the following:
mkraid /dev/md0
cryptsetup create raid5-crypt /dev/md0
pvcreate /dev/mapper/raid5-crypt
vgcreate data /dev/mapper/raid5-crypt
lvcreate -L8G -nmp3 data
mkfs.xfs -f /dev/data/mp3
mount /dev/data/mp3 /mnt/mp3
cp * /mnt/mp3
lvcreate -L500M -s -nsnap-mp3 data
Or did I have miss understood you.
greetings
Torben Viets
^ permalink raw reply [flat|nested] 4+ messages in thread
* [linux-lvm] Suggestion for LVM
2005-02-13 17:46 ` Torben Viets
@ 2005-02-16 17:32 ` Torben Viets
0 siblings, 0 replies; 4+ messages in thread
From: Torben Viets @ 2005-02-16 17:32 UTC (permalink / raw)
To: LVM general discussion and development
Hello,
first I want to say I like your project and thank everyone, who is
involved in this project, you made good work.
But I have one problem with the LVM, I post it hear for some days
("LVM-Snapshot + dm_crypt"), the problem was that I can't made a
snapshot of a dm-crypted LVM, then it creates the snapshot, but nothing
works. And if I encrypt it on the device /dev/mapper/mp3 then I can't
use the Snapshot function because lvcreate can't locate the volume group
/dev/mapper, what logical.
Now my suggestion for a new LVM version is, couldn'tyou made it possible
that lvcreate get an alternative path for the snapshot volume, now a
example how i thought it could work.
pvcreate /dev/md0 //creating a physical volume
vgcreate /dev/data //create a volumegroup
lvcreate -L 8G -nmp3-crypt /dev/data //creating a volume group,
everything on this will be crypted
cryptsetup create mp3 /dev/data/mp3-crypt //creating a encrpted device,
I use cryptsetup because I don't know how dm_setup works :D
mkfs.xfs -f /dev/mapper/mp3
mount /dev/mapper/mp3 /mnt/mp3
cp -r * /mnt/mp3
if I now make a
lvcreate -s -nsnap /dev/mapper/mp3
then I get a error Message (volume group mapper doesn't exit)
now my idea was that I give lvcreate on which vg the snapscho schould
create for example
lvcreate -s -nsnap /dev/mapper/mp3 --snap-vg /dev/data/mp3-snap
is this possible to patch or is there a good reason why this doesn't
work, I try to make it my self but my programming skills are not good
enough to do this. Could some please made it, or is this senseless.
I hope you understand my problem.
greetings
Torben Viets
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-02-16 17:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-13 16:43 [linux-lvm] LVM-Snapshot + dm_crypt Torben Viets
2005-02-13 16:51 ` Alasdair G Kergon
2005-02-13 17:46 ` Torben Viets
2005-02-16 17:32 ` [linux-lvm] Suggestion for LVM Torben Viets
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox