LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-22-2008, 12:08 AM   #1
hector3rd
Member
 
Registered: Jul 2007
Location: Aruba
Distribution: Debian, Ubuntu, Fedora, Knoppix, etc...
Posts: 38
Blog Entries: 1

Rep: Reputation: 16
Angry Extended a LV size, but df shows orig size, using DEBIAN ETCH, on a AMD64


Hi,

I extended the VG, PV,and LV sizes by 232GB from /dev/sdb.
lvscan and lvdisplay show proper size, but df -h does not.
Can someone clarify this for me, or show me what to do , so that
df -h shows the "real" size of 368GB, instead of the orig size of 135GB.

Thanks in advance!!
:-) Hector3rd

Output from lvm follows:
<<<<<<<<<<<<<<<<<<<<<<<<

century4:~# lvm
lvm> vgs -v
Finding all volume groups
Finding volume group "century4"
VG Attr Ext #PV #LV #SN VSize VFree VG UUID
century4 wz--n- 4.00M 3 5 0 614.57G 1.31G
lvm> pvscan -v
Wiping cache of LVM-capable devices
Wiping internal VG cache
Walking through all physical volumes
PV /dev/hda5 VG century4 lvm2 [148.81 GB / 0 free]
PV /dev/sda VG century4 lvm2 [232.88 GB / 904.00 MB free]
PV /dev/sdb VG century4 lvm2 [232.88 GB / 440.00 MB free]
Total: 3 [614.57 GB] / in use: 3 [614.57 GB] / in no VG: 0 [0 ]
lvm> lvscan -v
Finding all logical volumes
ACTIVE '/dev/century4/root' [6.68 GB] inherit
ACTIVE '/dev/century4/swap_1' [5.85 GB] inherit
ACTIVE '/dev/century4/home' [368.74 GB] inherit
ACTIVE '/dev/century4/opt' [50.00 GB] inherit
ACTIVE '/dev/century4/usrlocal' [182.00 GB] inherit
lvm> quit
Exiting.
century4:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/century4-root
6.6G 3.0G 3.3G 48% /
tmpfs 1007M 0 1007M 0% /lib/init/rw
udev 10M 68K 10M 1% /dev
tmpfs 1007M 0 1007M 0% /dev/shm
/dev/hda1 236M 20M 204M 9% /boot
/dev/mapper/century4-home
135G 63G 66G 49% /home
/dev/mapper/century4-opt
50G 180M 47G 1% /opt
/dev/mapper/century4-usrlocal
180G 44G 127G 26% /usr/local
century4:~# lvdisplay /dev/century4/home
--- Logical volume ---
LV Name /dev/century4/home
VG Name century4
LV Write Access read/write
LV Status available
# open 1
LV Size 368.74 GB
Current LE 94397
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 254:2

century4:~#
 
Old 04-22-2008, 12:20 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,353

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
The filesystem doesn't know you have resized it's "partition" - resize that as well; how depends on the filesystem involved.
 
Old 04-22-2008, 12:29 AM   #3
hector3rd
Member
 
Registered: Jul 2007
Location: Aruba
Distribution: Debian, Ubuntu, Fedora, Knoppix, etc...
Posts: 38
Blog Entries: 1

Original Poster
Rep: Reputation: 16
ext2 is the fs, how do I resize?
what step did I leave out to simply increase /home?
 
Old 04-22-2008, 12:31 AM   #4
hector3rd
Member
 
Registered: Jul 2007
Location: Aruba
Distribution: Debian, Ubuntu, Fedora, Knoppix, etc...
Posts: 38
Blog Entries: 1

Original Poster
Rep: Reputation: 16
sorry, it is ext3 fs, but how do I check, just to make sure....
thx!!
 
Old 04-22-2008, 12:41 AM   #5
hector3rd
Member
 
Registered: Jul 2007
Location: Aruba
Distribution: Debian, Ubuntu, Fedora, Knoppix, etc...
Posts: 38
Blog Entries: 1

Original Poster
Rep: Reputation: 16
When I execute the command mount, I get:
/dev/mapper/century4-home on /home type ext3 (rw)
 
Old 04-22-2008, 06:46 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,353

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
resize2fs - see the manpage. ext3 is just ext2 plus a journal - the ext2 utilities (generally) are used on ext3.
 
Old 04-22-2008, 07:47 AM   #7
hector3rd
Member
 
Registered: Jul 2007
Location: Aruba
Distribution: Debian, Ubuntu, Fedora, Knoppix, etc...
Posts: 38
Blog Entries: 1

Original Poster
Rep: Reputation: 16
Hi syg00,
I was about to tar/move my data, then re-partition the lv to get all the space, then move/untar back the data.
But, this command is much easier.
Many thanks for the advice.


Hector3rd
 
Old 04-22-2008, 07:48 AM   #8
hector3rd
Member
 
Registered: Jul 2007
Location: Aruba
Distribution: Debian, Ubuntu, Fedora, Knoppix, etc...
Posts: 38
Blog Entries: 1

Original Poster
Rep: Reputation: 16
This is excellent support.

Last edited by hector3rd; 04-22-2008 at 07:49 AM. Reason: Double posted the same thread.
 
Old 04-23-2008, 05:36 AM   #9
hector3rd
Member
 
Registered: Jul 2007
Location: Aruba
Distribution: Debian, Ubuntu, Fedora, Knoppix, etc...
Posts: 38
Blog Entries: 1

Original Poster
Rep: Reputation: 16
This thread is now solved. See below.

century4:~# df -h
/dev/mapper/century4-home
135G 63G 66G 49% /home
century4:~# lvdisplay /dev/century4/home
--- Logical volume ---
LV Name /dev/century4/home
VG Name century4
LV Write Access read/write
LV Status available
# open 1
LV Size 368.74 GB
Current LE 94397
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 254:2

century4:~# resize2fs /dev/century4/home
resize2fs 1.40-WIP (14-Nov-2006)
Filesystem at /dev/century4/home is mounted on /home; on-line resizing required
old desc_blocks = 9, new_desc_blocks = 24
Performing an on-line resize of /dev/century4/home to 96662528 (4k) blocks.
The filesystem on /dev/century4/home is now 96662528 blocks long.

century4:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/century4-home
363G 63G 283G 19% /home
 
  


Reply

Tags
lvm2, resize2fs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File manager shows inaccurate partition size. expat Linux - Laptop and Netbook 1 10-21-2006 10:20 AM
recomanded size for Extended partition flowerman Solaris / OpenSolaris 1 01-05-2006 03:28 AM
/boot size and primary vs. extended partitions Seiken Slackware 8 03-02-2005 10:49 PM
tab in Konsole shows size true_atlantis Linux - Software 5 02-19-2004 11:29 PM
root partition shows wrong total size Dergro Linux - General 12 10-08-2003 12:49 PM


All times are GMT -5. The time now is 01:08 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration