Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LVM Question [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
ctd.mh3
n00b
n00b


Joined: 14 May 2008
Posts: 35
Location: Minnesota, USA

PostPosted: Fri Jan 23, 2009 4:40 pm    Post subject: LVM Question [solved] Reply with quote

Hey there,

I have most likely a simple question concerning LVM that I figured someone might be able to provide some insight into.

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”.

My steps:
Code:

fdisk /dev/sdc [created 1 partition to span the entire drive of type 8e]
emerge lvm2
vgscan
vgchange -a y
pvcreate /dev/sdc1
vgcreate vg /dev/sdc1
lvcreate -L900GB -nmyth vg
mkfs.jfs /dev/vg/myth
fdisk /dev/sdb [created 1 partition to span the entire drive of type 8e]
pvcreate /dev/sdb1
vgextend vg /dev/sdb1
lvextend -L+700G /dev/vg/myth


Sdb1: 700GB drive with one partition
Sdd1: 1TB drive with one partition

My question is related to the space available in /dev/vg/myth. I would assume that I should have ~1.7TB of space on that logical partition, but df does not seems to indicate that.

Code:
# df
Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/mapper/vg-myth  943656628 544996248 398660380  58% /mnt/store

mythserver michael # pvdisplay /dev/sdb1
  --- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               vg
  PV Size               698.64 GB / not usable 2.34 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              178850
  Free PE               292
  Allocated PE          178558
  PV UUID               SetyUA-DkWL-zDDo-W8Om-3avR-nJH8-OnUujv

mythserver michael # pvdisplay /dev/sdc1
  --- Physical volume ---
  PV Name               /dev/sdc1
  VG Name               vg
  PV Size               931.51 GB / not usable 3.19 MB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              238466
  Free PE               0
  Allocated PE          238466
  PV UUID               DX11mo-r0Eh-jN5N-objS-oqo6-eVSU-MShkS2

mythserver michael # lvextend -L+700G /dev/vg/myth
  Extending logical volume myth to 2.27 TB
  Insufficient free space: 179200 extents needed, but only 292 available


I am guessing that I should have run these commands to extend the logical volume to its desired size:
Code:

vgextend vg /dev/sdb1
lvextend -L+700G /dev/vg/myth


before creating the filesystem with this command which I am guessing locked the size to the 900GB with I used in my setup steps
Code:

mkfs.jfs /dev/vg/myth


Does that sound like my issue?

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?

I am thinking that the following steps should work:
    Copy all of my files on /dev/mapper/vg-myth to other paritions (I assume the call to mkfs.jfs below will delete all the contents of this partition)
    "lvreduce -L-641G /dev/vg/myth" (to get the size matched up with 931GB + 698GB [ 2.27TB – 931GB – 698GB)
    "mkfs.jfs /dev/vg/myth" (recreate the filesystem now that the size has been corrected)
    remount /dev/vg/myth
    copy back the files


Thanks in advance
Mike
Back to top
View user's profile Send private message
ctd.mh3
n00b
n00b


Joined: 14 May 2008
Posts: 35
Location: Minnesota, USA

PostPosted: Fri Jan 23, 2009 6:52 pm    Post subject: LVm Question Solved Reply with quote

I was able to get an answer from the LVM mailing list.

Here is the thread.

http://www.redhat.com/archives/linux-lvm/2009-January/msg00058.html

All that was needed was:
Code:

mount -o remount,resize /dev/vg/myth


Mike
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum