[SOLVED] How do I know the swap in up and running?
Slackware - InstallationThis forum is for the discussion of installation issues with Slackware.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Trying to put some order: 'swapon -s' does not list anything. So, the swap, /SWAP_DO_NOT_TOUCH/SWAPFILE, has not been activated during reboot. But neither there have been anyerror messages during boot, swap related. OK.
in /etc/fstab. The first field is the name of the file, as when we use partitions, we put say /dev/sda4 (the device name). I was using the UUID, following a suggestion in the fstab man page. A thing that as I don't use removable drives as a rule, I have not the least necessity of.
Distribution: Debian Sid AMD64, Raspbian Wheezy, Slackware Current AMD64, various VMs
Yes, when you're referring to a swap (or any other) partition in fstab it's often a good idea to use UUIDs as it prevents problems if the drives are initialised in a different order (which seems to be very common when using a few similar drives) but when referring to a swap file then the filesystem has to be mounted anyhow so you can just use the path on the filesystem. In my case I use the following in fstab for swap:
Ahaaa, the fstab does not mention swap files at all, and instead of refering to swap space, which is a general enough word, when it has to refer to the swap it does it as swap partition. This seems to reflect a policy of rejection of the use of files for swap space. Many people think a swap file is accessed as a regular file normally is and ignore the fact that the kernel just uses the space allocated for the file, bypassing caching and filesystem overhead, which would be ridiculous. It just keeps a map of the physical sectors, which are consecutive in the disk if one does things well. However some other man page even gives the concrete example of the use of dd as a means of allocating the space, mentioning the swap file explicitly. Only for large systems the use of a disk or disk partition makes sense. Not certainly for a home computer, despite the indignation of purists. Of course, it's always giving the kernel extra work and goes against the concept of simplicity.