LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Question about Swap Paritions (https://www.linuxquestions.org/questions/linux-hardware-18/question-about-swap-paritions-100587/)

flamesrock 10-05-2003 05:01 PM

Question about Swap Paritions
 
I have one swap partion - /dev/hda6. It is shared between my other linux partitions. It's located in a bit of an ackward spot..you see I allowed mandrake to make it when I first installed linux. (bad mistake)

Anyways, what I wanted to do was reformat mandrake, shrink it, and then reinstall. The swap is located here:

Utilitypartition--Windows--windows--ext3mandrakeroot--swap--ext3user1mandrake--followed by other linux partitions..

So if I moved the swap, hda6 to someplace else on the hardrive, or changed the name (afterwards editing fstab,) would linux be able to boot it without a problem? Seeing as how it's in a different physical position on the drive?

Also, is a swap detrimental to linux running?

Does distance away from the swap affect speed?

If so, could I have more than 1 swap on the drive, located closer to the other linuxes, and how would I have to edit fstab to accomodate that change?

Sorry for all of the questions
:newbie:

synaptical 10-05-2003 05:41 PM

Re: Question about Swap Paritions
 
you've got a lot of questions there and i don't know the answer to all of them, but for one: yes, you can have more than one swap. just indicate in fstab which partition will be the swap partition for that distro.

swap is not detrimental to running linux. in fact it is necessary in many cases, and recommended at least in most.

i don't think distance away would be likely to affect speed very much, unless you were talking about having the swap on a separate hard disk altogether, in which case speed most likely would increase (depending on IDE configuration, etc.)

based on what i *think* you're saying, it's probably not necessary to move the swap partition. (it would be easier to tell what's going on though if you could post your fstab or disk layout more specifically, and also the size of the drive. :))

just changing the name of the partition wouldn't do much good and probably isn't a great idea. you have to create the filesystem type with fdisk, cfdisk, etc. (or with commands after you partition the space (mkswap /dev/hdxx, etc)). then when you've created the new swap, you can tell fstab to recognize it, as i mentioned in the beginning.

as to the question of what to do about rearranging the rest of the disk, that would probably take a bit of work if your root partition is one of the ones you want to move. otoh, it might be quite easy, i just have never done it. if you are going to reformat and reinstall everything anyway, then of course it would pretty easy.

hth :)

michaelk 10-05-2003 06:53 PM

I agree with the previous post. I don't think location would affect performance much with a typical desktop install. If you end up having a different partition for swap just make sure you change the swap fstab entry for each OS.

flamesrock 10-06-2003 10:23 PM

Excellent -- so I only have to edit fstab? IE..say change /dev/hda6 to /dev/hda11 and it will automatically use it?

Awesome.

My swap is in an incredibly inconvenient place. It would probably be easiest to move it. I think I'll just delete it and create a new one.

Also -- is it possible to just rename a partition to any number you want? In diskdrake, it automatically says - once I want to delete a smaller # partition - that it will rename the others to /dev/hda(n-1). This is very inconvient and I'm afraid that I won't be able to boot slackware.

Thanks

michaelk 10-07-2003 05:09 PM

I've never seen anything that would renumber partition IDs. All you need to do is change the fstab file and your bootloader.


All times are GMT -5. The time now is 10:23 PM.