This page has no content. Enrich the Www workspace by contributing.
Because I am using two 250GB drives, I need to use LVM to make them look like one large disk. In addition I want to be able to add more drives without having to upgrade to a larger drive. If I use LVM I will be able to add another drive and then add it to the Volume Group and extend the MythTV Storage Logical Drive.
Install LVM
The LVM doesn't come with the Ubuntu Desktop. After you install the LVM you need to reboot to install the kernel modules.
sudo apt-get install lvm2
sudo shutdown -r now
Patition the disks
Create partitions on disks, make sure to mark the paritions as 0x8e (Linux LVM). It is best to create a partition even if you are using the whole disk.
Add the paritions to LVM
$ sudo pvcreate /dev/sdb1 /dev/sdc1
Physical volume "/dev/sdb1" successfully created
Physical volume "/dev/sdc1" successfully created
Create Volume Group
$ sudo vgcreate mythtv_storage /dev/sdb1 /dev/sdc1
Volume group "mythtv_storage" successfully created
Create a Logical Volume
Because I want to create a logical volume the total size of the two disks I will first get the "Total PE" from volume group.
$ sudo vgdisplay mythtv_storage
--- Volume group ---
VG Name mythtv_storage
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 465.71 GB
PE Size 4.00 MB
Total PE 119222
Alloc PE / Size 0 / 0
Free PE / Size 119222 / 465.71 GB
VG UUID 02bG3B-Ua9y-zQEK-JmfF-yIq5-lLmE-OcZCMK
$ sudo lvcreate -l 119222 mythtv_storage -n mythtvlv
Create File System
sudo mke2fs /dev/mythtv_storage/mythtvlv
mke2fs 1.40.2 (12-Jul-2007)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
61046784 inodes, 122083328 blocks
6104166 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
3726 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Mount filesystem
Resources
Linux LVM HowTo -- http://tldp.org/HOWTO/LVM-HOWTO/index.html