LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-16-2004, 10:02 AM   #1
jordanthompson
Member
 
Registered: Oct 2004
Posts: 115

Rep: Reputation: 15
repartitioning disk hda on fedora - is it worth it?


Now that I have the system up and running, I checked to see how fedora partitioned my hda disk (I have three - hda 80GB contains the OS and the other two are data - hopefully to be mirrored later.) I know I should have watched the installation more carefully....

Here is my /etc/fstab:
Code:
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/hda2               swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0
/dev/hdb1               /export/MyDocuments/pictures        ext3    defaults        0 0
/dev/hdb5               /export/MyDocuments/alex            ext3    defaults        0 0
/dev/hdb6               /export/MyDocuments/jordan          ext3    defaults        0 0
/dev/hdb7               /export/MyDocuments/serena          ext3    defaults        0 0
/dev/hdb8               /export/MyDocuments/mojgan          ext3    defaults        0 0
/dev/hdb9               /export/MyDocuments/tmp             ext3    defaults        0 0
/dev/hdd1               /backup/pictures                    ext3    defaults        0 0
/dev/hdd5               /backup/alex                        ext3    defaults        0 0
/dev/hdd6               /backup/jordan                      ext3    defaults        0 0
/dev/hdd7               /backup/serena                      ext3    defaults        0 0
/dev/hdd8               /backup/mojgan                      ext3    defaults        0 0
Looking at the Harware Browser:
hda1 has 102 MB and is ext3
hda2 has 47 MB and is linux-swap
hda3 has 75767 MB and is ext3

I want to break out some directories on hda into separate partions (i.e. /tmp) so that filling it won't crash the system.

There really is nothing that is critical on hda (other than a few configuration files) so I could reinstall fedora. I would prefer not to do this...

This system only has linux (not dual boot - so I don't have a windows repartion tool available on it without taking out the drive and installing it in a windows box) and provides my family with disk and printing support (scanner and fax to come later) on their windows clients.

I have plenty of room on the other two disks, so I could copy everything from hda to say hdc.
Any suggestions (btw leaving well enough alone is a good suggestion!)

I guess the real questions are:
Can I repartition hda3 without breaking anything?
Does it make sens to do this to provide a limited temporary sized area (I don't use disk quota as everyone in the family logs in on the same account.)
 
Old 10-16-2004, 10:11 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Moved to Hardware at user's request.

It certainly does make sense to have multiple partitions and you shouldn't break anything by using your second hdd as a temporary storage point while you repartition. I would however recommend using a live cd to do the maintanance though.

One thing to watch out for is that you use something like rsync to copy the files so that it is easy to keep permissions and file dates in tact when you perform the copy.
 
Old 10-16-2004, 11:15 AM   #3
jordanthompson
Member
 
Registered: Oct 2004
Posts: 115

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by david_ross
I would however recommend using a live cd to do the maintanance though.
Thanks -
What do you mean by a live CD? Do you mean the rescue cd?
 
Old 10-16-2004, 11:27 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Yes a rescue CD or booting the install CD into rescue mode will work.

Basically, you should not run a partitioning tool on a mounted partitions and you can not unmount / if booting from the hard drive.
 
Old 10-17-2004, 09:42 PM   #5
jordanthompson
Member
 
Registered: Oct 2004
Posts: 115

Original Poster
Rep: Reputation: 15
OK, I'll give it a try. If I boot to the live cd, I assume I won't have the graphical crutch to edit my partitions and I am not too comfortable running fdisk. Do you have any suggesions on how to do this? (maybe a step by step approach to it.)

Here is my take:
1) boot to the live cd,
2) rsync the files from the partition I want to break up to another physical disk.
3) repartition hda3
4) edit /etc/fstab
5) rsync the files back.
6) reboot to the hard disk

BTW, I noticed that hda3 is not mounted anywhere - see previous posting of my fstab. How does this work? Does it automatically mount or something?

How will I handle this in the fstab with the new partitions?

thanks
 
Old 10-18-2004, 09:56 AM   #6
jordanthompson
Member
 
Registered: Oct 2004
Posts: 115

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by jordanthompson

BTW, I noticed that hda3 is not mounted anywhere - see previous posting of my fstab. How does this work? Does it automatically mount or something?
Does anyone know why they are not listed "normally" in the fstab?
 
Old 10-18-2004, 12:31 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Quote:
hda1 has 102 MB and is ext3
hda2 has 47 MB and is linux-swap
hda3 has 75767 MB and is ext3
The default fedora install creates 3 partitions. /,/boot and swap. fedora uses partition labels in the fstab and not device IDs so it really is listed.
Just by guessing according to size:
/dev/hda1 - /boot (fstab ref LABEL=/boot /boot...)
/dev/hda2 - swap (no guessing cause its in your fstab.)
/dev/hda3 - / (root) ( fstab ref LABEL=/ / ext3....)
 
Old 10-18-2004, 12:43 PM   #8
jordanthompson
Member
 
Registered: Oct 2004
Posts: 115

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by jordanthompson
OK, I'll give it a try. If I boot to the live cd, I assume I won't have the graphical crutch to edit my partitions and I am not too comfortable running fdisk. Do you have any suggesions on how to do this? (maybe a step by step approach to it.)

Here is my take:
1) boot to the live cd,
2) rsync the files from the partition I want to break up to another physical disk.
3) repartition hda3
4) edit /etc/fstab
5) rsync the files back.
6) reboot to the hard disk

BTW, I noticed that hda3 is not mounted anywhere - see previous posting of my fstab. How does this work? Does it automatically mount or something?

How will I handle this in the fstab with the new partitions?

thanks
So if I do steps 1-3 and rsync back all the files to "/" (which will now be smaller) I should be OK to boot back to the hard disk?
Once I am back to the hard disk (with the graphical tools) I can edit fstab.
I guess I am asking if I don't mess with the boot partition I should be OK to reboot to hard disk, right?
 
Old 10-18-2004, 01:18 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Once booted to live CD.
1. Backup data
2. Resize hda3
3. Create additional partitions.
4. Create temp mount points for each new partition and mount them.
5. Copy data from /var, /tmp and whatever else you have planned to new partitions.
6. Modify /etc/fstab for each new partition
7. Delete old data from /var ... (You can wait to make sure everything works)
8. reboot.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Repartitioning a Hard disk on Dell C600 running Suse 9.2 whitehawk Linux - Laptop and Netbook 2 07-08-2005 02:07 PM
Moving a Disk from HDC to HDA? ashleyfrazer Linux - Newbie 4 06-29-2004 05:30 AM
Disk 4 Worth It? QzarBaron Mandriva 0 06-21-2004 12:33 PM
Repartitioning the disk dancar Linux - General 1 04-15-2004 03:04 PM
Can I just replace Windows with Linux WITHOUT repartitioning the disk?? Trying to Learn Linux - Newbie 4 01-21-2004 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:13 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