Skip to content

Instantly share code, notes, and snippets.

@stibi
Last active December 28, 2018 11:01
Show Gist options
  • Save stibi/bdd0d35135a2539191a6f23b4d515cb2 to your computer and use it in GitHub Desktop.
Save stibi/bdd0d35135a2539191a6f23b4d515cb2 to your computer and use it in GitHub Desktop.

LVM

Volné místo

pvs nebo vgs ukáže, jestli na physical volume nebo volume grupě je nějaké volné místo

Zvětšit logical volume

Mám srv_data_postgresql logical volume a chci mu přidat 50G.

lvextend -L+50G /dev/vg01/srv_data_postgresql

Size of logical volume vg01/srv_data_postgresql changed from 70.00 GiB (17920 extents) to 120.00 GiB (30720 extents).
Logical volume srv_data_postgresql successfully resized.

Přidat do logical volume všechno dostupné volné místo:

lvextend -l +100%FREE /dev/vg01/srv_data_postgresql

Nakonec natáhnout filesystem:

resize2fs /dev/vg01/srv_data_postgresql

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment