Ferramentas do usuário

Ferramentas do site


linux:debian:lvm_debian

LVM (Debian)

How to mount LVM partition that just appended into system? Just follow below steps and get it!

Install package:lvm2 if you did not enable it.

  # apt-get install lvm2

Load the necessary module: dm-mod.

  # modprobe dm-mod

Scan LVM volumes in your system.

  # vgscan
  or
  # pvs

Activate the LVM volume.

  # vgchange -a y [LVM Group]

Find the logical volume.

  # lvs
  or
  # lvdisplay /dev/[LVM_group_name]

Mount the logical volume you want access it.

  # mount /dev/mapper/[LVM_group_name]-[LVM-logical-volume-name] /mnt -o ro,user

You can access the LVM partition now in /mnt.

Juntar dois volumes

Listar volumes

# lvdisplay

Remover o volume desejado

# umount /home
# lvremove vg_exemplo/lv_home

Shrink com o volume desejado

# lvresize -r -l +100%FREE vg_exemplo/lv_root
linux/debian/lvm_debian.txt · Última modificação: 27/04/2021 12:05 por 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki