You are not logged in.
Pages: 1
Hi All,
when I boot my linux server i get this error message:
Failed to activate swap /dev/disk/by-label/mikswap.
See 'systemctl status dev-disk-by\x2dlabel-mikswap.swap for details
[DEPEND] Dependency failed for swapthe output of the suggested command
[root@artemide ~]# systemctl status dev-disk-byx2dlabel-mikswap.swap
dev-disk-byx2dlabel-mikswap.swap - /dev/disk/byx2dlabel/mikswap
Loaded: loaded
Active: failed (Result: exit-code) since Wed 2013-11-06 18:42:54 CET; 18s ago
What: /dev/disk/byx2dlabel/mikswap
Process: 621 ExecActivate=/sbin/swapon /dev/disk/byx2dlabel/mikswap (code=exited, status=255)
Nov 06 18:42:54 artemide systemd[1]: Activating swap /dev/disk/byx2dlabel/mikswap...
Nov 06 18:42:54 artemide swapon[621]: swapon: stat failed /dev/disk/byx2dlabel/mikswap: No such file or directory
Nov 06 18:42:54 artemide systemd[1]: dev-disk-byx2dlabel-mikswap.swap swap process exited, code=exited status=255
Nov 06 18:42:54 artemide systemd[1]: Failed to activate swap /dev/disk/byx2dlabel/mikswap.
Nov 06 18:42:54 artemide systemd[1]: Unit dev-disk-byx2dlabel-mikswap.swap entered failed state.I have looked around internet, but I did not find anything, can you please point me to the right direction?
thanks
Last edited by miky76 (2013-11-07 08:09:57)
Offline
Is your system fully up to date?
Post your fstab.
Can you activate swap manually?
Last edited by karol (2013-11-06 20:05:26)
Offline
Is your system fully up to date? Post your fstab.
He/she shouldn't have swap in /etc/fstab at all; systemd finds it automatically. Also post the output of `lsblk -f`
Offline
my fstab
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
tmpfs /tmp tmpfs nodev,nosuid 0 0
LABEL=mikboot /boot ext2 defaults 0 1
LABEL=mikhome /home ext4 defaults 0 1 noauto,x-systemd.automount
LABEL=mikroot / ext4 defaults 0 1
LABEL=mikswap swap swap defaults 0 0
#/dev/sdd6 /mnt/oldUSBlinux/ ext4 auto
/dev/mapper/data_raid-data /raid ext4 auto
/dev/sda6 /data/ ext4 autoI've found I do not have the dir /dev/disk/byx2dlabel/mikswap that is not found in the second part of the log I've copied in the first post
[root@artemide ~]# cd /dev/disk/byx2dlabel
-bash: cd: /dev/disk/byx2dlabel: No such file or directory
[root@artemide ~]# cd /dev/disk
[root@artemide disk]# ls -l
total 0
drwxr-xr-x 2 root root 640 Nov 6 18:40 by-id
drwxr-xr-x 2 root root 200 Nov 6 18:40 by-label
drwxr-xr-x 2 root root 100 Nov 6 18:40 by-partlabel
drwxr-xr-x 2 root root 180 Nov 6 18:40 by-partuuid
drwxr-xr-x 2 root root 120 Nov 6 18:40 by-path
drwxr-xr-x 2 root root 220 Nov 6 18:40 by-uuid
[root@artemide disk]# cd by-label/
[root@artemide by-label]# ls -l
total 0
lrwxrwxrwx 1 root root 10 Nov 6 18:40 boot -> ../../sdd1
lrwxrwxrwx 1 root root 10 Nov 6 18:40 mikboot -> ../../sda1
lrwxrwxrwx 1 root root 10 Nov 6 18:40 mikhome -> ../../sda4
lrwxrwxrwx 1 root root 10 Nov 6 18:40 mikroot -> ../../sda3
lrwxrwxrwx 1 root root 10 Nov 6 18:40 mikswap -> ../../sda2
lrwxrwxrwx 1 root root 10 Nov 6 18:40 root -> ../../sdd3
lrwxrwxrwx 1 root root 10 Nov 6 18:40 swap -> ../../sdd2
lrwxrwxrwx 1 root root 10 Nov 6 18:40 tempdata -> ../../sda6Offline
karol wrote:Is your system fully up to date? Post your fstab.
He/she shouldn't have swap in /etc/fstab at all; systemd finds it automatically.
Yup :-)
miky76, comment out the swap line in your fstab and reboot.
Offline
He/she shouldn't have swap in /etc/fstab at all; systemd finds it automatically. Also post the output of `lsblk -f`
Offline
now that you tell me, I think the error started when I've start to use systemd... can be?
[root@artemide by-label]# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
|-sda1 ext2 mikboot c501350f-a1f7-4875-a876-db4ae820862d /boot
|-sda2 swap mikswap 1d89d7a4-78eb-4f87-bea3-96a251783e78 [SWAP]
|-sda3 ext4 mikroot 7bf202c5-7b5c-45f4-a832-f985d48a1091 /
|-sda4 ext4 mikhome b9a8ebee-a800-40a2-877e-ff22a082a485 /home
|-sda5 linux_raid_member artemide:0 b1bb3967-26bd-833a-c496-5f9a9ab21ac9
`-sda6 ext4 tempdata edbbb9bd-9dd7-4932-b6a8-c420bdd1d4e6 /data
sdb
`-sdb1 linux_raid_member artemide:0 b1bb3967-26bd-833a-c496-5f9a9ab21ac9
`-md0 LVM2_member 6GJ4bd-7Ynp-LMEY-SX8P-NIhX-kcdH-mAaOUi
`-data_raid-data ext4 8fc66c30-4465-4e6f-91af-9e6d22586c7a /raid
sdc
`-sdc1 linux_raid_member artemide:0 b1bb3967-26bd-833a-c496-5f9a9ab21ac9
`-md0 LVM2_member 6GJ4bd-7Ynp-LMEY-SX8P-NIhX-kcdH-mAaOUi
`-data_raid-data ext4 8fc66c30-4465-4e6f-91af-9e6d22586c7a /raid
sdd
|-sdd1 ext2 boot a7c6c5c6-f928-4b05-a73d-35286cca71f0
|-sdd2 swap swap bee183a8-8464-4d60-90c0-02f2cd830ae4
`-sdd3 ext4 root 8de7f98a-d398-49c5-970b-3cf57bc7d317Offline
Removing the swap line in the fstab. the error disappeared, but I think just beacuse it is not looking for it anymore.
How can I be sure, the swap partition is used from the system?
Offline
You appear to have two swap partitions (sda2 and sdd2); I do not know how systemd will handle that
It does appear that sda2 is mounted/active swap.
Offline
How can I be sure, the swap partition is used from the system?
Check if it's being activated.
If you put heavy pressure on your memory, you should be able to see swap being used in 'free -m'.
Offline
"swapon -s" shows active swap partitions/files.
Offline
"swapon -s" shows active swap partitions/files.
It's sda2:
[root@artemide by-label]# lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT sda |-sda1 ext2 mikboot c501350f-a1f7-4875-a876-db4ae820862d /boot |-sda2 swap mikswap 1d89d7a4-78eb-4f87-bea3-96a251783e78 [SWAP] |-sda3 ext4 mikroot 7bf202c5-7b5c-45f4-a832-f985d48a1091 / |-sda4 ext4 mikhome b9a8ebee-a800-40a2-877e-ff22a082a485 /home |-sda5 linux_raid_member artemide:0 b1bb3967-26bd-833a-c496-5f9a9ab21ac9 `-sda6 ext4 tempdata edbbb9bd-9dd7-4932-b6a8-c420bdd1d4e6 /data sdb `-sdb1 linux_raid_member artemide:0 b1bb3967-26bd-833a-c496-5f9a9ab21ac9 `-md0 LVM2_member 6GJ4bd-7Ynp-LMEY-SX8P-NIhX-kcdH-mAaOUi `-data_raid-data ext4 8fc66c30-4465-4e6f-91af-9e6d22586c7a /raid sdc `-sdc1 linux_raid_member artemide:0 b1bb3967-26bd-833a-c496-5f9a9ab21ac9 `-md0 LVM2_member 6GJ4bd-7Ynp-LMEY-SX8P-NIhX-kcdH-mAaOUi `-data_raid-data ext4 8fc66c30-4465-4e6f-91af-9e6d22586c7a /raid sdd |-sdd1 ext2 boot a7c6c5c6-f928-4b05-a73d-35286cca71f0 |-sdd2 swap swap bee183a8-8464-4d60-90c0-02f2cd830ae4 `-sdd3 ext4 root 8de7f98a-d398-49c5-970b-3cf57bc7d317
Offline
yes it's sda2
[root@artemide ~]# swapon -s
Filename Type Size Used Priority
/dev/sda2 partition 2047996 0 -1thank you all for your help.
I'll set this as [SOLVED]
Offline
Pages: 1