LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-14-2016, 10:00 AM   #1
PACMANchasingme
Member
 
Registered: Mar 2015
Distribution: Arch
Posts: 62

Rep: Reputation: Disabled
[solved] Is my swap even enabled?


How come all 3 /dev/sda are commented out and the file systems still work and my swap does not show up in mount? I am confused.

Code:
robby ~ $ cat /etc/fstab;mount | grep /dev/sda
# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
# /dev/sda3
UUID=19627cc7-e5db-4dc9-a8d7-3c6a2b1d40b6	/         	ext4      	rw,relatime,data=ordered	0 1

# /dev/sda1
UUID=c93cdbf7-0f20-4eee-b1d4-77458be46b86	/boot     	ext4      	rw,relatime,data=ordered	0 2

# /dev/sda2
UUID=bc5936d6-4949-4156-a935-582155fc401a	none      	swap      	defaults  	0 0

# smb
/dev/sda3 on / type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /boot type ext4 (rw,relatime,data=ordered)
robby ~ $

Last edited by PACMANchasingme; 01-14-2016 at 10:22 AM.
 
Old 01-14-2016, 10:15 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134Reputation: 2134
They're commented out because they're comments. The actual mount uses UUID to protect against drive device names changing (eg, if you boot with a USB drive plugged in, it may take over sda while your boot drive moves to sdb, using UUID for the mount means that doesn't cause any problems).

"mount" doesn't show swap since it's not mounted in the filesystem, same with df. Use free if you want to see your available swap space.
 
1 members found this post helpful.
Old 01-14-2016, 10:16 AM   #3
TxLonghorn
Member
 
Registered: Feb 2004
Location: Austin Texas
Distribution: Mandrake 9.2
Posts: 702

Rep: Reputation: 231Reputation: 231Reputation: 231
The 2 lines:
# /dev/sda1
# /dev/sda2
are commented out because they are comments - only there to let you know what the next line is for.

As for the swap not working, post the result of
Code:
sudo mount -a
and
Code:
sudo lsblk -o NAME,FSTYPE,UUID
EDIT: I see suicidaleggroll posted while I was writing...

Last edited by TxLonghorn; 01-14-2016 at 10:18 AM.
 
Old 01-14-2016, 10:21 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,036

Rep: Reputation: 2892Reputation: 2892Reputation: 2892Reputation: 2892Reputation: 2892Reputation: 2892Reputation: 2892Reputation: 2892Reputation: 2892Reputation: 2892Reputation: 2892
In addition look at the output of the command blkid. It will display device ID, UUID and file system which might help you tie everything together. Which does the same thing as the lsblk command as posted.

Last edited by michaelk; 01-14-2016 at 10:22 AM.
 
1 members found this post helpful.
Old 01-14-2016, 10:21 AM   #5
PACMANchasingme
Member
 
Registered: Mar 2015
Distribution: Arch
Posts: 62

Original Poster
Rep: Reputation: Disabled
With lsblk I see that swap is active.

Assumed that mount should list it without a second thought. thanks
 
Old 01-14-2016, 10:23 AM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,934
Blog Entries: 1

Rep: Reputation: 832Reputation: 832Reputation: 832Reputation: 832Reputation: 832Reputation: 832Reputation: 832
# swapon -s

$ free

should list swap stuff as it does NOT show up in mount.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Installation Hangs after Swap File Enabled mntrpt Linux - Newbie 3 07-19-2009 07:52 PM
Is my swap partition enabled or not? glore2002 Slackware 8 06-15-2008 10:26 PM
[sda] Write cache: enabled, read cache: enabled, doesn't support DPO seskissinger Linux - Software 3 05-16-2008 01:17 PM
oh Mandriva 2006.0 reboots atfer swap enabled gopi219 Linux - Hardware 1 10-14-2006 10:33 AM
How do I know that my swap is enabled and working properly? mouse46 Linux - Software 9 10-26-2004 07:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:43 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration