20:12:45 <pcalarco>#startmeeting20:12:45 <zodbot> Meeting started Sat Dec 5 20:12:45 2009 UTC. The chair is pcalarco. Information about MeetBot at http://wiki.debian.org/MeetBot.
20:12:45 <zodbot> Useful Commands: #action #agreed #halp #info #idea #link #topic.
20:13:12 <mchua> thanks pcalarco!
20:13:39 <pcalarco> physical volumes comprised of disks, logicial volumes comprised of mount points defined on individual system
20:14:40 <pcalarco> with physical volumes aggregated into volume groups, you can do interesting and useful things like swap out a bad physical volume with the logicial volumes still available
20:15:06 <pcalarco> what can we do with LVM?
20:15:19 <pcalarco> * resizing file systens
20:15:37 <pcalarco> df -h to find out how much disk is free
20:16:32 <pcalarco> through graphical LVM tool, click on properties of logical volume, and can edit storage assignment for that volume
20:16:52 <pcalarco>question: where does it get the empty space from?
20:17:25 <pcalarco>answer: not all of the physical volume space has been assigned, and it is pulling them from there
20:17:42 <pcalarco> it is easier to leave some space not allocated for the future
20:18:19 <pcalarco> if you want to shrink a filesystem, it can't be in use
20:18:48 <pcalarco> vgs -- tells information about volume groups
20:19:30 <pcalarco> shows amount oif volumes sized, and how much of this is free
20:19:50 <pcalarco> pvs -- display partitions
20:20:11 <pcalarco> lvs -- display logical volume groups
20:20:32 <pcalarco> lvextend -- extend a logical volume group
20:21:23 <pcalarco> lvextend <logicalvolume path> --size <amount to increase or decrease>
20:23:06 <pcalarco> resize2fs <absolute path>
20:23:54 <pcalarco> this can take some time, depending on how much use the volume has currently
20:24:18 <pcalarco> to shrink a file system, you need to unmount it first
20:25:00 <pcalarco> system-config-lvm -- start lvm graphical client from command line
20:26:20 <pcalarco> to edit a logical volume, you will get a warning if the logical volume is mounted
20:27:58 <pcalarco> through eSATA, USB, firewire, one an now easily attached uninitialized additional physical volumes
20:28:21 <pcalarco> initialize and assign through LVM GUI
20:30:02 <pcalarco> once the new storage is attached and assigned, you can migrate the data from the disk you want to take out, and assign this to the new partition
20:30:36 <pcalarco> pvcreate <new logical volume>
20:31:14 <pcalarco> vgextend <filesystem>
20:31:28 <pcalarco> vgextend <filesystem> <new partition>
20:31:49 <pcalarco> pvmove <partition you want to move>
20:32:14 <pcalarco> vgreduce <volumegroup> <device>
20:32:41 <pcalarco> Fedora has, by default, Smart Drive system turned on
20:33:30 <pcalarco> Fedora will let you know if a drive is going to fail, at which point you could rush out to get a new drive and replace it as described above
20:34:52 <pcalarco> lvcreate <volumegroup> --name <new name> --size <size>
20:35:52 <pcalarco> mkfs -t ext3
20:35:56 <pcalarco> mount
20:37:24 <pcalarco>#meetingtopic Other uses of LVM20:38:11 <pcalarco> How about backup of web server, for example?
20:38:56 <pcalarco> LVM allows you to create a backup of a logical volume as a snapshot copy
20:39:15 <pcalarco> does not use any additional storage, except for a bit for the metadata
20:40:06 <pcalarco> when data is written to the original filesystem, the snapshot will write out only updates to the snapshot volume
20:40:41 <pcalarco> snapshot original designed for using for backups, but there are many uses beyond this
20:40:58 <pcalarco>#topic20:41:11 <pcalarco>#topic Creating a Snapshot20:41:44 <pcalarco>#meetingtopic Storage Management with LVM20:43:42 <pcalarco> lvcreate -s <volumegroup> --name <new snapshot volume name> --size <size>
20:44:10 <pcalarco> this is very fast, much faster than you could copy the data normally
20:45:39 <pcalarco> you could automate this to keep track of users' created files over a time period
20:46:45 <pcalarco> could also use this to create new volumes for new virtual machines
20:47:18 <pcalarco> creat auxiliary VMs with much smaller storage reqs
20:48:08 <pcalarco>question: what about if the changes overflows the amount of space assigned in the snapshot volume
20:48:54 <pcalarco>answer: if you want to really play it safe, you could create snapshot volume same size as original volume, but rarely necessary
20:49:27 <pcalarco> in general, the GUI also has some sanity checks that the command line does not have, so preferable to use GUI
20:50:37 <pcalarco> by default, the Fedora install fully allocates all available space; suggest not to do this
20:51:36 <pcalarco> LVM can also be used to help with upgrades
20:52:27 <pcalarco> leave around older existing logical volumes, and install into new logical volumes
20:53:48 <pcalarco> you can then use these original volumes to it is also possible to build LVM on top of RAID volumes
20:53:53 <pcalarco>#endmeeting