mount crypto_luks « Różności …

Różności …

17 czerwca 2019

mount crypto_luks

Zaszufladkowany do: Bez kategorii — Jacek @ 15:59

https://evilshit.wordpress.com/2012/10/29/how-to-mount-luks-encrypted-partitions-manually/

blkid | grep crypto
cryptsetup luksOpen /dev/sda2/ crypthome
mkdir /mnt/crypthome && mount /dev/mapper/crypthome /mnt/crypthome
unknown lvm2_member
https://www.svennd.be/mount-unknown-filesystem-type-lvm2_member/
lvmdiskscan
lvscan
You used the exact same name (ubuntu-vg) for your new volume group as the old volume group. You must give them unique names. You can rename one of the groups using vgrename and its UUID.

Find the UUID with vgdisplay and then rename the volume group:
vgrename <VG UUID> new_name


  • root@svennd:~# fdisk -l /dev/sdd
  • Disk /dev/sdd: 233.8 GiB, 251000193024 bytes, 490234752 sectors
  • Units: sectors of 1 * 512 = 512 bytes
  • Sector size (logical/physical): 512 bytes / 512 bytes
  • I/O size (minimum/optimal): 512 bytes / 512 bytes
  • Disklabel type: dos
  • Disk identifier: 0x0009345d
  • Device Boot Start End Sectors Size Id Type
  • /dev/sdd1 * 63 208844 208782 102M 83 Linux
  • /dev/sdd2 208845 488247479 488038635 232.7G 8e Linux LVM
(/dev/sdi1 is /boot partition, /dev/sdi2 is where the /home data resides) Seems lvm2 tools also provide a way to check if it is lvm or not, using lvmdiskscan (/dev/sdd2 here)
  • root@svennd:~# lvmdiskscan
  • /dev/sdb1 [ 1.82 TiB]
  • /dev/sdc2 [ 149.04 GiB]
  • /dev/sdd1 [ 101.94 MiB]
  • /dev/sdd2 [ 232.71 GiB] LVM physical volume
  • 0 disks
  • 4 partitions
  • 0 LVM physical volume whole disks
  • 1 LVM physical volume
Fine, now let’s scan what lv’s are to be found using lvscan
  • root@svennd:~# lvscan
  • inactive '/dev/VolGroup00/LogVol00' [230.75 GiB] inherit
  • inactive '/dev/VolGroup00/LogVol01' [1.94 GiB] inherit
Since this is an old disk in an enclosure, it is not activated on system boot. So we need to “activate” this lvm volume.
  • root@svennd:~# vgchange -ay
  • 2 logical volume(s) in volume group "VolGroup00" now active
and bam, ready to mount :
  • root@svennd:~# lvscan
  • ACTIVE '/dev/VolGroup00/LogVol00' [230.75 GiB] inherit
  • ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GiB] inherit
now to mount :
  • mount /dev/VolGroup00/LogVol00 /mnt/disk
success !

Brak komentarzy

Brak komentarzy.

Kanał RSS z komentarzami do tego wpisu.

Przepraszamy, możliwość dodawania komentarzy jest obecnie wyłączona.

Strona startowa: www.jaceksen.pl