LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-02-2017, 10:07 AM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Rep: Reputation: Disabled
Increase /dev/mapper/VolGroup-lv size


As seen, I ran out of space on my root partition. I've taken the following steps, but df still shows it being filled. What have I done wrong? Thanks

EDIT 1. Rebooted the machine, and now I can not putty into it.
EDIT 2. Sorry, I don't know how to add an image to a LinuxQuestions post, however, included a picture of the physical machine monitor https://s27.postimg.org/qkfjszusj/IMG_1077.jpg

Code:
[Michael@devserver datalogger]$ df -aTh
Filesystem           Type         Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                     ext4          50G   47G  8.9M 100% /
proc                 proc            0     0     0    - /proc
sysfs                sysfs           0     0     0    - /sys
devpts               devpts          0     0     0    - /dev/pts
tmpfs                tmpfs        5.8G     0  5.8G   0% /dev/shm
/dev/sda1            ext4         477M  177M  275M  40% /boot
/dev/mapper/VolGroup-lv_home
                     ext4         985G   55G  880G   6% /home
/dev/mapper/VolGroup-lv_mysql
                     ext3          99G  498M   93G   1% /var/lib/mysql
none                 usbfs           0     0     0    - /home/vbox/vbusbfs
none                 binfmt_misc     0     0     0    - /proc/sys/fs/binfmt_misc
[Michael@devserver datalogger]$ cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sat Apr 19 05:57:56 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root /                       ext4    defaults        1 1
UUID=12a081eb-285e-4599-95ab-db23b70280df /boot                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_home  /home                  ext4    defaults        1 2
/dev/mapper/VolGroup-lv_mysql /var/lib/mysql         ext3    barrier=0       1 2
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
none /home/vbox/vbusbfs usbfs rw,devgid=496
504,devmode=664 0 0
[Michael@devserver datalogger]$ sudo cp -R /home /var/lib/mysql/home
[sudo] password for Michael:
[Michael@devserver datalogger]$ df -aTh
Filesystem           Type         Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                     ext4          50G   47G  6.1M 100% /
proc                 proc            0     0     0    - /proc
sysfs                sysfs           0     0     0    - /sys
devpts               devpts          0     0     0    - /dev/pts
tmpfs                tmpfs        5.8G     0  5.8G   0% /dev/shm
/dev/sda1            ext4         477M  177M  275M  40% /boot
/dev/mapper/VolGroup-lv_home
                     ext4         985G   55G  880G   6% /home
/dev/mapper/VolGroup-lv_mysql
                     ext3          99G   55G   39G  59% /var/lib/mysql
none                 usbfs           0     0     0    - /home/vbox/vbusbfs
none                 binfmt_misc     0     0     0    - /proc/sys/fs/binfmt_misc
[Michael@devserver datalogger]$ sudo lvreduce --size 200G /dev/mapper/VolGroup-lv_home
[sudo] password for Michael:
  WARNING: Reducing active and open logical volume to 200.00 GiB.
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce VolGroup/lv_home? [y/n]: y
  Size of logical volume VolGroup/lv_home changed from 1000.00 GiB (256000 extents) to 200.00 GiB (51200 extents).
  Logical volume lv_home successfully resized.
[Michael@devserver datalogger]$ df -aTh
Filesystem           Type         Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                     ext4          50G   47G  5.9M 100% /
proc                 proc            0     0     0    - /proc
sysfs                sysfs           0     0     0    - /sys
devpts               devpts          0     0     0    - /dev/pts
tmpfs                tmpfs        5.8G     0  5.8G   0% /dev/shm
/dev/sda1            ext4         477M  177M  275M  40% /boot
/dev/mapper/VolGroup-lv_home
                     ext4         985G   55G  880G   6% /home
/dev/mapper/VolGroup-lv_mysql
                     ext3          99G   55G   39G  59% /var/lib/mysql
none                 usbfs           0     0     0    - /home/vbox/vbusbfs
none                 binfmt_misc     0     0     0    - /proc/sys/fs/binfmt_misc
[Michael@devserver datalogger]$ sudo lvextend -L+500G /dev/mapper/VolGroup-lv_root
  Size of logical volume VolGroup/lv_root changed from 50.00 GiB (12800 extents) to 550.00 GiB (140800 extents).
  Logical volume lv_root successfully resized.
[Michael@devserver datalogger]$ df -aTh
Filesystem           Type         Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                     ext4          50G   47G  4.8M 100% /
proc                 proc            0     0     0    - /proc
sysfs                sysfs           0     0     0    - /sys
devpts               devpts          0     0     0    - /dev/pts
tmpfs                tmpfs        5.8G     0  5.8G   0% /dev/shm
/dev/sda1            ext4         477M  177M  275M  40% /boot
/dev/mapper/VolGroup-lv_home
                     ext4         985G   55G  880G   6% /home
/dev/mapper/VolGroup-lv_mysql
                     ext3          99G   55G   39G  59% /var/lib/mysql
none                 usbfs           0     0     0    - /home/vbox/vbusbfs
none                 binfmt_misc     0     0     0    - /proc/sys/fs/binfmt_misc
[Michael@devserver datalogger]$

Last edited by NotionCommotion; 01-02-2017 at 10:54 AM.
 
Old 01-02-2017, 11:15 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,192

Rep: Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087
A partition, logical volume etc is just a container for the filesystem and one can be changed without regards to the other. Without using the -r option or taking into consideration the warning you reduced the size of the home LV but not the filesystem itself. In addition you increased the size of the root LV but not the filesystem itself which is why they are the same size as first posted.

Post the output of the command
pvdisplay
 
Old 01-02-2017, 11:27 AM   #3
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
Thanks michaelk,

I am unable to execute pvdisplay, or any other commands for that mater. Since this post was specifically about increasing partition sizes, I posted a separate post about my immediate issues at http://www.linuxquestions.org/questi...nd-4175596631/. If you feel I should have just have one post, please delete the new one.

Thanks
 
  


Reply


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
Kernel Panic Error: mount according to mtab /dev/mapper/VolGroup-lv_root is already mounted or /sysroot is busy theopsguy CentOS 0 04-22-2016 07:44 AM
Increase /dev/mapper/VolGroup-lv_home by adding an extra hard drive in liux system boby.kumar Linux - Newbie 8 08-08-2013 08:45 AM
create /dev/mapper/volgroup-volume -> ../dm-N Zimmi84 Linux - Server 0 07-20-2013 08:44 PM
Increase dev/sdb size - LVM karlochacon Linux - Newbie 1 05-21-2011 09:23 PM
mouting LVM. /dev/VolGroup and knoppix Tux Fedora 1 09-04-2006 10:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:12 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration