How to extend LVM in UBUNTU10.04 LTS

Asked by ramesh raman

Hi Team,

I am using ubuntu 10.04 LTS to one of my client.The server is in production. one of the partition is reached to 91 %. I need to extend one partition. Kindly advise me how to do in the production server. Partition Name is /home, it comes under LVM.
I am waiting for your valuable reply
Find the below details
root@live:~# vgdisplay
  --- Volume group ---
  VG Name VG1
  System ID
  Format lvm2
  Metadata Areas 1
  Metadata Sequence No 7
  VG Access read/write
  VG Status resizable
  MAX LV 0
  Cur LV 6
  Open LV 6
  Max PV 0
  Cur PV 1
  Act PV 1
  VG Size 49.81 GiB
  PE Size 4.00 MiB
  Total PE 12751
  Alloc PE / Size 11919 / 46.56 GiB
  Free PE / Size 832 / 3.25 GiB
  VG UUID pdUuM2-ig0l-glNg-9G0M-inKZ-8z7X-N07q8W

root@live:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VG1-lv_root
                      7.4G 1.9G 5.2G 27% /
none 6.0G 196K 6.0G 1% /dev
tmpfs 6.0G 0 6.0G 0% /dev/shm
none 6.0G 100K 6.0G 1% /var/run
none 6.0G 0 6.0G 0% /var/lock
none 6.0G 0 6.0G 0% /lib/init/rw
/dev/mapper/VG1-lv_tmp
                      4.6G 517M 3.9G 12% /tmp
/dev/sda1 184M 155M 20M 89% /boot
/dev/mapper/VG1-lv_home
                       23G 20G 2.1G 91% /home
/dev/mapper/VG1-lv_usr
                      4.6G 2.1G 2.3G 48% /usr
/dev/mapper/VG1-lv_var
                      4.6G 3.7G 671M 85% /var
192.168.100.143:/localdatastore/backup/application
                      114G 78G 31G 73% /backup
/dev/sda3 158G 126G 25G 84% /apps

Thanks
Ramesh R

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1
Revision history for this message
ramesh raman (rbmramesh) said :
#2

Thank for your information.But this all only useful for to new installation
time.
1. /home partition is already in use and it contains 21GB data.
2.how to extend this partition(I have 3.25GB free space in VG)
3.My question is if i add the free space to this partition using this
command how the remaining space will change to ext3 format.
1.lvextend -L+3G /dev/mapper/VG1-lv_home
2.resize2fs /dev/mapper/VG1-lv_home
Now i am getting this error what can i do now
/dev/mapper/VG1-lv_home is mounted; can't resize a mounted filesystem!

This is my /etc/fstab entry
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/dev/mapper/VG1-lv_root / ext4 acl,errors=remount-ro 0 1
/dev/sda1 /boot ext3 defaults 0 2
/dev/mapper/VG1-lv_home /home ext4 acl,defaults 0 2
/dev/mapper/VG1-lv_tmp /tmp ext4 defaults 0 2
/dev/mapper/VG1-lv_usr /usr ext4 defaults 0 2
/dev/mapper/VG1-lv_var /var ext4 acl,defaults 0 2
/dev/mapper/VG1-lv_swap none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
/dev/sda3 /apps ext4 defaults 0 2
tmpfs /dev/shm tmpfs defaults,noexec,nosuid 0 0
/home/www/pharma/ /home/pharma/ none bind 0 0

Regards,
Ramesh R

On Tue, Jul 16, 2013 at 7:36 PM, actionparsnip <
<email address hidden>> wrote:

> Your question #232532 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/232532
>
> Status: Open => Answered
>
> actionparsnip proposed the following answer:
> https://wiki.ubuntu.com/Lvm
>
> http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/
>
> http://serverfault.com/questions/38542/ubuntu-resize-the-root-lvm2-partition
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/232532/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/232532
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
ramesh raman (rbmramesh) said :
#4

Dear Team,

Pleas give me solution for this issue. I will expect solution for this.

Regards,

Ramesh

On Thu, Aug 1, 2013 at 2:51 PM, Launchpad Janitor <
<email address hidden>> wrote:

> Your question #232532 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/232532
>
> Status: Open => Expired
>
> Launchpad Janitor expired the question:
> This question was expired because it remained in the 'Open' state
> without activity for the last 15 days.
>
> --
> If you're still having this problem, you can reopen your question either
> by replying to this email or by going to the following page and
> entering more information about your problem:
> https://answers.launchpad.net/ubuntu/+question/232532
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

What is the output of:

uname -a; lsb_release -a

Thanks

Revision history for this message
ramesh raman (rbmramesh) said :
#6

Hi Team,
This is the production server. Please find the details. Please help on this

Linux 351973-app4 2.6.32-39-generic-pae #86-Ubuntu SMP Mon Feb 13 23:05:11
UTC 2 012 i686 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
root@351973-app4:~#

Regards,
ramesh R

On Tue, Aug 6, 2013 at 9:36 PM, actionparsnip <
<email address hidden>> wrote:

> Your question #232532 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/232532
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> What is the output of:
>
> uname -a; lsb_release -a
>
> Thanks
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/232532
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

Lucid is dead on the desktop which is what you have. I suggest you upgrade to Precise either via online update or clean install. Precise is LTS and supported til April 2017.

Your release is not supported in any way.

Revision history for this message
ramesh raman (rbmramesh) said :
#8

Hi Team,

I have server Edition. Please find the details.

Hi Team,
This is the production server. Please find the details. Please help on this

jaiken@live:~$ uname -a; lsb_release -a
Linux live.pharmalife.co.uk 2.6.32-42-generic-pae #95-Ubuntu
3:09 UTC 2012 i686 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
jaiken@live:~$

Regards,
Ramesh

On Tue, Aug 6, 2013 at 11:46 PM, actionparsnip <
<email address hidden>> wrote:

> Your question #232532 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/232532
>
> Status: Open => Answered
>
> actionparsnip proposed the following answer:
> Lucid is dead on the desktop which is what you have. I suggest you
> upgrade to Precise either via online update or clean install. Precise
> is LTS and supported til April 2017.
>
> Your release is not supported in any way.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/232532/+confirm?answer_id=6
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/232532
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

It's not server or uname would say server. Hence why I asked.

Revision history for this message
ramesh raman (rbmramesh) said :
#10

Hi Team,
We are running server edition only. If you want any other information i
will send you.

Regards,
Ramesh

On Wed, Aug 7, 2013 at 12:26 AM, actionparsnip <
<email address hidden>> wrote:

> Your question #232532 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/232532
>
> Status: Open => Answered
>
> actionparsnip proposed the following answer:
> It's not server or uname would say server. Hence why I asked.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/232532/+confirm?answer_id=8
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/232532
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#11

What is the output of:

apt-cache policy gedit

Thanks

Revision history for this message
ramesh raman (rbmramesh) said :
#12

Hi Team,

Please find the details.

root@351973-app4:~# apt-cache policy gedit
gedit:
 Installed: (none)
 Candidate: 2.30.3-0ubuntu0.1
 Version table:
    2.30.3-0ubuntu0.1 0
       500 http://mirror.rackspace.com/ubuntu/ lucid-updates/main Packages
    2.30.0git20100413-0ubuntu1 0
       500 http://mirror.rackspace.com/ubuntu/ lucid/main Packages
You have new mail in /var/mail/root
root@351973-app4:~#

Regards,
Ramesh R

On Wed, Aug 7, 2013 at 3:36 PM, actionparsnip <
<email address hidden>> wrote:

> Your question #232532 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/232532
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> What is the output of:
>
> apt-cache policy gedit
>
> Thanks
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/232532
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
ramesh raman (rbmramesh) said :
#13

Hi Team,

My question is /home partition is comes to 93%. How to extend in the
online. What command i need to issue.
1.Home partition size 21GB.
2.I have free space in volume group(Available size 3GB).
3.If i extend the lvm with 3 GB. how it will change all the file system to
Ext3.
4.What command i need to issue(resize2fs or ext2onlie).
5.If i issue any above command it will affect the system in the online.

Kindly advise me. And give me step by step procedure.

Regards,
Ramesh

On Wed, Aug 7, 2013 at 3:46 PM, ramesh raman <
<email address hidden>> wrote:

> Your question #232532 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/232532
>
> Status: Needs information => Open
>
> You gave more information on the question:
> Hi Team,
>
> Please find the details.
>
> root@351973-app4:~# apt-cache policy gedit
> gedit:
> Installed: (none)
> Candidate: 2.30.3-0ubuntu0.1
> Version table:
> 2.30.3-0ubuntu0.1 0
> 500 http://mirror.rackspace.com/ubuntu/ lucid-updates/main Packages
> 2.30.0git20100413-0ubuntu1 0
> 500 http://mirror.rackspace.com/ubuntu/ lucid/main Packages
> You have new mail in /var/mail/root
> root@351973-app4:~#
>
> Regards,
> Ramesh R
>
>
> On Wed, Aug 7, 2013 at 3:36 PM, actionparsnip <
> <email address hidden>> wrote:
>
> > Your question #232532 on Ubuntu changed:
> > https://answers.launchpad.net/ubuntu/+question/232532
> >
> > Status: Open => Needs information
> >
> > actionparsnip requested more information:
> > What is the output of:
> >
> > apt-cache policy gedit
> >
> > Thanks
> >
> > --
> > To answer this request for more information, you can either reply to
> > this email or enter your reply at the following page:
> > https://answers.launchpad.net/ubuntu/+question/232532
> >
> > You received this question notification because you asked the question.
> >
>
>
> --
> Regards
>
> Ramesh R
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

I am no expert with LVM, but based on the error message shown "/dev/mapper/VG1-lv_home is mounted; can't resize a mounted filesystem!" I guess that in your situation you cannot resize the file system while it is mounted - for whatever reason.
It seems to me that you would have to unmount the /home file system to resize it. This, however, might require rebooting the system in some different mode, maybe using a live system.

Can you help with this problem?

Provide an answer of your own, or ask ramesh raman for more information if necessary.

To post a message you must log in.