[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.
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, 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.