LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-25-2003, 11:36 AM   #1
mohapi
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 208

Rep: Reputation: 30
Partition exchange


root]# df -lah
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 289M 266M 8.0M 98% /
none 0 0 0 - /proc
usbdevfs 0 0 0 - /proc/bus/usb
/dev/hda3 19G 720M 17G 4% /data1
/dev/hda2 19G 192M 18G 2% /data2
none 0 0 0 - /dev/pts
/dev/hda5 4.8G 220M 4.3G 5% /home
none 440M 0 440M 0% /dev/shm
/dev/hda6 4.8G 33M 4.5G 1% /tmp
/dev/hda9 15G 4.1G 10G 28% /usr
/dev/hda7 4.8G 335M 4.2G 8% /var
none 0 0 0 - /proc/sys/fs/binfmt_misc

What are the command steps to exchange my root partition for my tmp to
gain more root space?
Thanks
 
Old 03-25-2003, 02:34 PM   #2
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
-- Please disregard ---

Last edited by nxny; 03-25-2003 at 02:36 PM.
 
Old 03-25-2003, 02:35 PM   #3
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
This could get a bit tricky, so use caution!!

Backup your /etc/fstab as fstab.bak or similar.

Instead of detaching /tmp from /dev/hda6 _live_, I would suggest removing the line that mounts /tmp from /etc/fstab. And reboot. ( If you are really brave, you can try umount /tmp rightaway )

Either way, now is the time to copy the contents of your root partition to your would-be root partition. I would choose to do it one MEG of data ( 1024*1024 bytes ) at a time.
dd if=/dev/hda1 of=/dev/hda6 bs=1048576

After mirroring, you can mount /dev/hda6 under a test directory and see if the contents are intact.

Now edit your / mountpoint on /etc/fstab and replace your root device with /dev/hda6.
mount -a -o remount
to remount all filesystems. If you use the RH mount version, you may have to use -O instead of -o, I cant remember.

Now, if everything works fine, you can mke2fs /dev/hda1 before placing it under /tmp in fstab.

Good Luck.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Exchange Server xgreen Linux - Software 4 03-30-2005 09:06 AM
Exchange clone? ericcarlson Linux - Software 0 05-14-2004 03:26 AM
any subsitution for ms-exchange?? yenonn Linux - Software 12 03-16-2004 08:45 PM
alternatives to exchange? groovin Linux - Software 7 03-27-2003 03:15 PM
MS Exchange tintobg Linux - Networking 2 06-14-2001 05:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:49 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration