LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-27-2016, 03:09 AM   #1
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Swap partition options?


Are there some swap partition options for swap, that can written into fstab?
 
Old 02-27-2016, 03:55 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,923

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
https://www.linux.com/news/software/...nux-swap-space
 
Old 02-27-2016, 09:02 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,781

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
The only option I'm aware of is priority, which would be entered as "pri=<value>" in the fstab options field. Higher numbers indicate higher priority (default is -1).
 
Old 02-27-2016, 09:19 AM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
The only option I'm aware of is priority, which would be entered as "pri=<value>" in the fstab options field. Higher numbers indicate higher priority (default is -1).
Priority may be needed if you have more than one swap partition or file or combination of two.
 
Old 03-01-2016, 03:12 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
For some reason I think you can set up a raid array of swap too. Can't find it right now.
 
Old 03-02-2016, 01:56 AM   #6
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Original Poster
Rep: Reputation: 164Reputation: 164
I meant fstab options for mounting, not for raid setup.
 
Old 03-02-2016, 11:12 AM   #7
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
as in how to mount a swap drive?

Code:
UUID=9fc76062-7c86-4d2a-945a-2ca4579eed24 none swap sw 0 0
then issue

sudo mount -a

I am assuming you know all about UUID's and /dev/sdax

if not
Code:
sudo blkid
to get both your UUID and /dev/sdxx

you can created a swap partition anywhere within the file system,
Code:
/dev/sda
/dev/sdb
/dev/sdc
etc..
even create a swap file on the fly mount it swap on .. then turn it off then delete it when you no longer need it.

if it is something other then what has already been presented to you by me and the others, please clarify.

Last edited by BW-userx; 03-02-2016 at 11:19 AM.
 
Old 03-02-2016, 03:46 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
I said raid swap. I didn't say raid. You can use swap in a raid configuration. I don't mean swap in a raid array.

Last edited by jefro; 03-02-2016 at 03:47 PM.
 
Old 03-09-2016, 01:58 PM   #9
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Original Poster
Rep: Reputation: 164Reputation: 164
When mounting "normal" partitions, some mount options do exist - like relatime, noatime, nodiratime,...

Is there any option, which affects swap partition performance?

Apart from that, I know two options not mentioned above:
1. crypt swap
2. clear swap on shutdown
 
Old 03-10-2016, 01:01 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,923

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
relatime, noatime, nodiratime have no any meaning on a swap partition. crypting may affect performance.
 
Old 03-10-2016, 06:38 AM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I think that where you put it is what really matters. reminds me of a parse I once heard, but if you put your swap on the front end of the HDD that is actually in the middle of the platter where it spins the fastest. therefore, it reads and writes quicker.

which does fall into the options category because you do have the option of creating else where on the platter.

Last edited by BW-userx; 03-10-2016 at 06:40 AM.
 
Old 03-10-2016, 07:56 AM   #12
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
Today, that's somewhat irrelevant. Hard drives, themselves, have become quite "smart" (no pun intended), and have many on-board caching and self-diagnostic capabilities.

For ordinary purposes, though, I think it's hard to beat swapping to a disk file, and to then keep the "swappiness" to a reasonable default. Most computers these days don't spend much time swapping, and don't use much swap, although they should have "some place to swap to" when they actually need to do so.

Per contra, laptop computers often need to be able to quickly "hibernate," which does use the swap facility and which in some instances requires a partition. "YMMV.™"
 
Old 03-10-2016, 08:27 AM   #13
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,781

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by Keruskerfuerst View Post
I know two options not mentioned above:
1. crypt swap
2. clear swap on shutdown
The original question was about options that can be put into the /etc/fstab entry, and neither of those qualify.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Swap partition against swap file: how much performance do I loose? stf92 Slackware - Installation 12 03-15-2014 05:48 PM
Would a Linux swap partition work as a FreeBSD swap partition? Froggy192 *BSD 11 07-27-2013 02:06 PM
Can swap file or a swap partition be mounted and read? Mr-Bisquit Linux - General 3 06-08-2009 02:16 PM
swap options pellicle Linux - General 12 07-30-2008 06:38 AM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration