LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Partions - Swap Partion (https://www.linuxquestions.org/questions/linux-newbie-8/partions-swap-partion-257601/)

SBFree 11-21-2004 11:24 AM

Partions - Swap Partion
 
I am doing a new build and have two drives, a 40G and 160G. I wanted to set up RAID 1 and mirror the contents of the 40G on the 160G. Disk Druid asked me to make a swap partition, how do I do this and how big should it be? If I have drive space left over on the larger drive and make a single partition out of what’s left where’s a good place to attach it? The RAID 1 array is the root directory / and I’m afraid if I attach the remaining drive space the RAID 1 array will try and mirror it and basically make mirroring impossible. Should I have made my RAID array attach to home/ instead so only my user files are mirrored? I would like to mirror my user files and OS and partion the leftover part of the larger drive for media storage that isn't as critical. Thanks.
Scott

damicatz 11-21-2004 12:17 PM

The size of the swap partition depends on how much RAM you have in your computer. I generally make my swap partition about 512 Megabytes (I have 1 gigabyte of RAM, the less RAM you have the bigger the swap should be).

As for your RAID question, off the top of my head I don't belive you will run into problems but I have no experience with using RAID on a desktop or RAID Mirroring so you might want to wait for someone to come along who knows more about RAID arrays.

Linux partitions as you already know work differently than Windows partitions. Your primary partition is the root partition or /. Additional partitions are attached or mounted to sub-directories. Even though it appears as a sub-directory on the root partition, it is essentailly nothing more than a link to the root of an additional partition.

As for a good place to attach your additional partition I would say either home or opt. Home is like your Documents and Settings Folder, so all of your docuemnts and music and whatnot will go in there. Opt is generally used for program data. So say if you install Unreal Tournament 2004, all of it's music, maps, sounds, textures, etc are going in the opt folder and if you install OpenOffice, it puts a lot of it's libraries and templates in the opt folder.

SBFree 11-21-2004 12:26 PM

Thanks!
The I wanted to attach the leftover space to the home/ but worried that if the RAID array started at the root it would try to mirror the portion of home not in the array. If you have any direction to point me in for further reading let me know. BTW, if RAID were not part of this picture and am I correct in understanding that if I just had two drives one attached to the root and one to home/ would they both contain files from home/? If that's true, will I be able to distinguish which drive a prarticular file in home/ is one? Thanks again.
Scott

damicatz 11-21-2004 12:30 PM

Once you mount a partition to a directory, any and all file operations happen on the partition it is linked to and not on the partition that contains the link (in this case your root partition which contains the home directory). If you were to unmount the /home directory then anything you put into that directory goes onto the root partition but as soon as you mounted it again that stuff would disappear and the contents of your second partition would be in the home directory again.

SBFree 11-21-2004 02:34 PM

Ok. That's pretty clear, it sounds like I didn't set things up the way I needed then. Can I create a new directroy in the root and add my partition there?
Thanks again - Scott

damicatz 11-21-2004 02:39 PM

Quote:

Originally posted by SBFree
Ok. That's pretty clear, it sounds like I didn't set things up the way I needed then. Can I create a new directroy in the root and add my partition there?
Thanks again - Scott

Yes, just make the directory you want to make as a mountpoint and mount the partition there. If you want it to automatically mount on bootup though you'll need to edit your /etc/fstab file to do so, unless you are creating the partition from within a setup program (like Redhat's Install/Setup Program).

SBFree 11-21-2004 08:10 PM

Cool. I'll give it a go. Do you know if Disk Druid will let me create a directory to attach to or will I have to install with the unpartitioned free space and then partition and mount after the system is set up?
Thanks again.
Scott

damicatz 11-22-2004 05:27 PM

If I remember correctly, you just set the mount point to whatever and if the directory doesn't exist it creates it. But I haven't used a Redhat Distro/Disk Druid in a while.

SBFree 11-23-2004 05:47 AM

Thanks for you help. I got up and running. On to explore remote logon and learn my shell commands. I had a successful ssh connection. Thanks again,
Scott


All times are GMT -5. The time now is 02:12 AM.