On Wed, Sep 23, 2009 at 18:01, Andrew <andrew@rotramel.
> I think I need more swap space. Can I add free space to my swap partition without without destroying the
> data partition?
What makes you think you need more swap? What are teh specs on the
system? What kind of processor, and how much RAM. And again, WHY do
you need more swap?
Keep Reading...
> I have a 1.5 TB disk, with 650 GB for the OS as sda1, and a 2 GB swap partition as sda5.
>
> Device Boot Start End Blocks Id System
> /dev/sda1 * 1 90593 727688241 83 Linux
> /dev/sda2 90594 91201 4883760 5 Extended
> /dev/sda5 90594 91201 4883728+ 82 Linux swap / Solaris
>
> /etc/fstab
> # / was on /dev/sda1 during installation
> UUID=58cbf81c-
> # swap was on /dev/sda5 during installation
> UUID=2b274bf9-
> /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,
>
> I would think I would boot from the live CD, use fdisk to enlarge sda5, but I don't see an option to add space in the fdisk menu. So what tool would I use for this?
parted would let you, and assuming you have the 350GB or so of
UNALLOCATED space on that disk that it looks like you do, you could,
theoretically at least, stop swap, resize the partition, then restart
swap...
But again, why do you think you need more swap? What are you running
on that system. And if it's a performance thing you're going for, you
need more RAM, not more SWAP. Remember, swap is just space to store
RAM contents on disk, so there's a horrible amount of time used to
seek, and read the data from swap, then put it in ram, AFTER moving
something else from RAM onto the swap partition.
There are VERY few cases where you would really need more than 2GB of
swap space. The only real places I could think of off the top of my
head are render farms like what PIXAR has, or something running a
massive database (I'm sure there are others, but those are the two
that I could think of without digging into it too much).
> P.S. - sda2 and sda5 appear to be the same section of disk. Why two names and partition types for that slice?
Google hard drive partitioning and learn all about it ;-)
sda2 is an extended partiton, sda5 is a logical partition that
resides on the disk. It's a limitation of the hard drive standard...
Any given hard drive (that I know of at least) be it IDE, SATA, SAS or
SCSI, can have at most 4 primary partitions. HOWEVER, there are
allowances for LOGICAL partitions getting the total to 15. The way
that works is that you create up to 3 primary partitions, then an
extended partition. Inside that extended partition, you can create
more until you reach 15 total (14 usable partitons, and 1 extended).
Again, there isnt much reason to have that many partitions..
probably never need more than 7 or 8 total ever... but there are
reasons you'd want multiples... security being one, but the big one
being data protection. If you have one massive partition and get the
magical bad blocks in just the right place, you could lose everything
on the disk, or spend a WHOLE LOT of money to recover the disk. If
you ahve different partitions and one goes bad, you still have the
others that you should be able to recover and put onto a new disk.
That's just a nutshell explanation though... there are entire books
written on the subject ;-)
So answer the questions, maybe there's a better way.
Cheers,
Jeff
--
Ted Turner - "Sports is like a war without the killing."
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
No comments:
Post a Comment