Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Linux - Allocate space from one file system to another

Posted on 2013-02-01
4
Medium Priority
?
513 Views
Last Modified: 2013-02-08
Hello,

I'm looking to allocate space from one file system to another for a linux server, we currently use LVM.

The following is the output from df:
[root@server ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/rootdg-rootvol
                      4.8G  2.5G  2.1G  56% /
/dev/mapper/rootdg-varvol
                      6.6G  2.0G  4.3G  32% /var
/dev/mapper/rootdg-usrvol
                      9.7G  2.7G  6.5G  30% /usr
/dev/mapper/rootdg-homevol
                      7.4G  6.0G  1.1G  86% /home
/dev/mapper/rootdg-tmpvol
                      4.8G  149M  4.4G   4% /tmp
/dev/mapper/rootdg-appvol
                      302G  177M  287G   1% /app
/dev/sda1              99M   36M   58M  39% /boot
tmpfs                 950M     0  950M   0% /dev/shm
[root@server ~]#

Open in new window


I'm looking to take the 286G from /app and add it to /home.  I'm not sure the correct procedure to complete this?

Here is some additional information that maybe needed...
[root@server ~]# pvs
  PV         VG     Fmt  Attr PSize  PFree
  /dev/sda2  rootdg lvm2 a--  49.88G    0
  /dev/sdb   rootdg lvm2 a--  99.97G    0
  /dev/sdc   rootdg lvm2 a--  99.97G    0
  /dev/sdd   rootdg lvm2 a--  99.97G    0
[root@ccclxravaftp01 ~]# lvs
  LV      VG     Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  appvol  rootdg -wi-ao 311.72G
  homevol rootdg -wi-ao   7.62G
  rootvol rootdg -wi-ao   4.91G
  swapvol rootdg -wi-ao   3.94G
  tmpvol  rootdg -wi-ao   4.88G
  usrvol  rootdg -wi-ao   9.91G
  varvol  rootdg -wi-ao   6.81G
[root@server ~]#

Open in new window


Any help would be greatly appreciated!
0
Comment
Question by:AIX25
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 19

Expert Comment

by:jools
ID: 38845806
It doesnt look like there is anything in /app but there may be small files. You should back these up first if they exist

Probably easier to remove /app then extend the other file system
lvremove /dev/rootdg/appvol

extend the lv using lvextend then extend the file system using extendfs this assumes ext3 file system, if you use something else then you will need to look at appropriate tools. Sorry, dont have a system in from of me for the exact commands but man pages will be useful here.
0
 

Author Comment

by:AIX25
ID: 38848173
Is there an easier way? We don't want to get rid /app they still want to have space allocated to that file system.  You are correct, there is nothing there, but of course at the moment.  What my question is originally... what are the correct steps if you or anyone else could provide to reduce a file system? And we use ext3 and LVM

1-How to properly reduce the space of a file system (does it have to be umount'ed first?)
2-If multiple commands are needed, what should the correct sequence be?

I don't have any issue with extending a file system; I'm aware on how to complete that.  I've never reduced a file system before, and I know that other people I've worked with in the past have done so and ended up with corrupted file system, and fsck was needed to be run.  Basically, I want to be 100% sure before I run any commands.  Thanks!
0
 

Accepted Solution

by:
AIX25 earned 0 total points
ID: 38848961
0
 

Author Closing Comment

by:AIX25
ID: 38867413
Solution was not provided, found from googleing
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we purchase storage, we typically are advertised storage of 500GB, 1TB, 2TB and so on. However, when you actually install it into your computer, your 500GB HDD will actually show up as 465GB. Why? It has to do with the way people and computers…
Windows Server 2003 introduced persistent Volume Shadow Copies and made 2003 a must-do upgrade.  Since then, it's been a must-implement feature for all servers doing any kind of file sharing.
Teach the user how to install and configure the vCenter Orchestrator virtual appliance Open vSphere Web Client: Deploy vCenter Orchestrator virtual appliance OVA file: Verify vCenter Orchestrator virtual appliance boots successfully: Connect to the …
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question