iscsi mounts not restarted after suspend/resume

Bug #641816 reported by P
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Low
Unassigned

Bug Description

Steps to reproduce
* have an ext4 fs mounted through an iSCSI protocol
* list files there, no problems
* suspend the computer to RAM
* resume the computer

EXPECTED : files accessible on the iSCSI FS

PROBLEM : the FS is still mounted but the files are unaccessible (IO error)

workaround :
1. umount /iscsifilesystem
2. mount /iscsifilesystem

example after suspend then resume :

$ LC_ALL=C df /mnt/synology-iscsi/
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdc1 154816504 96783688 50168608 66% /mnt/synology-iscsi

$ LC_ALL=C ls -l /mnt/synology-iscsi/
ls: reading directory /mnt/synology-iscsi/: Input/output error
total 0

$ sudo /etc/init.d/open-iscsi status
 * iscsid is running
 * Current active iSCSI sessions: tcp: [15] 192.168.0.49:3260,1 iqn.2010-03.synology:vmwarepool1

$ sudo umount /mnt/synology-iscsi
$ LC_ALL=C df /mnt/synology-iscsi/
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 13741696 11028984 2014688 85% /

$ sudo mount /mnt/synology-iscsi
$ LC_ALL=C df /mnt/synology-iscsi/
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb1 154816504 96783688 50168608 66% /mnt/synology-iscsi
$ LC_ALL=C ls -l /mnt/synology-iscsi/
total xx
-rw-r--r-- 1 pascal pascal 289 Jul 11 12:23 Nouvelle carte.mm
drwx------ 2 pascal pascal 16384 Mar 24 17:36 lost+found
drwxr-xr-x 2 pascal pascal 4096 Jun 16 21:15 snapshots
drwxr-xr-x 3 pascal pascal 4096 Jul 9 15:00 vms

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: linux-image (not installed)
Regression: No
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.32-24.42-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
Architecture: amd64
CRDA: Error: [Errno 2] Aucun fichier ou dossier de ce type
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfdff4000 irq 22'
   Mixer name : 'Realtek ALC888'
   Components : 'HDA:10ec0888,a0a0062d,00100001'
   Controls : 24
   Simple ctrls : 14
Date: Sat Sep 18 08:12:34 2010
HibernationDevice: RESUME=UUID=26bb3bb3-9bd1-4755-8a7a-f6b15eea8afb
InstallationMedia: Kubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427)
MachineType: AOpen i965GMx-IF
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-24-generic root=UUID=ca9c0d9a-486c-4e28-84b1-e0fd92313083 ro quiet splash
ProcEnviron:
 LANGUAGE=
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions: linux-firmware 1.34.1
RfKill:

SourcePackage: linux
dmi.bios.date: 10/03/2008
dmi.bios.vendor: Phoenix Technologies, LTD
dmi.bios.version: 6.00 PG
dmi.board.name: i965GMx-IF
dmi.board.vendor: AOpen
dmi.board.version: 558EX10I690
dmi.chassis.type: 3
dmi.chassis.vendor: AOpen
dmi.chassis.version: i965GMx-IF
dmi.modalias: dmi:bvnPhoenixTechnologies,LTD:bvr6.00PG:bd10/03/2008:svnAOpen:pni965GMx-IF:pvrAO00001JW:rvnAOpen:rni965GMx-IF:rvr558EX10I690:cvnAOpen:ct3:cvri965GMx-IF:
dmi.product.name: i965GMx-IF
dmi.product.version: AO00001JW
dmi.sys.vendor: AOpen

Revision history for this message
P (p92) wrote :
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi PascalCavy,

If you could also please test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kernel-suspend
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
P (p92) wrote :

Problem still present with
$ cat /proc/version
Linux version 2.6.37-999-generic (root@zinc) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #201012241127 SMP Fri Dec 24 11:29:32 UTC 2010
$ uname -a
Linux xxxx 2.6.37-999-generic #201012241127 SMP Fri Dec 24 11:29:32 UTC 2010 x86_64 GNU/Linux

tags: added: maverick
removed: lucid needs-upstream-testing
Kenni (kenni)
Changed in linux (Ubuntu):
status: Expired → New
Revision history for this message
Kenni (kenni) wrote :

PascalCavy has already provided the requested information, hence reopening from the Expired state.
If more info or testing is needed to resolve this issue, I'll gladly help to provide it as well.

Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Vladyslav Shtabovenko (vl-sht) wrote :

This bug is still present in Ubuntu 11.04 but in a slightly different form. After resume the open-iscsi service is always stopped even though it was running before the suspend. After resume I have

$sudo service open-iscsi status
 * iscsid is not running

If you start it by hand and then login to your storage again
$sudo service open-iscsi start
 * Starting iSCSI initiator service iscsid [ OK ]
 * Setting up iSCSI targets [ OK ]
$sudo iscsiadm -m node --targetname "iqn-2011-09.com.mydomain:storage.seagate" --portal "192.168.4.43:3260" --login
Logging in to [iface: default, target: iqn-2011-09.com.mydomain:storage.seagate, portal: 192.168.4.43,3260]
Login to [iface: default, target: iqn-2011-09.com.mydomain:storage.seagate, portal: 192.168.4.43,3260]: successful
Everything works again. I believe that Ubuntu stops the service before a suspend but forget to start it after resume.

Revision history for this message
Vladyslav Shtabovenko (vl-sht) wrote :

Here is a very ugly workaround for the problem

$sudo nano /etc/iscsi/iscsid.conf
node.startup = automatic
node.session.auth.username = mylogin
node.session.auth.password = mypass

$sudo nano /etc/pm/sleep.d/20_iscsi

PATH=/sbin:/usr/sbin:/bin:/usr/bin
case "${1}" in
  hibernate|suspend)
    ;;
  thaw|resume)
    /bin/sleep 6 && /etc/init.d/open-iscsi start
    ;;
esac

$sudo chmod +x /etc/pm/sleep.d/20_iscsi

This way after resume the open-iscsi service is started. Because of "node.startup = automatic" it also mounts all known nodes. A very ugly hack indeed, but for a home NAS it works good.

Revision history for this message
Vladyslav Shtabovenko (vl-sht) wrote :

Oops, forgot to say that you also need
"node.session.auth.authmethod = CHAP" in /etc/iscsi/iscsid.conf. Sorry for that.

Revision history for this message
penalvch (penalvch) wrote :

PascalCavy, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? Can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue, could you run the following command in the development release from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux <replace-with-bug-number>

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please do not test the kernel in the daily folder, but the one all the way at the bottom. Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. As well, please comment on which kernel version specifically you tested.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream', and comment as to why specifically you were unable to test it.

Please let us know your results. Thanks in advance.

tags: added: lucid needs-upstream-testing
Changed in linux (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.