LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   second hard drive setup (https://www.linuxquestions.org/questions/linux-newbie-8/second-hard-drive-setup-223729/)

Coldburn 08-28-2004 09:17 PM

second hard drive setup
 
ok guys, I've got a second drive for my box and would like to move say, /home, /tmp and maybe /var to it... The catch is, can I do this on a single partition like the rest of the filesystem on my first drive?

Basically, I dont want to carve out individual partitions and to keep the flexibility of having a single partition.

J.W. 08-28-2004 09:50 PM

A good article on how to move partitions can be found here but if you are planning on setting up new partitions and you want flexibility, IMO you wouldn't want to try put multiple directories in the same parititon. Work out the paritioning scheme you want first, for example (strictly for illustration purposes)

/dev/hda1 = / (root)
/dev/hda2 = swap
/dev/hda3 = /home
....

Naturally you could create separate partitions for /usr, /var, and so forth. Good luck with it -- J.W.

Demonbane 08-28-2004 09:57 PM

Under normal circumstances no you can't do that, each mount point needs one partition.
But you don't really need to play with partitions, you can for example make directories "home" "tmp" "var" in the new drive, mount it somewhere else then make symlinks. Or if you don't like symlinks you can use "mount --bind".
LVM is something else you may want to look into, it allows you to say combine your first and second harddisk into one large disk.

Coldburn 08-28-2004 10:43 PM

Yeah, I figured that I could make some links from the first hardrive to the second with the same name...

This was just an exercise to see if it could be done without doing back flips.. not really an exercise of best practice. The whole point is to not have to allocate space for say /tmp that's hardly used potentially shorting me space in /home while I store a video temporarily. ( just as an example ) It would be more flexible to not have to create 'compartments'.

I agree having multiple partitions is safer but wasteful. I'm not running anything mission critical! :D

Thanks for your inputs!


All times are GMT -5. The time now is 03:45 PM.