Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a new root dir

Status
Not open for further replies.

iSeriesCodePoet

Programmer
Jan 11, 2001
1,373
US
I know I can create a new root directory without a problem. But how do I specify it should go on the second hard drive, not the first? I would like /home and /data to both be on my big hard drive. I would like to also share all the disk space in the partition.

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
See my progress to converting to linux.
 
Pointing to your subject "Creating a new root dir", there can be 1 and only 1 / (root) in your DIR structure. What you could do is to mount your second (larger drive) to /home and symlink /data to /home. It should look something like

/ (hda1)
|- bin
|- home (hdb1)
| ^
| |
| symlink
| |
|- data
|- usr
|- var
etc.
(sorry if the ascii diagram sucks!)

So, in your /etc/fstab, you'll need to include an additional like that looks like

/dev/hdb1 /home ext3 default 0 0

replace hdb1 with whatever your actual HDD partition may be.

--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 

You can't have /home and /data on the same volume if it isn't the same one as /.

I would recommend mounting you disk on someplace like /mnt/disk2, creating /mnt/disk2/home and data, then symlinking /home and /data to the real dirs.

 
there are no partitions that have to appear on the same physical disk as /. All you have to do is to create the partition you want on the new drive, and then edit fstab to reflect this.

example:

/dev/hdb1 /home
/dev/hdc1 /data

hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top