LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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-12-2002, 02:47 AM   #1
chuck77
Member
 
Registered: Nov 2001
Location: singapore
Posts: 120

Rep: Reputation: 15
Partitioning the system..


Filesystem 1k-blocks Used Available Use% Mounted on
/dev/ida/c0d0p11 248911 78495 157565 34% /
/dev/ida/c0d0p2 201487 3807 187276 2% /boot
/dev/ida/c0d0p10 706752 34280 636572 6% /home
/dev/ida/c0d0p7 1766968 20 1677192 1% /opt
/dev/ida/c0d0p9 706752 880 669972 1% /tmp
/dev/ida/c0d0p6 1815116 581792 1141120 34% /usr
/dev/ida/c0d0p5 2015904 51848 1861652 3% /var


Above is my current filesystem. If i were to shift 50% of /var diskspace to /home. How do i do it ...without damaging the data ?

I dont wish to format and setup the server all over again.
This server is used as a mail server with arould 50 users.

Any advise...and thanks for viewing.

Mark...

PS: using RedHat 7.1 on Compaq Proliant Server

Last edited by chuck77; 03-12-2002 at 02:51 AM.
 
Old 03-12-2002, 12:02 PM   #2
Sixpax
Member
 
Registered: Mar 2002
Distribution: Mandrake 8.1
Posts: 386

Rep: Reputation: 31
This is why I hate making so many partitions on a system... just look at /opt. You have 1.7 gig allocated to /opt and only 20k in use. The ONLY reason to make seperate partitions is if you want to limit how much space can be used by that mount point (unless you are making an NFS server where mount points give you more security), otherwise you get yourself into these types of situations. You would have been much better off just having /, /tmp, /usr, and /home as partitions.

The only utility I know of that will let you do this is Partition Magic. I believe it works with linux partitions now.

To do this manually will be a bit difficult, but it can be done.

If this were my system I would think about swapping the /opt and /home partitions. Here's how I would do that...

1) Shutdown to single user mode, or boot to failsafe/maintenance mode.

2) copy all the data in /home to /home.old (on the root partiton):

mkdir /home.old
cd /home.old
tar -cf - -C /home . | tar -xvf -

3) copy all the data in /opt to /opt.old:

mkdir /opt.old
cd /opt.old
tar -cf - -C /opt . | tar -xvf -

4) unmount /home and /opt

5) edit /etc/fstab and switch the mount points for /home and /opt

6) remount /home and /opt

7) remove all the data on both partitions

8) restore the data

cd /home
tar -cf - -C /home.old . | tar -xvf -
cd /opt
tar -cf - -C /opt.old . | tar -xvf -

9) remove /home.old and /opt.old

10) reboot

Good luck!
 
Old 03-12-2002, 07:01 PM   #3
chuck77
Member
 
Registered: Nov 2001
Location: singapore
Posts: 120

Original Poster
Rep: Reputation: 15
what if i were to add /opt and /home together .. as /home

how should i go abt doing it ??
 
Old 03-12-2002, 10:01 PM   #4
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
Aside from Partition Magic, you may rather look into using GNU Parted. If it wasn't installed during the initial setup, or you are not sure, it's on one of the three discs. Just install from there and read up on how to resize with it. It's a good little utility, you just need to be carefull as with any parting and make backups that you can just rename if you lose a part. etc...
 
Old 03-13-2002, 10:59 AM   #5
Sixpax
Member
 
Registered: Mar 2002
Distribution: Mandrake 8.1
Posts: 386

Rep: Reputation: 31
The only way to do that is to use a partitioning utility like fdisk or harddrake, which will destroy all the data on those partitons. It won't work though if the 2 partitons aren't right together on the disk. Looking at your device file numbers, it looks like /home and /tmp are probably better candidates for merging. You can still use the procedure above to copy and restore the data though.

I think at this point, Partition Magic Pro would be a worthwhile investment... it can do everything you want and not affect the data.
 
Old 03-13-2002, 07:03 PM   #6
chuck77
Member
 
Registered: Nov 2001
Location: singapore
Posts: 120

Original Poster
Rep: Reputation: 15
Pardon me...for my ignorance. How do i use Partition Magic 7 ??

I've got 2 disks of Partition Magic 7 and disk 2 is the one doing the partition job. How do i run it in Linux ?? : )

Pls advise..

Mark
 
Old 03-13-2002, 09:19 PM   #7
chuck77
Member
 
Registered: Nov 2001
Location: singapore
Posts: 120

Original Poster
Rep: Reputation: 15
Server A is Redhat 6.2 LAN file server and ( mail server for now)

Filesystem 1k-blocks Used Available Use% Mounted on
/dev/ida/c0d0p9 256777 46588 196930 19% /
/dev/ida/c0d0p1 19734 2861 15854 15% /boot
/dev/ida/c0d0p10 22581244 20947324 486832 98% /home
/dev/ida/c0d0p5 10325000 8554924 1245596 87% /opt
/dev/ida/c0d0p6 1036060 710016 273416 72% /usr
/dev/ida/c0d0p8 256777 174036 69482 71% /var



Server B Redhat 7.1 is our public mail relaying server

Filesystem 1k-blocks Used Available Use% Mounted on
/dev/ida/c0d0p11 248911 78494 157566 34% /
/dev/ida/c0d0p2 201487 3807 187276 2% /boot
/dev/ida/c0d0p10 706752 33476 637376 5% /home
/dev/ida/c0d0p7 1766968 20 1677192 1% /opt
/dev/ida/c0d0p9 706752 880 669972 1% /tmp
/dev/ida/c0d0p6 1815116 581792 1141120 34% /usr
/dev/ida/c0d0p5 2015904 29048 1884452 2% /var


I wonder if it works here...

Server A /opt which contains our Lotus Notes server is going to be kill off. I have already setup a webmail (Hotmail like) on Server B which stores all the mails on the /home.

I am goin to resize Server A /opt and distribute abt 2Gb to Server A /home and the rest to Server B /home by mount on to Server B file system. It complicated here...: )

Can it be done ?

Pls advise..all gurus here.

Hear from u..
 
Old 03-14-2002, 09:17 AM   #8
Sixpax
Member
 
Registered: Mar 2002
Distribution: Mandrake 8.1
Posts: 386

Rep: Reputation: 31
I believe you can make a boot floppy with PM that will run a text based version of the software. Just bring that floppy to your Linux box and boot from it. Should be pretty simple.
 
  


Reply



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
DISCUSSION: A Short Guide to Partitioning a Hard Drive for a Linux System moses LinuxAnswers Discussion 33 07-06-2014 12:36 PM
Partitioning for dual-system Linunix Linux - Newbie 7 11-04-2005 07:53 AM
Mandriva's partitioning system - Can it partition NTFS relatively flawlessly? eBopBob Mandriva 1 07-08-2005 04:10 PM
Mandrake V10 Install partitioning error. system hang pdkcphil Mandriva 2 04-29-2004 03:00 AM
Rewriting the system then partitioning thorman82 Linux - General 2 11-30-2003 07:20 AM

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

All times are GMT -5. The time now is 06:09 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
Open Source Consulting | Domain Registration