So I just reinstalled SUSE, this time using an LVM based setup. I allocated 96GB for the install on my first drive (640GB Western Digital Caviar Black). When I did the install, it would only allow 14.98GB for the LVM, which in and of itself isn’t too bad given that I have ample storage and I am short stroking anyways. However, it would only allow me to allocate 2gb for my swap. How can I either a) extend the swap without reinstalling or b) I can reinstall and allocate more (like 5gb) for the swap?
Why do you need more the 2gig for swap? For most Desktop usage that is more then enough. The Old 2x memory rule of thumb (just a guide line not a rule) really does not apply with the new huge memories that we have today. There might be special circumstances that require more but unless you are working with really really huge arrays you really don’t need more then 2 gig. In fact chance are you will never use any of it in normal usage.
If you have another partition just after the swap partition, then it cannot be increased. However, AFAIK the kernel will use more than one swap if it is available. You could create another partition as swap and either use both or simply delete the old one. I don’t know how this relates to LVMs, however it shouldn’t be a problem - I don’t think you can (or would want to) LVM a swap partition anyway.
Because I want it and I want to match my physical RAM.
Pretty brazen statement given that I never even mentioned what I use my machine for. How many normal users even know what short stroking is? I don’t intend to be brash, but I am a blunt individual. No harm?
However, given what you say, I still have the problem of my missing 60-70+gb of space which I was unable to allocate do to the LVM. I did go throught he motion of a standard partition based install, which did allow usage of all 96gb, but still only 2gb swap.
Would that be because it may be at the end of the drive? When I resized my storage partition in Windows, the 96g partition did show up at the end of the drive, visually speaking in Disk Management.
My main purpose behind reinstalling was because I had my disk space in all sorts of a mess. Prior to this, I had Vista and SUSE on my second HD, with Vista taking up almost the whole disk and me never even booting into it. I wanted to dedicate the entire second disk to main storage so as to maximize access time with my OS drive (640gb Black).
I thought the whole purpose of LVM was to somewhat mimic a RAID and provide the ability to resize at will?*
notethis is my first foray into LVM land so forgive my mistakes.
I apologize if I don’t feel the need to explain the requirements for what it is I am looking for, but rather needing an answer and some help. When it comes time to necessitating my explanation as to why I am doing what I am doing, I will provide that information.
At any rate, I like to maximize my hardware/software and a swap file half the size of my physical memory, IMO, won’t cut it.
You do not need to explain your exact purposes in wanting a larger swap,
but please also keep in mind that without explaining your level of
expertise or some reasoning behind your questions the forum members must
make some assumptions about your experience. Assuming you are a kernel
hacker who happens to not know about swap requirements is a bit
unjustified here considering most of the members are new (especially in
this forum which deals largely with installs) to Linux entirely or not new
but hearing about new things and asking for clarifications. Without
stating your position on the scale of newb/leet-ness it is safer to
provide guidance that is conservative and appropriate for the majority of
users. gogalthorp is correct in that, unless you know that you need more
swap, you probably do not need or want it.
If you were to have a system actually using five gigabytes of swap
actively (keep in mind the system thinks this is RAM and expects
nanosecond reply times and very fast (GB/s) transfer rates) you will
probably wish you were dead because of how slow things will be. If you
are running day-to-day now and not touching your swap then adding more is
probably a waste of time assuming your current usage is normal and not
going to be significantly different in the future.
One reason I can think of to have swap equal to RAM is for hibernation as
your RAM is put into swap at that point I am told. With that said I never
hibernate (never works no matter which OS I use, so I just don’t use it)
so my 4/8/16 GB RAM systems all have 2 GB allocated for swap and never
touch it unless I’m doing some heavy VM work (for others that may be heavy
graphics work or something).
Another option for getting more swap without partition is to do so with
swap files. This is trivial but requires your swap is on an
already-mounted filesystem. Use ‘dd’ to create a file of the size you’d
like, use mkswap to make that file a “swap” type of file, and then use
‘swapon’ to enable that space.
Good luck.
hooah212002 wrote:
> gogalthorp;2089390 Wrote:
>> BTW glade you have a good reason to have a bigger swap. Just because you
>> want it not that you have any real need for it. LOL
>
> I apologize if I don’t feel the need to explain the requirements for
> what it is I am looking for, but rather needing an answer and some help.
> When it comes time to necessitating my explanation as to why I am doing
> what I am doing, I will provide that information.
>
> At any rate, I like to maximize my hardware/software and a swap file
> half the size of my physical memory, IMO, won’t cut it.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
With large amounts of RAM, you are not likely to need much swap for
normal operations. The nebulous terms “large” and “normal” were
carefully chosen as their definitions will depend on what you are doing.
If you will be suspending to disk, aka hibernating, then your swap
space should be at least half of RAM as the contents of RAM are
compressed into that space.
as i usually don’t suspend to disk or hibernate, i have a partition for swap of only 250MB!!!
I used to have 512MB when i had 512MB in Ram. Now i have an extra module so my system currently has 2.5 GB ram; as this system never sleeps (only on/off, either i turn it on or off; nothing in between) i shrank the swap partition by half and added a new /boot partition in the new free space.
in conclusion, i haven’t had lock-ups or software getting crazy (i currently work simultaneously with openoffice, firefox, quake 3 arena, xmms, gkrellm and some other programs). nothing has happened after this procedure or due to the new & small amount of swap size allocated.