LVM
Bruce Labitt
bruce.labitt at verizon.net
Mon Sep 22 21:31:22 EDT 2008
Frank DiPrete wrote:
>
>
> Bruce Labitt wrote:
>> A while back I added a 1TB drive to my mythtv box. My 500GB drive
>> was about full so I thought I'd lvm the 1TB drive onto the existing.
>> I did not do it correctly apparently. My system is only reporting
>> the original 500GB. If, however, I open up the lvm gui I see a
>> Volume Group 00 that consists of sda and sdb? with a total of
>> 1.5TB? It does not look like anything is on the new drive. How can
>> I fix this. My video is on /mnt/store, I suppose that is the section
>> that I would like to migrate to the new drive?
>>
>> Any suggestions? Step away from the computer before I mess something
>> up?
>
> Nah - it just sounds like you didn't resize the logical volume and the
> file system. You just need to extend the logical volume that is
> /mnt/store (assuming that /mnt/store is on a logical volume), make it
> bigger, make the file system bigger, then remount it.
>
> The hierarchy (from low to high)
> disk partition
> physical volume
> volume group
> logical volume
> file system
>
> so It sounds like you
> 1) installed the drive and partitioned it as type lvm
> then using the gui
> 2) did a pvcreate on it
> 3) did a vgexpand to add the pv to the volume group
>
> did you
> 4) do an lvextend to extend the size of the logical volume?
> 5) do a resize2fs to resize the file system to the extended logical
> volume?
>
> if not(4) {
> use vgdisplay to see how much unused space is on your volume group;
> use lvextend -L +(space)G on the logical volume that is used for
> /mnt/store
> lvdisplay to check it;
> }
>
> if not(5) {
> unmount the partition;
> fsck it (resize2fs makes you do it anyway);
> resize2fs the logical volume partition
> mount it
> }
>
> If memory serves me the default for resize2fs is to extend to the end
> of the partition.
>
> If I got the assumptions about your setup wrong let me know.
>
> Can you post the results of
> pvdisplay
> vgdisplay
> lvdisplay
>
> and the content of fstab?
>
>
>
# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name VolGroup00
PV Size 465.66 GB / not usable 3.56 MB
Allocatable yes
PE Size (KByte) 32768
Total PE 14901
Free PE 1
Allocated PE 14900
PV UUID vrymx9-40Np-MlSL-6WGq-WNaV-1V0V-3hoOzL
--- Physical volume ---
PV Name /dev/sdb1
VG Name VolGroup00
PV Size 931.51 GB / not usable 13.71 MB
Allocatable yes
PE Size (KByte) 32768
Total PE 29808
Free PE 29808
Allocated PE 0
PV UUID BWPEqa-fvJc-pwQY-q2gq-3kw9-2L4a-stgbdb
# vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 1.36 TB
PE Size 32.00 MB
Total PE 44709
Alloc PE / Size 14900 / 465.62 GB
Free PE / Size 29809 / 931.53 GB
VG UUID STbN5M-FIOK-QjDp-hBt6-4hS7-X74G-ESn3ze
# lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID Z5uOWq-pG1h-zPFM-o2H3-ZYiN-OkqU-qXFX43
LV Write Access read/write
LV Status available
# open 1
LV Size 463.69 GB
Current LE 14838
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID zcYYhh-t2F4-rWX2-aZ6x-cFyz-NcKT-lQKODw
LV Write Access read/write
LV Status available
# open 1
LV Size 1.94 GB
Current LE 62
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1
# cat /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
Pretty sure I did not do either 4 or 5. I did not do anything in the
cli. My bad - I thought it would be self-explanatory in the gui. WRONG.
So I don't think I intentionally did either 2 or 3. I do know that I
did not do anything to extend the directory /mnt/store.
-Bruce
More information about the gnhlug-discuss
mailing list