I have a swap space activated on external disk sda1. After pm-suspend this partition gets deleted (gets new name sdb1) and I keep getting "Read-error on swap-device". I found a discussion relating to this problem (with swap file, not partition) in linux mailing list. It appears that the suggested solution has been implemented and I found it on current kernel but it does not seem to be preventing this from happening on swap partitions. http://kerneltrap.org/mailarchive/linux-kernel/2008/10/18/3717844 vim +1984 /usr/src/linux/fs/namei.c if (check_sticky(dir, victim->d_inode)||IS_APPEND(victim->d_inode)|| IS_IMMUTABLE(victim->d_inode) || IS_SWAPFILE(victim->d_inode)) return -EPERM; Reproducible: Always Steps to Reproduce: 1. swapon /dev/sda1 where sda1 is a swap partition on external disk 2. pm-suspend 3. wake up 4. observe kernel logs for "Read-error on swap-device" and /proc/swaps for deleted nodes Actual Results: # grep "Read-error" /var/log/messages kernel: [176743.130572] Read-error on swap-device (8:0:152) # grep sda1 /proc/swaps /dev/sda1\040(deleted) partition 1048572 6812 1 # swapoff /dev/sda1 swapoff: /dev/sda1: swapoff failed: No such file or directory # ll /dev/sda1 ls: cannot access /dev/sda1: No such file or directory # ll /dev/sdb1 brw-rw---- 1 root disk 8, 17 Apr 10 10:19 /dev/sdb1 # swapoff /dev/sdb1 swapoff: /dev/sdb1: swapoff failed: Invalid argument Expected Results: # grep "Read-error on swap-device" /var/log/messages # grep sda1 /proc/swaps /dev/sda1 partition 1048572 6812 1 Portage 2.2.0_alpha29 (default/linux/x86/10.0/desktop, gcc-4.5.2, glibc-2.13-r2, 2.6.38-gentoo i686) ================================================================= System uname: Linux-2.6.38-gentoo-i686-Mobile_AMD_Sempron-tm-_Processor_3000+-with-gentoo-2.0.2 Timestamp of tree: Fri, 08 Apr 2011 07:15:01 +0000 ccache version 3.1.4 [disabled] app-shells/bash: 4.2_p8 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.1-r1, 3.1.3-r1 dev-util/ccache: 3.1.4 dev-util/cmake: 2.8.4 sys-apps/baselayout: 2.0.2 sys-apps/openrc: 0.8.0 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.68 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.21 sys-devel/gcc: 4.4.5, 4.5.2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82 virtual/os-headers: 2.6.38 (sys-kernel/linux-headers) Repositories: gentoo enlightenment cj-overlay dottout zugaina Installed sets: ACCEPT_KEYWORDS="x86 ~x86" ACCEPT_LICENSE="*" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /usr/bin/startx" CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs buildpkg distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch webrsync-gpg" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en_US" MAKEOPTS="-j1" PKGDIR="/usr/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/enlightenment /var/lib/layman/cj-overlay /var/lib/layman/dottout /var/lib/layman/zugaina" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow X a52 aac acl acpi alsa apm arts avi bash-completion berkdb bitmap-fonts branding bzip2 cairo cd cddb cdr cli consolekit cracklib crypt css curl cxx dbus directfb djvu dri dts dvd dvdr emboss encode exif fam fbcon ffmpeg fftw firefox flac fortran gd gdbm gdu gif gnuplot gpm gtk gzip hddtemp hdf5 iconv imagemagick imlib jpeg lame latex lcms ldap libcaca libg++ libnotify libsamplerate libwww lm_sensors lzma mad matroska memlimit mikmod mmx mng modules motif mp3 mp4 mpeg mplayer mudflap ncurses networkmanager nls nptl nptlonly nsplugin ogg oggvorbis opengl openmp pam pango pcmcia pcre pdf pdflib perl plasma plotutils png policykit ppds pppd python qt3support qt4 quicktime raw readline rss session spell sqlite sqlite3 sse sse2 ssl startup-notification svg sysfs syslog szip tcpd threads tiff tk truetype udev unicode usb v4l v4l2 vcd vim-syntax vorbis wmf x264 x86 xattr xcb xcomposite xine xml xorg xsreensaver xulrunner xv xvid xz zlib" ALSA_CARDS="hda-intel intel8x0 intel8x0m" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev sis vesa v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Can you also attach your dmesg output? Does this occur only with a 2.6.38 kernel? I don't think the discussion from LKML has something to do with this bug. I'm not sure that this is a kernel bug either. And maybe tweaking udev rules could fix your problem.