You are not logged in.

#1 2013-11-11 11:35:42

wiegraf
Member
Registered: 2013-11-09
Posts: 32

Swap partition does not mount with Arch install on btrfs

I have my Arch install on a btrfs partition (sda1) with one swap partition to go with it (sda2). I used "swapon" on my first install and set up the fstab for swap but every time I boot systemd warns me that it cannot mount the swap partition because of a "dependency" problem.  I understand that we are not supposed to use swap FILES with btrfs, but I was under the impression that swap PARTITIONS should work.

Is there any way to get my swap partition up and running? Failing that, should I just edit my fstab to get rid of the swap entry so I don't get the annoying error on boot?

Offline

#2 2013-11-11 14:25:54

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Swap partition does not mount with Arch install on btrfs

AFAIK you're correct that btrfs only has issues with swap files, so chances are it's unrelated to your problem. Have you checked your log? It generally contains more detail than is actually displayed during init.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2013-11-11 14:26:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Swap partition does not mount with Arch install on btrfs

https://wiki.archlinux.org/index.php/Btrfs#Swap_file
https://wiki.archlinux.org/index.php/Btrfs#Partitioning

You can not use swap area as Btrfs does not support swap files and there is no place to create swap partition,

Offline

#4 2013-11-11 14:30:12

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Swap partition does not mount with Arch install on btrfs

@karol

I don't think the bit you quoted is relevant. It's about formatting a whole device with btrfs ie.

# mkfs.btrfs /dev/sdX

but the OP is using partitions.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#5 2013-11-11 14:37:08

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Swap partition does not mount with Arch install on btrfs

You don't need swap in fstab anyway - systemd takes care of it.
Please post the errors you're getting.

Offline

#6 2013-11-11 18:03:24

GermanyChris
Member
From: Southern Germany
Registered: 2013-10-14
Posts: 60

Re: Swap partition does not mount with Arch install on btrfs

I don't get any errors and I'm on butter..


Don't scab for the bosses Don't listen to their lies Poor folks ain't got a chance Unless they organize --Florence Reece

Offline

#7 2013-11-11 18:04:22

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Swap partition does not mount with Arch install on btrfs

GermanyChris wrote:

I don't get any errors and I'm on butter..

Do you have swap partition set up in fstab?

Offline

#8 2013-11-11 23:45:56

wiegraf
Member
Registered: 2013-11-09
Posts: 32

Re: Swap partition does not mount with Arch install on btrfs

alphaniner wrote:

AFAIK you're correct that btrfs only has issues with swap files, so chances are it's unrelated to your problem. Have you checked your log? It generally contains more detail than is actually displayed during init.

Here is the output of systemctl status:

dev-sda2.swap -> '/org/freedesktop/systemd1/unit/dev_2dsda2_2eswap'

dev-sda2.swap - /dev/sda2
   Loaded: loaded (/run/systemd/generator.late/dev-sda2.swap)
   Active: failed (Result: exit-code) since Tue 2013-11-12 08:40:22 JST; 54s ago
     What: /dev/sda2
  Process: 212 ExecActivate=/sbin/swapon /dev/sda2 (code=exited, status=255)

Here is my fstab:

# /etc/fstab: static file system information
#
# <file system> <dir>   <type>  <options>       <dump>  <pass>
# /dev/sda1 LABEL=root
UUID=fe977ac5-28d6-4a8d-b312-97b16bc9f13a       /               btrfs           rw,relatime,space_cache 0 0

# /dev/sda2
UUID=9efdef7a-be0a-4f7b-a762-4202bbcb5247       none            swap            defaults        0 0

Last edited by wiegraf (2013-11-12 00:00:54)

Offline

#9 2013-11-11 23:58:56

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Swap partition does not mount with Arch install on btrfs

Comment out swap and reboot.
https://bbs.archlinux.org/viewtopic.php … 1#p1326501


When posting configs, code or command output, please use [ code ] tags, not [ quote ] tags https://bbs.archlinux.org/help.php#bbcode

like this

Last edited by karol (2013-11-12 00:00:14)

Offline

#10 2013-11-12 00:05:46

wiegraf
Member
Registered: 2013-11-09
Posts: 32

Re: Swap partition does not mount with Arch install on btrfs

karol wrote:

Comment out swap and reboot.
https://bbs.archlinux.org/viewtopic.php … 1#p1326501


When posting configs, code or command output, please use [ code ] tags, not [ quote ] tags https://bbs.archlinux.org/help.php#bbcode

like this

Thank you this solved the problem. Perhaps someone should add a note to the btrfs wiki or beginner's guide about this?

I also will be careful about my tags in the future.

Offline

#11 2013-11-12 00:15:27

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Swap partition does not mount with Arch install on btrfs

It's not related to btrfs, it's about fstab, swap and systemd. The only edit I found in the wiki article about swap is https://wiki.archlinux.org/index.php?ti … did=275824 and it's not exactly great.
Tho only somewhat related edit to the fstab article is https://wiki.archlinux.org/index.php?ti … did=276177 but it doesn't say you need not put swap in your fstab.

I'll try to bring it up to date ... one day.


The wiki is a community effort and everyone's invited :-)

Offline

Board footer

Powered by FluxBB