Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th January 2013, 12:45
ande ande is offline
Junior Member
 
Join Date: Jan 2008
Location: Freiburg, Germany
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Smile Moving /var to another LVM: Keep quotas?

Hi there,

I have four LVMs on top of a RAID 1, like this:

Code:
Dateisystem          1K‐Blcke   Benutzt Verfgbar Ben% Eingehngt auf
/dev/mapper/vg0-root  31209468  20995024   8641580  71% /
tmpfs                  4095408         0   4095408   0% /lib/init/rw
udev                   4089952       176   4089776   1% /dev
tmpfs                  4095408         0   4095408   0% /dev/shm
/dev/md0                254699     20116    221431   9% /boot
/dev/mapper/vg0-lv1  104031520    192248  98596392   1% /lv1
/dev/mapper/vg0-lv2  104031520    192248  98596392   1% /lv2
/dev/mapper/vg0-lv3  486220392   8893844 452822436   2% /lv3
As / is getting filled up and I need more space in the future, I'd like to move /var to /lv1.

I thought I'll boot into my rescue system, mount / and /lv1, them move the contents of folder /var into /lv1 (currently empty) - and then I'd need the right /ec/fstab changes in order to make the quota functioning again.

I'm not sure about the mount options - plus it's a production server...

All the lv's are on top of a RAID1 /dev/md1

Any hints?

Added question: Will the links be preserved when I move stuff? Options for moving? rsync -a ?

Last edited by ande; 8th January 2013 at 13:00.
Reply With Quote
Sponsored Links
  #2  
Old 9th January 2013, 12:24
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

When you are in the rescue system, copy everything from /var 7o /lv1:

Code:
cp -pfr /var/* /lv1/
Rename /var to something else and /lv1 to /var:
Code:
mv /var /var_orig
mv /lv1 /var
Then adjust your /etc/fstab. Mount options should probably be the same as for /.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 10th January 2013, 01:34
ande ande is offline
Junior Member
 
Join Date: Jan 2008
Location: Freiburg, Germany
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Danke erst mal. Soweit alles verstanden, aber wenn ich im Rescue-System (Hetzner) im / - Filesystem den Ordner /lv1 in (das neue) /var umbenenne, dann hat doch das LVM-System noch nicht verstanden, dass es jetzt nicht auf /lv1 sondern auf /var mounten soll?

Wie vermeide ich da Unsinn?

Danke schon mal...
Reply With Quote
  #4  
Old 10th January 2013, 19:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

English, please!

It doesn't matter to LVM where you mount a volume.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 10th January 2013, 19:39
ande ande is offline
Junior Member
 
Join Date: Jan 2008
Location: Freiburg, Germany
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
 
Default

Oh, I'm sorry for switching into German...

Thanks, I see.. I overlooked that the mounting command for the logical volume is in /etc/fstab, too.. my bad.

Thanks for answering!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disk Usage Help? Unfaiir Installation/Configuration 13 20th September 2012 21:23
separate /var /tmp /boot on lvm u4david Installation/Configuration 11 6th May 2010 05:12
Separate /var /tmp /boot on lvm fathertime Installation/Configuration 1 6th March 2010 13:18
Ubuntu 9.04 (Intrepid) JeOS with LVM Hangs on Boot, Checking Quotas... doughold Installation/Configuration 1 19th October 2009 03:47
Moving /var to a new drive & renaming mount point tdd_topdog Technical 2 12th July 2006 06:10


All times are GMT +2. The time now is 03:42.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.