View previous topic :: View next topic |
Author |
Message |
Hydraulix Guru
Joined: 12 Dec 2003 Posts: 447
|
Posted: Wed Aug 23, 2006 9:46 am Post subject: Problem with lvextend. Sizolved |
|
|
I'm trying to extend my /usr partition by 1G (just to see if this works) and it looks like it works but when I do a df -h I still see 20G. Am I missing something here?
Code: |
compaq dev # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 1.9G 139M 1.7G 8% /
udev 1.6G 196K 1.6G 1% /dev
/dev/sda1 294G 129M 279G 1% /ftp
/dev/mapper/vg-usr 20G 2.7G 17G 15% /usr
/dev/mapper/vg-home 9.9G 129M 9.3G 2% /home
/dev/mapper/vg-opt 5.0G 242M 4.5G 6% /opt
/dev/mapper/vg-var 9.9G 292M 9.1G 4% /var
/dev/mapper/vg-tmp 2.0G 65M 1.9G 4% /tmp
shm 1.6G 0 1.6G 0% /dev/shm
compaq dev # lvextend -L+1G /dev/vg/usr
/dev/cdrom: open failed: No medium found
Attempt to close device '/dev/cdrom' which is not open.
Extending logical volume usr to 21.00 GB
Logical volume usr successfully resized
compaq dev # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 1.9G 139M 1.7G 8% /
udev 1.6G 196K 1.6G 1% /dev
/dev/sda1 294G 129M 279G 1% /ftp
/dev/mapper/vg-usr 20G 2.7G 17G 15% /usr
/dev/mapper/vg-home 9.9G 129M 9.3G 2% /home
/dev/mapper/vg-opt 5.0G 242M 4.5G 6% /opt
/dev/mapper/vg-var 9.9G 292M 9.1G 4% /var
/dev/mapper/vg-tmp 2.0G 65M 1.9G 4% /tmp
shm 1.6G 0 1.6G 0% /dev/shm
|
_________________ It is the fate of operating systems to become free.
- Neal Stephenson
Last edited by Hydraulix on Thu Aug 24, 2006 11:05 pm; edited 1 time in total |
|
Back to top |
|
|
heikole Tux's lil' helper
Joined: 04 Oct 2004 Posts: 148 Location: Berlin, Germany
|
Posted: Wed Aug 23, 2006 11:27 am Post subject: |
|
|
You also have to resize (extend) the filesystem residing on the logical volume /dev/mapper/vg-usr. Extending only the logical volume is not enough. _________________ 42 |
|
Back to top |
|
|
Hydraulix Guru
Joined: 12 Dec 2003 Posts: 447
|
Posted: Wed Aug 23, 2006 1:26 pm Post subject: |
|
|
heikole wrote: | You also have to resize (extend) the filesystem residing on the logical volume /dev/mapper/vg-usr. Extending only the logical volume is not enough. |
[
Ok i tried that but I got this.
Code: |
compaq hydraulix # lvextend -L+2G /dev/mapper/vg-usr
/dev/cdrom: open failed: No medium found
Attempt to close device '/dev/cdrom' which is not open.
Volume group mapper doesn't exist
compaq hydraulix # cd /dev/mapper/
compaq mapper # ls
control vg-home vg-opt vg-tmp vg-usr vg-var
compaq mapper #
|
_________________ It is the fate of operating systems to become free.
- Neal Stephenson |
|
Back to top |
|
|
heikole Tux's lil' helper
Joined: 04 Oct 2004 Posts: 148 Location: Berlin, Germany
|
Posted: Wed Aug 23, 2006 1:34 pm Post subject: |
|
|
Not exactly what I meant
You probably have reiserfs or ext3 or some other filesystem set up on your logical volume. That's why you have to extend the filesystem itself using a command line tool like
Code: | resize_reiserfs /dev/mapper/vg-usr |
Similar commands are available for other (but not all) filesystems. Use
to see what filesystems are in use on your partitions or volumes. _________________ 42 |
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Wed Aug 23, 2006 9:41 pm Post subject: |
|
|
Please post the output of
[EDIT]BTW, I believe you need a space between the -L and the +1G in the lvextend line [/EDIT] _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
razze Apprentice
Joined: 09 Mar 2005 Posts: 161 Location: Espoo, Finland
|
Posted: Thu Aug 24, 2006 6:39 am Post subject: |
|
|
The partition and the filesystem on that partition are not the same thing. They both need to be extended separately before you can use the new space. The output in your original post says that the LV /dev/vg/usr have successfully been extended, and you could verify this by Code: | #lvdisplay /dev/vg/usr |
Now you need to extend the filesystem on that LV, and how to do this depends on the filesystem used. _________________ --------------------------
Linux User #393524
AMD Athlon 64 X2 3800+ @2,3 GHz, Asus A8V, VIA K8T800PRO, Nvidia GeForce 7600GS, 2 Gb Dual Channel DDR RAM, 2x Samsung SP120 200Gb, 2x WD 320Gb, Plextor PX-716A, linux-2.6.31-gentoo-r10 |
|
Back to top |
|
|
Hydraulix Guru
Joined: 12 Dec 2003 Posts: 447
|
Posted: Thu Aug 24, 2006 10:40 pm Post subject: |
|
|
Here's the output. BTW I am using EXT3 on all my filesystems.
Code: |
/dev/hda3 on / type ext3 (rw,noatime,data=journal)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
udev on /dev type tmpfs (rw,nosuid)
devpts on /dev/pts type devpts (rw,nosuid,noexec)
/dev/sda1 on /ftp type ext3 (rw,noatime,data=journal)
/dev/mapper/vg-usr on /usr type ext3 (rw,noatime,data=journal)
/dev/mapper/vg-home on /home type ext3 (rw,noatime,data=journal)
/dev/mapper/vg-opt on /opt type ext3 (rw,noatime,data=journal)
/dev/mapper/vg-var on /var type ext3 (rw,noatime,data=journal)
/dev/mapper/vg-tmp on /tmp type ext3 (rw,noatime,data=journal)
shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
|
Code: |
LV VG Attr LSize Origin Snap% Move Log Copy%
home vg -wi-ao 10.00G
opt vg -wi-ao 5.00G
tmp vg -wi-ao 2.00G
usr vg -wi-ao 22.00G
var vg -wi-ao 10.00
|
Code: |
--- Logical volume ---
LV Name /dev/vg/usr
VG Name vg
LV UUID IcUADG-jATr-JX1n-DL1p-9jI0-kJcS-38SAdz
LV Write Access read/write
LV Status available
# open 1
LV Size 22.00 GB
Current LE 5632
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 254:0
|
_________________ It is the fate of operating systems to become free.
- Neal Stephenson |
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Thu Aug 24, 2006 10:50 pm Post subject: |
|
|
The logical volume is indeed resized now you need to resize the filesystem: Code: | resize2fs /dev/vg/usr | Should do the trick... _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
Hydraulix Guru
Joined: 12 Dec 2003 Posts: 447
|
Posted: Thu Aug 24, 2006 11:01 pm Post subject: |
|
|
drescherjm wrote: | The logical volume is indeed resized now you need to resize the filesystem: Code: | resize2fs /dev/vg/usr | Should do the trick... |
Worked like a charm. Thanks. _________________ It is the fate of operating systems to become free.
- Neal Stephenson |
|
Back to top |
|
|
cayenne l33t
Joined: 17 Oct 2002 Posts: 945 Location: New Orleans
|
Posted: Sun Apr 05, 2009 4:41 pm Post subject: this might do it |
|
|
heikole wrote: | Not exactly what I meant
You probably have reiserfs or ext3 or some other filesystem set up on your logical volume. That's why you have to extend the filesystem itself using a command line tool like
Code: | resize_reiserfs /dev/mapper/vg-usr |
Similar commands are available for other (but not all) filesystems. Use
to see what filesystems are in use on your partitions or volumes. |
Hi All,
I think I need to do this. I have reiserfs. Do you have to unmount the LV that you have expanded with lvextend (successfully) before you can use the reiserfs. I read that is said you needed to for reducing the size, but, what about extending it?
thanks in advance,
cayenne _________________ Light travels faster than sound. This is why some people appear bright until you hear them speak......... |
|
Back to top |
|
|
|