about df and lvm

2007-12-04 Thread tq01azk
test environment:
centos 4.4 
Linux localhost.localdomain 2.6.9-55.0.12.ELsmp #1 SMP Fri Nov 2 11:19:08 EDT 
2007 i686 i686 i386 GNU/Linux
lvm version
  LVM version: 2.02.21-RHEL4 (2007-03-26)
  Library version: 1.02.17-RHEL4 (2007-04-24)
  Driver version:  4.5.5

I creat  4G of size  lvm  partition.

#df -h 
/dev/mapper/lvtest-lv4.0G  2.6G  1.3G  68% /mnt/lv
#lvdisplay
 --- Logical volume ---
  LV Name/dev/lvtest/lv
  VG Namelvtest
  LV UUIDt4tXV0-UE5j-K7oq-IoXj-hXfP-mgej-CWXQVA
  LV Write Accessread/write
  LV Status  available
  # open 1
  LV Size4.09 GB
  Current LE 131
  Segments   1
  Allocation inherit
  Read ahead sectors 0
  Block device   253:2

then I use the command lvextend to add 800M capatity into the lvm.
but i also see the capatity is 4G by using df,lvdisplay show right information

#lvextend -L +800M /dev/lvtest/lv  
Extending logical volume lv to 4.88 GB
Logical volume lv successfully resized
#df -h
/dev/mapper/lvtest-lv4.0G  2.6G  1.3G  68% /mnt/lv
#lvdisplay 
  --- Logical volume ---
  LV Name/dev/lvtest/lv
  VG Namelvtest
  LV UUIDt4tXV0-UE5j-K7oq-IoXj-hXfP-mgej-CWXQVA
  LV Write Accessread/write
  LV Status  available
  # open 1
  LV Size4.88 GB
  Current LE 156
  Segments   1
  Allocation inherit
  Read ahead sectors 0
  Block device   253:2









2007-12-04 



tq01azk 
___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: about df and lvm

2007-12-04 Thread Philip Rowlands

On Tue, 4 Dec 2007, tq01azk wrote:


test environment:
centos 4.4
Linux localhost.localdomain 2.6.9-55.0.12.ELsmp #1 SMP Fri Nov 2 11:19:08 EDT 
2007 i686 i686 i386 GNU/Linux
lvm version
 LVM version: 2.02.21-RHEL4 (2007-03-26)
 Library version: 1.02.17-RHEL4 (2007-04-24)
 Driver version:  4.5.5

I creat  4G of size  lvm  partition.

#df -h
/dev/mapper/lvtest-lv4.0G  2.6G  1.3G  68% /mnt/lv

[snip]


then I use the command lvextend to add 800M capatity into the lvm.
but i also see the capatity is 4G by using df,lvdisplay show right information

#lvextend -L +800M /dev/lvtest/lv
Extending logical volume lv to 4.88 GB
Logical volume lv successfully resized
#df -h
/dev/mapper/lvtest-lv4.0G  2.6G  1.3G  68% /mnt/lv


Does lvextend affect the logical volume (partition) size or the 
mounted filesystem? I think you'll need to run e2extend or other 
fs-specific tool to expand the filesystem structures, which is what df 
is reporting.



Cheers,
Phil


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: about df and lvm

2007-12-04 Thread Bob Proulx
Philip Rowlands wrote:
 tq01azk wrote:
 #df -h
 /dev/mapper/lvtest-lv4.0G  2.6G  1.3G  68% /mnt/lv
 #lvextend -L +800M /dev/lvtest/lv
 Extending logical volume lv to 4.88 GB
 Logical volume lv successfully resized
 #df -h
 /dev/mapper/lvtest-lv4.0G  2.6G  1.3G  68% /mnt/lv
 
 Does lvextend affect the logical volume (partition) size or the 
 mounted filesystem? I think you'll need to run e2extend or other 
 fs-specific tool to expand the filesystem structures, which is what df 
 is reporting.

lvextend only affects the partition.  After extending a partition it
is necessary to run fsck and resizefs.  Assuming ext3 the flow looks
something like this:

  unmount /dev/vg1/lv1
  lvextend -L+1G /dev/vg1/lv1
  e2fsck -f /dev/vg1/lv1
  resize2fs /dev/vg1/lv1
  mount /dev/vg1/lv1

The LVM HOWTOs explain these fairly well.

Bob


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils