Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Erstelltes lvm verschlüsseln
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Linubie
Guru
Guru


Joined: 11 Jun 2004
Posts: 365

PostPosted: Fri Apr 19, 2013 11:25 pm    Post subject: Erstelltes lvm verschlüsseln Reply with quote

Hallo,
ich habe mir ein LVM erstellt aus zwei Partitionen:

pvcreate /dev/sda3 /dev/sdb2
vgcreate vg_gruppe /dev/sda3 /dev/sdb2
lvcreate -l 100%FREE -name daten_lvm vg_gruppe

lvdisplay zeigt eine Größe von 891.59 GiB

cryptsetup -c aes-xts-plain64 -s 512 -h sha512 -v luksFormat /dev/vg_gruppe-daten_lvm /mnt/backup/data.key
cryptsetup -d /mnt/backup/data.key luksOpen /dev/vg_gruppe-daten_lvm edata

mkfs -t ext4 /dev/mapper/edata

Nun wird mit aber nur Größe vom 7,8 MB angezeigt

df -h
/dev/mapper/edata 7.8M 1.1M 6.4M 15% /mnt/data/custom

was mache ich falsch?
_________________
Mircosoft software is like having sex with a stranger, you always have to be careful not to get infected with something...
Back to top
View user's profile Send private message
Beelzebub_
Apprentice
Apprentice


Joined: 21 May 2012
Posts: 256
Location: outside/todesstern-2.01

PostPosted: Sat Apr 20, 2013 10:08 am    Post subject: Reply with quote

Zeig mal die Ausgabe von lvscan oder vgscan, damit wir sehen können ob /dev/vg_gruppe-daten_lvm wirklich 100% hat.
_________________
Ich habe keine Angst vorm Sterben, ich habe nur Angst ich habe nicht genug gelebt.
Back to top
View user's profile Send private message
Linubie
Guru
Guru


Joined: 11 Jun 2004
Posts: 365

PostPosted: Sat Apr 20, 2013 5:48 pm    Post subject: Reply with quote

Hallo,

hiier die Ausgaben der Befehle:

lvscan -v -a
Finding all logical volumes
ACTIVE '/dev/vg_gruppe/daten_lvm' [891.59 GiB] inherit

vgscan -v
Wiping cache of LVM-capable devices
Wiping internal VG cache
Reading all physical volumes. This may take a while...
Finding all volume groups
Finding volume group "vg_gruppe"
Found volume group "vg_gruppe" using metadata type lvm2
_________________
Mircosoft software is like having sex with a stranger, you always have to be careful not to get infected with something...
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2229
Location: My own world! I and Gentoo!

PostPosted: Sat Apr 20, 2013 8:10 pm    Post subject: Reply with quote

beelzebub meinte sicher eher die Ausgaben von lvdisplay /dev/vg_gruppe/daten_lvm und vgdisplay vg_gruppe
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
Linubie
Guru
Guru


Joined: 11 Jun 2004
Posts: 365

PostPosted: Sat Apr 20, 2013 9:08 pm    Post subject: Reply with quote

Oups sorry, hier nun der zweite Versuch


lvdisplay /dev/vg_gruppe/daten_lvm
--- Logical volume ---
LV Path /dev/vg_gruppe/daten_lvm
LV Name daten_lvm
VG Name vg_gruppe
LV UUID xgKCyI-iEI4-gd2P-Btk4-z4SS-4Js2-5D74Vc
LV Write Access read/write
LV Creation host, time sysresccd, 2013-04-19 23:30:11 +0000
LV Status available
# open 0
LV Size 891.59 GiB
Current LE 228246
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

vgdisplay vg_gruppe
--- Volume group ---
VG Name vg_gruppe
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 891.59 GiB
PE Size 4.00 MiB
Total PE 228246
Alloc PE / Size 228246 / 891.59 GiB
Free PE / Size 0 / 0
VG UUID VEetfA-CSf4-OxnD-Br6g-8udL-94gl-nKCXPS
_________________
Mircosoft software is like having sex with a stranger, you always have to be careful not to get infected with something...
Back to top
View user's profile Send private message
Beelzebub_
Apprentice
Apprentice


Joined: 21 May 2012
Posts: 256
Location: outside/todesstern-2.01

PostPosted: Sat Apr 20, 2013 10:01 pm    Post subject: Reply with quote

Code:
sudo resize2fs -p /dev/mapper/edata    # Vergrößert das Dateisystem bis zur maximalen Größe des Logical Volumes oder der Partition
Vielleicht hilft das, wenn das ext4-Dateisystem wirklich nur 7,8 MB kennt.
_________________
Ich habe keine Angst vorm Sterben, ich habe nur Angst ich habe nicht genug gelebt.
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2229
Location: My own world! I and Gentoo!

PostPosted: Sun Apr 21, 2013 5:04 am    Post subject: Reply with quote

Die Frage ist noch. als wie groß sieht die crypto-Schicht dieses LV...
cryptsetup status /dev/mapper/edata
Sollte dahingehend Auskunft geben können.
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
Linubie
Guru
Guru


Joined: 11 Jun 2004
Posts: 365

PostPosted: Sun Apr 21, 2013 10:23 am    Post subject: Reply with quote

Sorry das ich mich so doof anstelle, es ist noch Neuland für mich:


cryptsetup status /dev/mapper/edata
/dev/mapper/edata is active and is in use.
type: LUKS1
cipher: aes-xts-plain64
keysize: 512 bits
device: /dev/loop1
loop: /dev/vg_gruppe-daten_lvm
offset: 4096 sectors
size: 16384 sectors
mode: read/write
_________________
Mircosoft software is like having sex with a stranger, you always have to be careful not to get infected with something...
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2229
Location: My own world! I and Gentoo!

PostPosted: Sun Apr 21, 2013 11:22 am    Post subject: Reply with quote

ich weiß nicht inwiefern das was zu heißen hat. aber du scheinst dich beim Pfad vertippt zu haben.
cryptsetup -c aes-xts-plain64 -s 512 -h sha512 -v luksFormat /dev/vg_gruppe-daten_lvm /mnt/backup/data.key

Code:
loop: /dev/vg_gruppe-daten_lvm

Ich denke das sollte /dev/vg_gruppe/daten_lvm heißen.

Und das mit dem Neuland ist doch kein Beinbruch. So haben wir ja alle mal angefangen ^^

Ich selbst starte Verschlüsselungen in der Regel andersrum (zuerst die Festplatten verschlüsseln und dadrauf dann das LVM packen) ist aber Ansichtssache was einem eher liegt.
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
cryptosteve
Veteran
Veteran


Joined: 04 Jan 2004
Posts: 1169
Location: GER

PostPosted: Sun Apr 21, 2013 12:45 pm    Post subject: Reply with quote

Max Steel wrote:
Ich selbst starte Verschlüsselungen in der Regel andersrum (zuerst die Festplatten verschlüsseln und dadrauf dann das LVM packen) ist aber Ansichtssache was einem eher liegt.

Ja, so rum mache ich es auch und ich finde es mit cryptestup über die gesamte Platte und darin das lvm auch deutlich einfacher.
_________________
- born to create drama -
gpg: 0x9B6C7E15
CS Virtual Travel Bug: VF6G5D
Back to top
View user's profile Send private message
Linubie
Guru
Guru


Joined: 11 Jun 2004
Posts: 365

PostPosted: Sun Apr 21, 2013 7:04 pm    Post subject: Reply with quote

Hallo und danke für die Antworten,

wenn ich es umgekehrt machen würde, würde ich als erstes die crypto devices anlegen, für sda3 und sdb2?
ich verstehe den umgekehrten weg nicht so ganz, denn bei meiner vorgehensweise habe ich ja aus den beiden partitionen erst ein lvm gemacht das ich dann verschlüssel. Und ich müsste dann ja auch 2 schlüssel benutzen um beide laufwerke dann zu einem lvm verbinden zu können.

irgendwie will mir das nicht in den kopf :O(
_________________
Mircosoft software is like having sex with a stranger, you always have to be careful not to get infected with something...
Back to top
View user's profile Send private message
cryptosteve
Veteran
Veteran


Joined: 04 Jan 2004
Posts: 1169
Location: GER

PostPosted: Sun Apr 21, 2013 7:27 pm    Post subject: Reply with quote

Sorry, ich habs für meinen Teil verpeilt. Ich habe hier nur eine Festplatte im crypto-Device, da spielt das keine Rolle.
Deine Situation habe ich nach der Diskussion nicht mehr richtig auf der Pfanne gehabt, mein Fehler.
_________________
- born to create drama -
gpg: 0x9B6C7E15
CS Virtual Travel Bug: VF6G5D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum