You are here:Home»KB»Linux»My Ubuntu Linux Notes
Sunday, 05 September 2010 17:47

My Ubuntu Linux Notes

Written by

These are my notes specific to Ubuntu Linux.

Logical Volume Management (LVM)

This is enabled by default in the Ubuntu setup but can easily be unchecked and avoided.

  • General
    • Key Features
      • LVM is a dynamic disk that has to be online to be cloned.
      • Partitions can be resized or moved while online without affecting services.
      • LVM can do snapshots.
      • The LVM has to be on for it's partitions to be cloned.
      • It is designed for larger installations.
    • Don't use for Virtual machines. Snapshoting will be done above the VM if at all (i.e. TrueNAS). Adding LVM adds an extra layer of complexity.
    • Other phrases: LVM Group / LVM Volumes / LVM Storage / Dynamic LVM GPT
    • Lvm - Ubuntu Wiki - LVM stands for Logical Volume Management. It is a system of managing logical volumes, or filesystems, that is much more advanced and flexible than the traditional method of partitioning a disk into one or more segments and formatting that partition with a filesystem.
    • server - What is LVM and what is it used for? - Ask Ubuntu
      • As a Linux/Ubuntu newbie, what is LVM and what is it used for? In terms of a web server installation, what benefits does it provide? Would you recommend using it?
      • You can think of LVM as "dynamic partitions", meaning that you can create/resize/delete LVM "partitions" (they're called "Logical Volumes" in LVM-speak) from the command line while your Linux system is running: no need to reboot the system to make the kernel aware of the newly-created or resized partitions.
      • Other nice features that LVM "Logical Volumes" provide are:
        1. If you have more than one hard-disk, Logical Volumes can extend over more than one disk: i.e., they are not limited by the size of one single disk, rather by the total aggregate size.
        2. You can set up "striped" LVs, so that I/O can be distributed to all disks hosting the LV in parallel. (Similar to RAID-0, but a bit easier to set-up.)
        3. You can create a (read-only) snapshot of any LV. You can revert the original LV to the snapshot at a later time, or delete the snapshot if you no longer need it. This is handy for server backups for instance (you cannot stop all your applications from writing, so you create a snapshot and backup the snapshot LV), but can also be used to provide a "safety net" before a critical system upgrade (clone the root partition, upgrade, revert if something went wrong).
      • While being most useful on server systems, I think that features 1. and 3., combined with LVM's ability to create/resize/delete LVs on the fly, are quite handy on desktop systems as well. (Especially if you experiment a lot with the system.)
      • Downsides
        • Of course, all of this comes at a price: the initial setup of LVM is more complex than just partitioning a disk, and you will definitely need to understand the LVM terminology and model (Logical Volumes, Physical Volumes, Volume Groups) before you can start using it. (Once it is set up, using it is much easier, though.)
        • Also, if you use LVM across hard drives, you may lose all your data when only one drive fails.
        • What is LVM?
        • When should you use LVM?
          • The first thing your should consider before setting up LVM is what you want to accomplish with your disks and partitions. Some distributions, like Fedora, install with LVM by default.
          • If you are using Ubuntu on a laptop with only one internal hard drive and you don't need extended features like live snapshots, then you may not need LVM. If you need easy expansion or want to combine multiple hard drives into a single pool of storage then LVM may be what you have been looking for.
        • Setting up LVM in Ubuntu
    • What is Logical Volume Management and How Do You Enable It in Ubuntu? | How-To-Geek
      • Logical Volume Management (LVM) is a disk management option that every major Linux distribution includes.
      • Whether you need to set up storage pools or Logical Volume Management (LVM) is a disk management option that every major Linux distribution includes.
      • Whether you need to set up storage pools or just need to dynamically create partitions, LVM is probably what you are looking for.
      • First thing to know about using LVM is there is no easy way to convert your existing traditional partitions to logical volumes. It is possible to move to a new partition that uses LVM, but that won't be something that we will cover in this article.
    • Logical Volume Manager (LVM) versus standard partitioning in Linux | Enable Sysadmin | Red Hat - Use this guide to integrate the flexibility, scalability, and increased features of LVM into your server storage strategies. Traditional partitioning is good, but LVM is better.
  • Misc
  • Tutorials
  • Cloning / Imaging
  • Backup
    • How To Take LVM Backup In Easy Steps | Zindagi Technologies - In our previous blog, we show how we configure Logical Volume Group. Now, if we are talking about LVM backups, for many several reasons a volume group may become corrupted after unintended user intervention. there are two useful commands – vgcfgbackup and vgcfgrestore. Using this command, we take a backup of our accidentally delete the volume and we also restore it. These commands allow you to back up the metadata of the volume group. In many cases, the LVM configuration is corrupted. LVM may also be damaged when some disk fails and rebooting OS fails to boot. Therefore, it is important to have an LVM configuration backup.
  • Resizing

 

SORT these below

  • Use Synaptic Package Manager in the GUI for a easier experience installing and removing packages.
    sudo apt install synaptic
  • The location where packages are run from and placed with wget are /home/shoulders/
  • By default the root account is disabled for security.
  • gadmin-proftpd is a GUI for proftpd ftp server
  • sudo / su is a command to allow you to run as root. Similiar to 'Run as administrator'
  • Alt + F2 brings up the terminal
  • First press "Alt F2" on your keyboard then type in "gksu nautilus".
  • Now you are running the file browser as root in gnome.
  • Or you can do the same thing in kde only look for "run command" in the kmenu and type in "kdesu dolphin".
  • To run file explorer as root

 

 

 

 

Read 1001 times Last modified on Monday, 06 May 2024 12:40