[Nix-dev] systemd failed in locating swap

Dmitry Malikov malikov.d.y at gmail.com
Tue Sep 23 09:13:12 CEST 2014


Hi.

Trying to `nixos-rebuild switch` and got something strange.

A dependency job for swap.target failed. See 'journalctl -xn' for details.
warning: the following units failed: 
dev-disk-byx2did-atax2dWDC_WD1600BEVTx2d22ZCT0_WDx2dWXC409C13973x2dpart2.swap, 
dev-disk-byx2did-wwnx2d0x50014ee2580db580x2dpart2.swap, 
dev-disk-byx2dlabel-swap.swap, dev-disk-
byx2duuid-4eeb9f1fx2de47fx2d4564x2d9c52x2dc7e755ee6918.swap

● dev-disk-byx2duuid-4eeb9f1fx2de47fx2d4564x2d9c52x2dc7e755ee6918.swap - 
/dev/disk/byx2duuid/4eeb9f1fx2de47fx2d4564x2d9c52x2dc7e755ee6918
    Loaded: loaded
    Active: failed (Result: exit-code) since Tue 2014-09-23 01:05:11 
MSK; 181ms ago
      What: /dev/disk/byx2duuid/4eeb9f1fx2de47fx2d4564x2d9c52x2dc7e755ee6918
   Process: 24043 
ExecActivate=/nix/store/sfw9gfmasczypqh7ndb7bfy110lm2lab-util-linux-2.25.1/sbin/swapon 
/dev/disk/byx2duuid/4eeb9f1fx2de47fx2d4564x2d9c52x2dc7e755ee6918 
(code=exited, status=255)

Sep 23 01:05:11 nixos systemd[1]: 
dev-disk-byx2duuid-4eeb9f1fx2de47fx2d4564x2d9c52x2dc7e755ee6918.swap 
swap process exited, code=exited status=255
Sep 23 01:05:11 nixos systemd[1]: Failed to activate swap 
/dev/disk/byx2duuid/4eeb9f1fx2de47fx2d4564x2d9c52x2dc7e755ee6918.
Sep 23 01:05:11 nixos systemd[1]: Unit 
dev-disk-byx2duuid-4eeb9f1fx2de47fx2d4564x2d9c52x2dc7e755ee6918.swap 
entered failed state.

● dev-disk-byx2dlabel-swap.swap - /dev/disk/byx2dlabel/swap
    Loaded: loaded
    Active: failed (Result: exit-code) since Tue 2014-09-23 01:05:11 
MSK; 212ms ago
      What: /dev/disk/byx2dlabel/swap
   Process: 24044 
ExecActivate=/nix/store/sfw9gfmasczypqh7ndb7bfy110lm2lab-util-linux-2.25.1/sbin/swapon 
/dev/disk/byx2dlabel/swap (code=exited, status=255)

Sep 23 01:05:11 nixos systemd[1]: Activating swap 
/dev/disk/byx2dlabel/swap...
Sep 23 01:05:11 nixos systemd[1]: dev-disk-byx2dlabel-swap.swap swap 
process exited, code=exited status=255
Sep 23 01:05:11 nixos systemd[1]: Unit dev-disk-byx2dlabel-swap.swap 
entered failed state.
Sep 23 01:05:12 nixos swapon[24044]: swapon: stat failed 
/dev/disk/byx2dlabel/swap: No such file or directory

● dev-disk-byx2did-wwnx2d0x50014ee2580db580x2dpart2.swap - 
/dev/disk/byx2did/wwnx2d0x50014ee2580db580x2dpart2
    Loaded: loaded
    Active: failed (Result: exit-code) since Tue 2014-09-23 01:05:11 
MSK; 231ms ago
      What: /dev/disk/byx2did/wwnx2d0x50014ee2580db580x2dpart2
   Process: 24045 
ExecActivate=/nix/store/sfw9gfmasczypqh7ndb7bfy110lm2lab-util-linux-2.25.1/sbin/swapon 
/dev/disk/byx2did/wwnx2d0x50014ee2580db580x2dpart2 (code=exited, status=255)

Sep 23 01:05:11 nixos systemd[1]: Activating swap 
/dev/disk/byx2did/wwnx2d0x50014ee2580db580x2dpart2...
Sep 23 01:05:11 nixos systemd[1]: 
dev-disk-byx2did-wwnx2d0x50014ee2580db580x2dpart2.swap swap process 
exited, code=exited status=255
Sep 23 01:05:11 nixos systemd[1]: Failed to activate swap 
/dev/disk/byx2did/wwnx2d0x50014ee2580db580x2dpart2.
Sep 23 01:05:11 nixos systemd[1]: Unit 
dev-disk-byx2did-wwnx2d0x50014ee2580db580x2dpart2.swap entered failed state.
Sep 23 01:05:12 nixos swapon[24045]: swapon: stat failed 
/dev/disk/byx2did/wwnx2d0x50014ee2580db580x2dpart2: No such file or 
directory

● 
dev-disk-byx2did-atax2dWDC_WD1600BEVTx2d22ZCT0_WDx2dWXC409C13973x2dpart2.swap 
- /dev/disk/byx2did/atax2dWDC_WD1600BEVTx2d22ZCT0_WDx2dWXC409C13973x2dpart2
    Loaded: loaded
    Active: failed (Result: exit-code) since Tue 2014-09-23 01:05:11 
MSK; 267ms ago
      What: 
/dev/disk/byx2did/atax2dWDC_WD1600BEVTx2d22ZCT0_WDx2dWXC409C13973x2dpart2
   Process: 24049 
ExecActivate=/nix/store/sfw9gfmasczypqh7ndb7bfy110lm2lab-util-linux-2.25.1/sbin/swapon 
/dev/disk/byx2did/atax2dWDC_WD1600BEVTx2d22ZCT0_WDx2dWXC409C13973x2dpart2 (code=exited, 
status=255)

Sep 23 01:05:11 nixos systemd[1]: 
dev-disk-byx2did-atax2dWDC_WD1600BEVTx2d22ZCT0_WDx2dWXC409C13973x2dpart2.swap 
swap process exited, code=exited status=255
Sep 23 01:05:11 nixos systemd[1]: Failed to activate swap 
/dev/disk/byx2did/atax2dWDC_WD1600BEVTx2d22ZCT0_WDx2dWXC409C13973x2dpart2.
Sep 23 01:05:11 nixos systemd[1]: Unit 
dev-disk-byx2did-atax2dWDC_WD1600BEVTx2d22ZCT0_WDx2dWXC409C13973x2dpart2.swap 
entered failed state.
Sep 23 01:05:12 nixos swapon[24049]: swapon: stat failed 
/dev/disk/byx2did/atax2dWDC_WD1600BEVTx2d22ZCT0_WDx2dWXC409C13973x2dpart2: 
No such file or directory
warning: error(s) occured while switching to the new configuration

Related attributes from a nix-repl:
nix-repl> :p config.swapDevices
[ { device = "/dev/sda2"; encrypted = { blkDev = null; enable = false; 
keyFile = null; label = null; }; label = «error: The option 
`swapDevices.[1-1].label' is used but not defined.»; priority = null; 
size = null
; } ]

I'm not quite sure what is going on here, but hardware-configuration.nix 
looks fine for me and nothing was really changed.

-- 
Best regards,
dmitry malikov
!



More information about the nix-dev mailing list