[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: partition magic-ally



prash wrote:

hello,
 i installed the partitions using lvm on my home machine which only
has 10 GB.

here is a df -h:

mantra:/home/prash# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/rootvol-root
                     1.7G  200M  1.4G  13% /
tmpfs                 126M     0  126M   0% /dev/shm
/dev/mapper/rootvol-home
                     2.8G   40M  2.6G   2% /home
/dev/mapper/rootvol-usr
                     1.7G  1.5G   59M  97% /usr
/dev/mapper/rootvol-usr_local
                     2.8G  472M  2.2G  18% /usr/local

---------------

i then realised /usr has no more free space. so, i used a combination
of lvreduce and lvextend to change the sizes a little bit and here is
the output of lvdisplay:

--------------

mantra:/home/prash# lvdisplay
 --- Logical volume ---
 LV Name                /dev/rootvol/root
 VG Name                rootvol
 LV UUID                bgdtx8-x12o-hH3U-0GZY-iWVk-9Z0Z-dE1nUF
 LV Write Access        read/write
 LV Status              available
 # open                 1
 LV Size                1.75 GB
 Current LE             448
 Segments               1
 Allocation             inherit
 Read ahead sectors     0
 Block device           254:0

 --- Logical volume ---
 LV Name                /dev/rootvol/usr
 VG Name                rootvol
 LV UUID                a0j5aF-ej5f-fq9y-j32N-TA1I-aLmG-zAR5xB
 LV Write Access        read/write
 LV Status              available
 # open                 1
 LV Size                2.75 GB
 Current LE             704
 Segments               2
 Allocation             inherit
 Read ahead sectors     0
 Block device           254:1

 --- Logical volume ---
 LV Name                /dev/rootvol/usr_local
 VG Name                rootvol
 LV UUID                wO8fh0-H7Wc-e1Nf-Ek6M-Ek51-r1As-ifZmhj
 LV Write Access        read/write
 LV Status              available
 # open                 1
 LV Size                2.75 GB
 Current LE             704
 Segments               1
 Allocation             inherit
 Read ahead sectors     0
 Block device           254:2

 --- Logical volume ---
 LV Name                /dev/rootvol/home
 VG Name                rootvol
 LV UUID                JjAi4a-NqqR-8n8G-eaHU-eVQV-8sIi-hYsD0l
 LV Write Access        read/write
 LV Status              available
 # open                 1
 LV Size                1.73 GB
 Current LE             444
 Segments               2
 Allocation             inherit
 Read ahead sectors     0
 Block device           254:3

 --- Logical volume ---
 LV Name                /dev/rootvol/swap
 VG Name                rootvol
 LV UUID                ShUUbV-q6Im-fVIj-2EPF-w1jz-DUQp-CWrfDF
 LV Write Access        read/write
 LV Status              available
 # open                 1
 LV Size                556.00 MB
 Current LE             139
 Segments               1
 Allocation             inherit
 Read ahead sectors     0
 Block device           254:4

------------------------


as can be seen, it says that /dev/rootvol/usr (which is mapped to /usr)
has 2.75G now and /home has reduced to 1.73G.
my problem is that df -h is still showing the old status (/usr is still
1.7G and /home is still 2.8G)! no change at all!
how come lvdisplay is showing the changes in the logical volumes, but
df is not showing them?
i am assuming df is the right representation of my system, so what's up
with lvm?

any help will be much appreciated,
-prash.

Hello!

I did not follow this thread from it's very beginning, but did you reduce the size of the filesystem before reducing the volume ? df shows the size of the filesystem, not of the device underneath. Something like

ext2resize /dev/mapper/root-vol-usr
lvreduce /dev/mapper/root-vol-usr

Regards,
Ionut



Reply to: