LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 06-30-2003, 01:30 PM   #1
puzz_1
Member
 
Registered: May 2003
Posts: 49

Rep: Reputation: 15
move /tmp


I have a my / partition which is nearly full /opt is also on the same partition and is occupying almost 50% of /

Can I move /opt to a second hard disk (with dd or cp) and then add an entry in /etc/fstab so that it looks like

LABEL=/ / ext3 auto 11
LABEL=/opt /opt ext3 auto 11


and mtab looks like

/dev/hda6 / ext3 rw 0 0
/dev/hdb1 /opt ext3 rw 0 0


does this look right?
 
Old 06-30-2003, 01:48 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
well mtab won't loko like anything, as you shouldn't edit it yourself. best way to move the /opt branch is probably...

mkdir /mnt/opt
find -xdev /opt | cpio -pvd /mnt

as this will take care of symlinks and such like.
 
Old 06-30-2003, 03:03 PM   #3
puzz_1
Member
 
Registered: May 2003
Posts: 49

Original Poster
Rep: Reputation: 15
But then /opt becomes /mnt/opt
What happens to all my paths (exports) do I have to change them to /mnt/opt

I wanted to move the filesystem so that it still has the /opt label
 
Old 06-30-2003, 03:22 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
hehe, i missed the middle line... that was clever...

mount /dev/hda6 /mnt/opt

where hda6 is the new opt partition. once it's copied you can then delete the contents of /opt and mount the partition there.
 
  


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
kde, /tmp, /var/tmp and all that garba Linux - Software 4 06-17-2005 01:31 PM
Create file using 'touch ./tmp.$$', file tmp.3941 is created, why? huangyanfeng Linux - General 1 04-13-2004 04:36 AM
"/tmp/sv001.tmp/setup.bin" error while installing OO1.1.0 Choey Linux - Software 0 09-16-2003 05:52 PM
Numerous scb_*.tmp files in /tmp dburk Programming 3 08-18-2003 05:28 PM
Newbie question - /tmp /var/tmp Mr happy Linux - Security 3 01-27-2003 02:03 PM


All times are GMT -5. The time now is 01:47 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration