Chapter 13. Recipes

Table of Contents

1. Setting up LVM on three SCSI disks
1.1. Preparing the disks
1.2. Setup a Volume Group
1.3. Creating the Logical Volume
1.4. Create the File System
1.5. Test the File System
2. Setting up LVM on three SCSI disks with striping
2.1. Preparing the disk partitions
2.2. Setup a Volume Group
2.3. Creating the Logical Volume
2.4. Create the File System
2.5. Test the File System
3. Add a new disk to a multi-disk SCSI system
3.1. Current situation
3.2. Prepare the disk partitions
3.3. Add the new disks to the volume groups
3.4. Extend the file systems
3.5. Remount the extended volumes
4. Taking a Backup Using Snapshots
4.1. Create the snapshot volume
4.2. Mount the snapshot volume
4.3. Do the backup
4.4. Remove the snapshot
5. Removing an Old Disk
5.1. Distributing Old Extents to Existing Disks in Volume Group
5.2. Distributing Old Extents to a New Replacement Disk
6. Moving a volume group to another system
6.1. Unmount the file system
6.2. Mark the volume group inactive
6.3. Export the volume group
6.4. Import the volume group
6.5. Activate the volume group
6.6. Mount the file system
7. Splitting a volume group
7.1. Determine free space
7.2. Move data off the disks to be used
7.3. Create the new volume group
7.4. Remove remaining volume
7.5. Create new logical volume
7.6. Make a file system on the volume
7.7. Mount the new volume
8. Converting a root filesystem to LVM 1
8.1. Boot single user
8.2. Run Parted
8.3. Reboot
8.4. Verify kernel config options
8.5. Adjust partition type
8.6. Set up LVM 1 for the new scheme
8.7. Create the Filesystem
8.8. Update /etc/fstab
8.9. Create an LVM 1 initial RAM disk
8.10. Update /etc/lilo.conf
8.11. Run LILO to write the new boot sector
8.12. Reboot to lvm
8.13. Add remainder of disk
9. Recover physical volume metadata

This section details several different recipes for setting up lvm. The hope is that the reader will adapt these recipes to their own system and needs.