Sunday, August 3, 2014

How to restore LVM snapshot

How to restore LVM snapshot

list of logical volumes (find your snapshot)
# sudo lvscan 

output:
  ACTIVE   Original '/dev/debian-group/main' [50.00 GiB] inherit
  ACTIVE   Snapshot '/dev/debian-group/backup01' [50.16 GiB] inherit

/dev/debian-group/backup01 is a snapshot of /dev/debian-group/main

merge lvm snapshot with source partition
# sudo lvconvert --main /dev/debian-group/backup01

if your source partition is in use,then changes will be applied on next reboot or next mount of source partition.

Add shortcut debian / gnome 3


to create shortcut:

# gnome-desktop-item-edit ~/.local/share/applications --create-new

to install gnome-desktop-item-edit:

# sudo apt-get install --no-install-recommends gnome-panel


Saturday, August 2, 2014

Create LVM snapshot

How to create LVM snapshot

check volume names:


  • either launch logical volume management, or...

select logical volume you want to snapshot

possibly you will want to load dm-snapshot kernel module:

# sudo modprobe dm-snapshot uname -a (check kernel version) 

dont use start name with snapshot (try my-snapshot01)


How to extend lvm?

How to extend lvm? 

list logical volumes
# lvscan

extend volume (parameter -L+3G means "add 3GB to volume")
# lvextend -L+3G /dev/lv-group/lv-volume

extend filesystem (it cannot shrink filesystem size!)
# resize2fs /dev/lv-group/lv-volume

Java and debian jessie

installing oracle java: 


 if you need java for a while, no root account - try to use ahh java (project is still beta)

https://github.com/dominikdz/ahh

 also check this page

http://scaledcode.blogspot.com/2014/07/installing-oracle-jdk-on-debian.html