Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
systemd swap Failed deactivaing swap
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
leg
n00b
n00b


Joined: 10 May 2017
Posts: 12

PostPosted: Sat Apr 21, 2018 8:57 am    Post subject: systemd swap Failed deactivaing swap Reply with quote

I have one swap partition.Why system auto create a failed swap.Maybe I updated to profile 17,have this error.
This is the error log message.
Code:
sudo journalctl -a | grep -m1 -i 'failed deactiv'
Jan 27 16:39:14 xxxxx.xxxx systemd[1]: Failed deactivating swap /dev/disk/by-partlabel/Basic\x20data\x20partition.


This is my swap partition
Code:
sudo swapon -s                           
Filename            Type      Size   Used   Priority
/dev/sdb2                                 partition   4194300   0   -1


This is the swap that systemd create,it's my NTFS partition.
Code:
ll /dev/disk/by-partlabel/Basic\\x20data\\x20partition
lrwxrwxrwx 1 root root 10 Apr 21 16:26 '/dev/disk/by-partlabel/Basic\x20data\x20partition' -> ../../sdb6


Swap looks OK,when use free command.
Code:
free
              total        used        free      shared  buff/cache   available
Mem:        8084420      907556     6519376       76504      657488     6681156
Swap:       4194300           0     4194300


How can I fix it?
Thanks a lot.
Back to top
View user's profile Send private message
grumblebear
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2008
Posts: 113

PostPosted: Sat Apr 21, 2018 9:58 am    Post subject: Reply with quote

If the swap was generated by the systemd-gpt-auto-generator you can disable the generator with:
Code:
ln -s /dev/null /etc/systemd/system-generators/systemd-gpt-auto-generator
Back to top
View user's profile Send private message
leg
n00b
n00b


Joined: 10 May 2017
Posts: 12

PostPosted: Sun Apr 22, 2018 12:39 am    Post subject: Reply with quote

grumblebear wrote:
If the swap was generated by the systemd-gpt-auto-generator you can disable the generator with:
Code:
ln -s /dev/null /etc/systemd/system-generators/systemd-gpt-auto-generator


I don't have systemd-gpt-auto-generator file and systemd-fstab-generator command.
Thanks a lot!
Back to top
View user's profile Send private message
grumblebear
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2008
Posts: 113

PostPosted: Sun Apr 22, 2018 7:36 pm    Post subject: Reply with quote

Those generators are no ordinary commands but are run automatically by systemd if you do not disable them as shown.

I guess your /dev/sdb6 partition has either the wrong partition type (Check with gdisk, parted, fdisk or whatever tool you prefer), or is listed in your /etc/fstab as a swap partition.
Back to top
View user's profile Send private message
leg
n00b
n00b


Joined: 10 May 2017
Posts: 12

PostPosted: Mon Apr 23, 2018 5:12 am    Post subject: Reply with quote

grumblebear wrote:
Those generators are no ordinary commands but are run automatically by systemd if you do not disable them as shown.

I guess your /dev/sdb6 partition has either the wrong partition type (Check with gdisk, parted, fdisk or whatever tool you prefer), or is listed in your /etc/fstab as a swap partition.

Thanks for your answer!

My /dev/sdb block:
Model: ATA WDC WD10EZEX-00W (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Code:
Number  Start    End      Size      File system         Name                      Flags
 1       1049kB  32.3GB  32.3GB   ext4
 2       32.3GB  36.6GB  4295MB   linux-swap(v1)  Basic data partition  msftdata
 3       36.6GB  251GB   215GB    ext4                    Basic data partition   msftdata
 4       251GB   574GB   322GB    ntfs                     Basic data partition   msftdata
 5       574GB   896GB   322GB    ntfs                     Basic data partition   msftdata
 6       896GB   1000GB  105GB    ntfs                    Basic data partition   msftdata
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum