LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-10-2005, 06:07 AM   #1
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Rep: Reputation: 30
Putting /home on a different harddisk?


I am trying to setup a ftp server for some of my guys

i have a simple server with 2 harddisk... (20GB-hda and 80GB-hdd)

I set it such that its

hda1: /boot 100MB
hda2: /var 10GB
hda3: swap 1GB
hda5: /tmp 1GB
hda6: / 7.5GB

hdd1: /home 80GB


As you can see, I put the /home (where the user log in and put their files) in another dedicated harddisk...

1) is this an advisable setup?

2) Should mine 20GB fail (where the OS mumbo jumbo are loitering), how do I install a new set of OS (with new hdd of cos) but at the same time, re-using (or remounting) /home on the 2nd harddisk without over writing data. is it even possible?

Thanks!
 
Old 10-10-2005, 07:12 AM   #2
blindcoder
ROCK Linux
 
Registered: Dec 2003
Location: Berlin, Germany
Distribution: Crystal ROCK
Posts: 108

Rep: Reputation: 15
Yes, this is a sane thing to do if you have the space harddisk.

Most installers allow the use of existing filesystems as mountpoint. However, it is not always advisable to do this.
What I suggest is this:
open the file /etc/fstab in a text editor. Go to the line that contains "/home". Copy, print or remember that line until the next reinstallation.
After the next reinstallation, just paste that line into /etc/fstab again and you're done.

HTH,
Benjamin
 
Old 10-10-2005, 10:48 AM   #3
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Ubuntu 12.04 X86_64
Posts: 958

Rep: Reputation: 35
i have heard that /boot must be on the same partition as / for the system to boot corectly as it is data in this folder that can determine how partitions are mounted
and if it is on its own partition then it cnat tell itself to mount untill its mounted, kinda catch 22


has anyone managed to get a stable system with /boot on a seperate partition?
 
Old 10-10-2005, 11:03 AM   #4
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,144

Rep: Reputation: 56
Quote:
has anyone managed to get a stable system with /boot on a seperate partition?
Do you mean separate disk or separate partition? I always use a separate partition for /boot.
Here's my current disk config:

/boot - hda1 100 MB
/ - hda2 15 GB
swap - hda3 1 GB
/home - hda5 - 60 GB

And as far as I know you can configure and boot a system located on a another disk via a centralized grub in /boot partition...I don't think it should be a problem. All grub (which I use) cares is the disk geometry. You would be able to boot as long as grub has right partition geometry and points to the right kernel and initrd (if present).

Tux,

Last edited by tuxrules; 10-10-2005 at 11:06 AM.
 
Old 10-10-2005, 02:15 PM   #5
blindcoder
ROCK Linux
 
Registered: Dec 2003
Location: Berlin, Germany
Distribution: Crystal ROCK
Posts: 108

Rep: Reputation: 15
Quote:
Originally posted by dasy2k1
[B]i have heard that /boot must be on the same partition as / for the system to boot corectly as it is data in this folder that can determine how partitions are mounted
and if it is on its own partition then it cnat tell itself to mount untill its mounted, kinda catch 22
I don't know who told you that but either that person has totally outdated information or is just talking nonsense.
I have only a single machine where /boot is NOT on its own partition and so far never had a single problem.

Greetings,
Benjamin
 
Old 10-10-2005, 09:23 PM   #6
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by blindcoder
Yes, this is a sane thing to do if you have the space harddisk.

Most installers allow the use of existing filesystems as mountpoint. However, it is not always advisable to do this.
What I suggest is this:
open the file /etc/fstab in a text editor. Go to the line that contains "/home". Copy, print or remember that line until the next reinstallation.
After the next reinstallation, just paste that line into /etc/fstab again and you're done.

HTH,
Benjamin


My fstab is as follows:
Quote:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
/dev/devpts /dev/pts devpts gid=5,mode=620 0 0
/dev/shm /dev/shm tmpfs defaults 0 0
LABEL=/home /home ext3 defaults 1 2
/dev/proc /proc proc defaults 0 0
/dev/sys /sys sysfs defaults 0 0
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=/var «m\] swap ext3 swap defaults 1 2 0 0
/dev/fd0óïü¤^O /media/floppy auto pamconsole,exec,noauto,managed 0 0
/dev/hdc /media/cdrom auto pamconsole,exec,noauto,managed 0 0
So what you mean is I just have to copy the line (highlighted in bold) and paste in into the new installation of fstab so as to be able to access it?
Then while installing, what do I specify for the /home?


Another thing just came to my mind; should I want to take this /home partition (the entire hdd btw) to another server and use it.. do I mount it the same way, edit the fstab?
 
Old 10-11-2005, 01:28 AM   #7
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 84
If you've defined the 80G drive as a single partition (specifically, /home) and you wish to either install a different distro onto the 20G drive or physically remove the 80G drive a move it to another Linux box, then all you'd need to do would be a _similar_ line to the new fstab. The fstab entry wouldn't necessarily be exactly the same, because different distros may use slightly different naming conventions for fstab, and if you move a drive from one place to another, it may be in a different location than it was previously (eg, it may have been the primary slave (/dev/hdb) position, but in the new machine it is in the secondary slave (/dev/hdd) position).

Overall though putting /home on a separate partition is an excellent idea. If you are reinstalling a distro and/or moving the drive, really the only thing you need to be careful about is to NOT reformat that partition, otherwise you'll lose all that data. -- J.W.
 
Old 10-11-2005, 01:38 AM   #8
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Original Poster
Rep: Reputation: 30
oh i see.. i just need to specify in fstab the location (hba, hdd etc) ...

I didn't know its so straight forward, just by pointing the fstab to the how the harddisk connected via the motherboard will allow the OS to find... but what are the naming convention for primary master, pri slave, sec master, sec slave...?

so during a fresh installation of the os distro on the 20GB, I just don specify /home as an individual partition i suppose?

after editing fstab, what do i need to restart to get it active?

say if i need to backup my 80gb (/home) data, i copied them out..
is it possible to format the harddisk to ext3 and then copy the data back in (say i store it in another server via network connection). am i able to do it via linux?
 
Old 10-11-2005, 02:14 AM   #9
blindcoder
ROCK Linux
 
Registered: Dec 2003
Location: Berlin, Germany
Distribution: Crystal ROCK
Posts: 108

Rep: Reputation: 15
Quote:
Originally posted by Swakoo

I didn't know its so straight forward, just by pointing the fstab to the how the harddisk connected via the motherboard will allow the OS to find... but what are the naming convention for primary master, pri slave, sec master, sec slave...?
The naming convention comes from the kernel and should be usable across all distributions:
Primary Master: /dev/hda
Primary Slave: /dev/hdb
Secondary Master: /dev/hdc
Secondary Slave: /dev/hdd
If you have a PCI IDE Controller that will continue to hde, hdf, hdg, hdh and so on.

Quote:

so during a fresh installation of the os distro on the 20GB, I just don specify /home as an individual partition i suppose?
correct

Quote:

after editing fstab, what do i need to restart to get it active?
Nothing. /etc/fstab is read directly by mount so the information is immediately available after you leave your text editor.

Quote:

say if i need to backup my 80gb (/home) data, i copied them out..
is it possible to format the harddisk to ext3 and then copy the data back in (say i store it in another server via network connection). am i able to do it via linux?
Of course. For the network backup you can use anything from an FTP server, a Windows shared folder, an NFS share on a UNIX machine or anything else like that.

HTH,
Benjamin
 
Old 10-27-2005, 04:35 AM   #10
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Original Poster
Rep: Reputation: 30
hi guys, abit confused... better thought i clarify

I've quoted my entire fstab a few post up

with the following line in particular
LABEL=/home /home ext3 defaults 1 2

My fstab doesn't mention anything abt /hda, /hdb, /hdc, /hdd...

so when i want to move my 80GB to another machine, i just copy the above line will do? Where do I specify it is primary/secondary master/slave ?

What does '1' '2' refers to..?
i suppose defaults is refering to group..? cos i am playing with group quota now learning how to set...

please advice (again)

thanks
 
  


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
Harddisk fails. /home cannot be mounted bladehaze Linux - Hardware 1 10-08-2005 08:36 PM
Putting together a new computer... Bombadillow Linux - Newbie 10 01-24-2005 04:13 AM
putting sound to all of my home, what software? gonus Linux - Software 1 11-16-2004 02:43 AM
Low Harddisk space. Can I just transfer the entire Linux to a bigger harddisk? davidas Linux - Newbie 12 04-13-2004 02:03 AM
putting /home on a seperate partition ludwig W Linux - General 2 05-06-2003 02:37 AM


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