<HTML>
<style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style>Francois,<br>
<br>
Here is the output you requested:<br>
mythserver michael # vgdisplay -v vg<br>
Using volume group(s) on command line<br>
Finding volume group "vg"<br>
--- Volume group ---<br>
VG Name vg<br>
System ID<br>
Format lvm2<br>
Metadata Areas 4<br>
Metadata Sequence No 10<br>
VG Access read/write<br>
VG Status resizable<br>
MAX LV 0<br>
Cur LV 1<br>
Open LV 1<br>
Max PV 0<br>
Cur PV 2<br>
Act PV 2<br>
VG Size 1.59 TB<br>
PE Size 4.00 MB<br>
Total PE 417316<br>
Alloc PE / Size 417024 / 1.59 TB<br>
Free PE / Size 292 / 1.14 GB<br>
VG UUID 2a2Vzo-3HUx-gUU0-EYk3-md1s-PgAg-MM0bQ6<br>
<br>
--- Logical volume ---<br>
LV Name /dev/vg/myth<br>
VG Name vg<br>
LV UUID 4Auu9y-47vW-6BBd-Rdd5-PP63-3sYB-lvmNmQ<br>
LV Write Access read/write<br>
LV Status available<br>
# open 1<br>
LV Size 1.59 TB<br>
Current LE 417024<br>
Segments 2<br>
Allocation inherit<br>
Read ahead sectors auto<br>
- currently set to 256<br>
Block device 254:0<br>
<br>
--- Physical volumes ---<br>
PV Name /dev/sdc1<br>
PV UUID DX11mo-r0Eh-jN5N-objS-oqo6-eVSU-MShkS2<br>
PV Status allocatable<br>
Total PE / Free PE 238466 / 0<br>
<br>
PV Name /dev/sdb1<br>
PV UUID SetyUA-DkWL-zDDo-W8Om-3avR-nJH8-OnUujv<br>
PV Status allocatable<br>
Total PE / Free PE 178850 / 292<br>
<br>
mythserver michael # lvdisplay /dev/vg/myth<br>
--- Logical volume ---<br>
LV Name /dev/vg/myth<br>
VG Name vg<br>
LV UUID 4Auu9y-47vW-6BBd-Rdd5-PP63-3sYB-lvmNmQ<br>
LV Write Access read/write<br>
LV Status available<br>
# open 1<br>
LV Size 1.59 TB<br>
Current LE 417024<br>
Segments 2<br>
Allocation inherit<br>
Read ahead sectors auto<br>
- currently set to 256<br>
Block device 254:0<br>
<br>
<br>
So it does appear that /dev/vg/myth is the full 1.59TB. Any reason that it appears that the output of df does not agree with this or am I confused?<br>
<br>
Regarding your recommended steps, I understand that those steps will not eliminate my reliance on the two drives not failing but the steps will setup a stripped mapping which can improve performance, right?<br>
<br>
In my situation, the directory mapped to /dev/vg/myth is just used to store recorded programs from mythtv. Therefore, the data is not critical, but the desire is to present a directory that is as big as possible to allow mythtv to not run out of recording space (I think 1.6TB should do it!!!).<br>
<br>
Also, I assume that the second "dd" command line you wrote should have referenced /dev/sdc and not sdb, correct?<br>
<br>
Thanks a ton for your insight.<br>
<br>
Take it easy,<br>
Mike<br>
<br>
<br>
<br>
<br>
<span style="font-weight: bold;">On Fri 09/01/23 10:44 , "F-D. Cami" fcami@winsoft.fr sent:<br>
</span><blockquote style="border-left: 2px solid rgb(245, 245, 245); margin-left: 5px; margin-right: 0px; padding-left: 5px; padding-right: 0px;"><br>
Hi Mike,<br>
<br>
Could you give us the output of :<br>
<br>
vgdisplay -v vg<br>
lvdisplay /dev/vg/myth<br>
<br>
I think your myth LV is already 1.5TB, so you only need to run :<br>
# mount -o remount,resize /dev/vg/myth<br>
for the JFS filesystem to be resized.<br>
Please backup everything before running that :)<br>
<br>
However, since what you're doing essentially amounts to RAID0 without the<br>
performance benefits (if you lose one drive, your data is lost), I'd run a full backup<br>
and run the following commands to create a striped LV :<br>
<br>
lvremove /dev/vg/myth<br>
vgremove vg<br>
pvremove /dev/sdb1<br>
pvremove /dev/sdc1<br>
dd if=/dev/zero of=/dev/sdb bs=4096 count=10000<br>
dd if=/dev/zero of=/dev/sdb bs=4096 count=10000<br>
pvcreate /dev/sdb<br>
pvcreate /dev/sdc<br>
vgcreate vg /dev/sdb /dev/sdc<br>
lcreate -i 2 -I 8 -L 1700M -n myth vg /dev/sdb /dev/sdc<br>
(adjust 1700 to whatever your drives will take)<br>
mkfs.jfs /dev/vg/myth<br>
<br>
You will lose a bit of space but gain some performance ; the available VG size can<br>
then be used for other LVs or snapshots.<br>
<br>
Best,<br>
<br>
Francois<br>
<br>
<br>
<br>
On Fri, 23 Jan 2009 11:14:35 -0600<br>
<a href="mailto:ctd@minneapolish3.com">ctd@minneapolish3.com</a> wrote:<br>
<br>
<span style="color: rgb(102, 102, 102);">> Hey there,</span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> I have most likely a simple question concerning LVM that I figured someone might be able to provide some insight into.</span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> I just setup LVM with both /dev/sdb1 and /dev/sdc1 being assigned to my “vg” volume group. There is only one logical volume “myth” off of “vg”.</span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> My steps:</span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> fdisk /dev/sdc [created 1 partition to span the entire drive of type 8e]</span><br>
<span style="color: rgb(102, 102, 102);">> emerge lvm2</span><br>
<span style="color: rgb(102, 102, 102);">> vgscan</span><br>
<span style="color: rgb(102, 102, 102);">> vgchange -a y </span><br>
<span style="color: rgb(102, 102, 102);">> pvcreate /dev/sdc1</span><br>
<span style="color: rgb(102, 102, 102);">> vgcreate vg /dev/sdc1</span><br>
<span style="color: rgb(102, 102, 102);">> lvcreate -L900GB -nmyth vg</span><br>
<span style="color: rgb(102, 102, 102);">> mkfs.jfs /dev/vg/myth</span><br>
<span style="color: rgb(102, 102, 102);">> fdisk /dev/sdb [created 1 partition to span the entire drive of type 8e]</span><br>
<span style="color: rgb(102, 102, 102);">> pvcreate /dev/sdb1</span><br>
<span style="color: rgb(102, 102, 102);">> vgextend vg /dev/sdb1</span><br>
<span style="color: rgb(102, 102, 102);">> lvextend -L+700G /dev/vg/myth</span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> Sdb1: 700GB drive with one partition</span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> Sdd1: 1TB drive with one partition</span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> My question is related to the space available in /dev/vg/myth. I</span><br>
<span style="color: rgb(102, 102, 102);">> would assume that I should have ~1.7TB of space on that logical</span><br>
<span style="color: rgb(102, 102, 102);">> partition, but df does not seems to indicate that. </span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> # df</span><br>
<span style="color: rgb(102, 102, 102);">> Filesystem 1K-blocks Used Available Use% Mounted on</span><br>
<span style="color: rgb(102, 102, 102);">> …</span><br>
<span style="color: rgb(102, 102, 102);">> /dev/mapper/vg-myth 943656628 544996248 398660380 58% /mnt/store</span><br>
<span style="color: rgb(102, 102, 102);">> …</span><br>
<span style="color: rgb(102, 102, 102);">> mythserver michael # pvdisplay /dev/sdb1</span><br>
<span style="color: rgb(102, 102, 102);">> --- Physical volume ---</span><br>
<span style="color: rgb(102, 102, 102);">> PV Name /dev/sdb1</span><br>
<span style="color: rgb(102, 102, 102);">> VG Name vg</span><br>
<span style="color: rgb(102, 102, 102);">> PV Size 698.64 GB / not usable 2.34 MB</span><br>
<span style="color: rgb(102, 102, 102);">> Allocatable yes</span><br>
<span style="color: rgb(102, 102, 102);">> PE Size (KByte) 4096</span><br>
<span style="color: rgb(102, 102, 102);">> Total PE 178850</span><br>
<span style="color: rgb(102, 102, 102);">> Free PE 292</span><br>
<span style="color: rgb(102, 102, 102);">> Allocated PE 178558</span><br>
<span style="color: rgb(102, 102, 102);">> PV UUID SetyUA-DkWL-zDDo-Wm-3avR-nJH8-OnUujv</span><br>
<span style="color: rgb(102, 102, 102);">> mythserver michael # pvdisplay /dev/sdc1</span><br>
<span style="color: rgb(102, 102, 102);">> --- Physical volume ---</span><br>
<span style="color: rgb(102, 102, 102);">> PV Name /dev/sdc1</span><br>
<span style="color: rgb(102, 102, 102);">> VG Name vg</span><br>
<span style="color: rgb(102, 102, 102);">> PV Size 931.51 GB / not usable 3.19 MB</span><br>
<span style="color: rgb(102, 102, 102);">> Allocatable yes (but full)</span><br>
<span style="color: rgb(102, 102, 102);">> PE Size (KByte) 4096</span><br>
<span style="color: rgb(102, 102, 102);">> Total PE 238466</span><br>
<span style="color: rgb(102, 102, 102);">> Free PE 0</span><br>
<span style="color: rgb(102, 102, 102);">> Allocated PE 238466</span><br>
<span style="color: rgb(102, 102, 102);">> PV UUID DX11mo-r0Eh-jN5N-objS-oqo6-eVSU-MShkS2</span><br>
<span style="color: rgb(102, 102, 102);">> mythserver michael # lvextend -L+700G /dev/vg/myth</span><br>
<span style="color: rgb(102, 102, 102);">> Extending logical volume myth to 2.27 TB</span><br>
<span style="color: rgb(102, 102, 102);">> Insufficient free space: 179200 extents needed, but only 292 available</span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> I am guessing that I should have run these commands to extend the logical volume to its desired size:</span><br>
<span style="color: rgb(102, 102, 102);">> vgextend vg /dev/sdb1</span><br>
<span style="color: rgb(102, 102, 102);">> lvextend -L+700G /dev/vg/myth</span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> before creating the filesystem with this command which I am guessing locked the size to the 900GB with I used in my setup steps</span><br>
<span style="color: rgb(102, 102, 102);">> mkfs.jfs /dev/vg/myth</span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> Does that sound like my issue?</span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> Any thoughts on how to get out of this situation while ensuring no loss of my data that currently resides on /dev/mapper/vg-myth?</span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> I am thinking that the following steps should work:</span><br>
<span style="color: rgb(102, 102, 102);">> Copy all of my files on /dev/mapper/vg-myth to other paritions (I</span><br>
<span style="color: rgb(102, 102, 102);">> assume the call to mkfs.jfs below will delete all the contents of this</span><br>
<span style="color: rgb(102, 102, 102);">> partition)</span><br>
<span style="color: rgb(102, 102, 102);">> "lvreduce -L-641G /dev/vg/myth" (to get the size matched up with 931GB + 698GB [ 2.27TB – 931GB – 698GB)</span><br>
<span style="color: rgb(102, 102, 102);">> "mkfs.jfs /dev/vg/myth" (recreate the filesystem now that the size has been corrected) </span><br>
<span style="color: rgb(102, 102, 102);">> remount /dev/vg/myth</span><br>
<span style="color: rgb(102, 102, 102);">> copy back the files</span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> Thanks in advance</span><br>
<span style="color: rgb(102, 102, 102);">> Mike </span><br>
<span style="color: rgb(102, 102, 102);">> </span><br>
<span style="color: rgb(102, 102, 102);">> _______________________________________________</span><br>
<span style="color: rgb(102, 102, 102);">> linux-lvm mailing list</span><br>
<span style="color: rgb(102, 102, 102);">> <a href="mailto:linux-lvm@redhat.com">linux-lvm@redhat.com</a></span><br>
<span style="color: rgb(102, 102, 102);">> <a target="_blank" href="https://www.redhat.com/mailman/listinfo/linux-lvm"><span style="color: red;">https://www.redhat.com/mailman/listinfo/linux-lvm</span></a></span><br>
<span style="color: rgb(102, 102, 102);">> read the LVM HOW-TO at <a target="_blank" href="http://tldp.org/HOWTO/LVM-HOWTO/"><span style="color: red;">http://tldp.org/HOWTO/LVM-HOWTO/</span></a></span><br>
<br>
_______________________________________________<br>
linux-lvm mailing list<br>
<a href="mailto:linux-lvm@redhat.com">linux-lvm@redhat.com</a><br>
<a target="_blank" href="https://www.redhat.com/mailman/listinfo/linux-lvm"><span style="color: red;">https://www.redhat.com/mailman/listinfo/linux-lvm</span></a><br>
read the LVM HOW-TO at <a target="_blank" href="http://tldp.org/HOWTO/LVM-HOWTO/"><span style="color: red;">http://tldp.org/HOWTO/LVM-HOWTO/</span></a><br>
<br>
</blockquote></HTML>