Saturday, 26 October 2024

[LVM2] In General

Setup

Conventions

I figure, it comes in handy to have some naming conventions, to faster get an idea about the purpose or the nature of the objects used. 

Physical volumes

One cannot name them.

Volume group

vg__<raid_property>__<speed_property>

Logical volume

lv__<absolute>+<path>+<of>+<mount>+<point>

Management

Add chunk to exiting logical volume

lvextend --size [+]<size>[UNIT] --resize /dev/vg__<raid_property>__<speed_property>/lv__<absolute>+<path>+<of>+<mount>+<point>
  • Use the + sign to add the size. Without it, it should set the size to the specified value.
  • Units can be B, K, M, G, T, P and E meaning byte, kilobyte, megabyte, gigabyte, terrabyte, petabyte and exabyte respectively.
  • Specifying --resize will resize the file system to the partition size. If you do not give that (or it fails), you will need to do it manually, e.g. with resize2fs.

[git] Create a local branch from another branch

From the active branch git checkout -b <LOCAL_BRANCH> From a donator branch git checkout -b <LOCAL_BRANCH> <DONATING_BRANCH...