[mythtv-users] Added two 320 GB hard drives , LVM problem Fixed!

Mat Kyne matkyne at hotmail.com
Fri Jun 9 16:16:08 UTC 2006


I was able to get everything working with the help from people on this list. 
I am grateful for the help.  Since I learn Linux on a need to know basis, 
and I am sure there are others out there just like me, here is what I did.

--I added two 320 GB hard drives to my Myth TV box that already had two 200 
GB drives.  When I installed FC4 I used the Disk Druid to partition the 
drives as follows:

# fdisk -l

Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         637     5116671    7  HPFS/NTFS
/dev/hda2             638         650      104422+  83  Linux
/dev/hda3             651        5112    35841015    b  W95 FAT32
/dev/hda4            5113       24321   154296292+   5  Extended
/dev/hda5            5113        6387    10241406   83  Linux
/dev/hda6            6388        6452      522081   82  Linux swap / Solaris
/dev/hda7            6453       24321   143532711   8e  Linux LVM

Disk /dev/hdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1       24321   195358401   8e  Linux LVM

--I then added the two other drives as /dev/hde and /dev/hdg with the help 
of a PCI-IDE adapter.

# fdisk /dev/hde

n (to add a new partition,)
--I made it take up the entire drive, one big partition.
t (to change the partition's system ID)
--set the partition type as 8e for LVM.
w (write the partition to disk and exit)
--I followed the same procedures for /dev/hdg. Next to verify that 
everything worked. .

# fdisk -l

Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         637     5116671    7  HPFS/NTFS
/dev/hda2             638         650      104422+  83  Linux
/dev/hda3             651        5112    35841015    b  W95 FAT32
/dev/hda4            5113       24321   154296292+   5  Extended
/dev/hda5            5113        6387    10241406   83  Linux
/dev/hda6            6388        6452      522081   82  Linux swap / Solaris
/dev/hda7            6453       24321   143532711   8e  Linux LVM

Disk /dev/hdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1       24321   195358401   8e  Linux LVM

Disk /dev/hde: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hde1               1       38913   312568641   8e  Linux LVM

Disk /dev/hdg: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdg1               1       38913   312568641   8e  Linux LVM
now I needed to add these two drives to my logical volume.


--Now I had a hard time understanding this and I might not understand it 
still, but here is what I assume to know about LVM: PV is short for physical 
volume and refers to the actual hard drive. LV is short for Logical Volume 
and is how Linux chooses to see the drives. If you have two 400 GB drives, 
then the Logical Volume Manager (LVM) treats the two separate drives as one 
larger drive, logically 400+400=800. You can have as many drives as you like 
added to this Logical Volume.

--Now I had to create the Physical Volume out of my hard drives.

# pvcreate /dev/hde1

# pvcreate /dev/hdg1

--Next I needed to add the physical volumes to my volume group.
--I didn't know off hand the name if my volume group, so :

# lvm lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
  LV UUID                s2l2DR-TjYC-BVBP-cj9n-6Tq5-9GlP-tMrp16
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                323.09 GB
  Current LE             10339
  Segments               2
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

# lvscan
  ACTIVE            '/dev/VolGroup00/LogVol00' [323.09 GB] inherit

--Then:

# vgextend  VolGroup00 /dev/hde1

# vgextend  VolGroup00 /dev/hdg1

# lvextend -L+295G /dev/VolGroup00/LogVol00

--Then I needed to resize the logical Volume. Since I use JFS as my file 
system, ,,

# mount -o remount,resize /video  (video is the mount point of my lvm 
partition)

--I checked to see if it worked.

# df -h

Filesystem            Size  Used Avail Use% Mounted on
/dev/hda5             9.5G  4.4G  4.7G  49% /
/dev/hda2              99M   13M   81M  14% /boot
/dev/shm              252M     0  252M   0% /dev/shm
/dev/hda3              35G  2.8G   32G   9% /share
/dev/mapper/VolGroup00-LogVol00
                      919G  233G  686G  26% /video
--All done, I hope this can help someone else. -Mat




More information about the mythtv-users mailing list