unmount harddisk when inserting CD or USB

Hello,

i have a problem since installed OpenSuse 13.1 64bit:
I have 2 Harddisks in my system, 1st ist swap and “/”, 2nd is data storage only.

Wehen i insert a CD/DVD or an USB stick the 2nd harddisk get unmounted,
so i’m not able to copy data from the inserted device to the 2nd data storage harddisk.

How to proceed to get this problem solved ?
What information might be helpful for you to post here ?

thx wally

Please post

cat /etc/fstab

And without the device added:

su -c 'fdisk -l'

and

mount | grep '^/dev'

and

ls -l /dev/disk/by-label

And the above three again with the device added.

(And of course all between CODE tags, the # button in the tool bar).

@Henk
thx for reply !

i created a new txt -file on the 2nd drive to collect the cli outpouts:
When inserting the CD i was unable to save this txt -file and got following MessageBox:
with device added:

MessageBox:
“The document could not be saved, as it was not possible
to write to /home/op/WORK/ACTUAL/suse.txt.
Check that you have write access to this file or that
enough disk space is available.”

I did “save as” to 1st drive now and the file is saved without problem:

Here are the outputs:

without device added:

> cat /etc//fstab 
devpts  /dev/pts          devpts  mode=0620,gid=5 0 0
proc    /proc             proc    defaults        0 0
sysfs   /sys              sysfs   noauto          0 0
debugfs /sys/kernel/debug debugfs noauto          0 0
usbfs   /proc/bus/usb     usbfs   noauto          0 0
tmpfs   /run              tmpfs   noauto          0 0
/dev/disk/by-id/ata-KINGSTON_SVP200S360G_50026B722901E1CB-part1 / ext3 acl 1 1
/dev/disk/by-id/ata-KINGSTON_SVP200S360G_50026B722901E1CB-part2 swap swap defaults 0 0
/dev/disk/by-id/ata-WDC_WD15EARX-00PASB0_WD-WCAZAE562024-part1 /home/op/WORK        ext4       defaults              1 2
>


root: 
> fdisk -l

Disk /dev/sda: 60.0 GB, 60022480896 bytes, 117231408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x6dfd4fcc

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   113049404    56523678+  83  Linux
/dev/sda2       113049600   117229567     2089984   82  Linux swap / Solaris

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes, 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00038c6f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   943722495   471860224   83  Linux
/dev/sdb2       943722496  2930277167   993277336   83  Linux
> 
root:
> mount | grep '^/dev'
/dev/sda1 on / type ext3 (rw,relatime,data=ordered)
/dev/sdb1 on /home/op/WORK type ext4 (rw,relatime,data=ordered)
>

root:
> ls -l /dev/disk/by-label
total 0
lrwxrwxrwx 1 root root 10 Apr 29 13:11 CRIT -> ../../sdb2
lrwxrwxrwx 1 root root 10 Apr 29 13:11 WORK -> ../../sdb1
> 

with device added:

MessageBox:
"The document could not be saved, as it was not possible 
to write to /home/op/WORK/ACTUAL/suse.txt.
Check that you have write access to this file or that 
enough disk space is available."


> cat /etc/fstab
devpts  /dev/pts          devpts  mode=0620,gid=5 0 0
proc    /proc             proc    defaults        0 0
sysfs   /sys              sysfs   noauto          0 0
debugfs /sys/kernel/debug debugfs noauto          0 0
usbfs   /proc/bus/usb     usbfs   noauto          0 0
tmpfs   /run              tmpfs   noauto          0 0
/dev/disk/by-id/ata-KINGSTON_SVP200S360G_50026B722901E1CB-part1 / ext3 acl 1 1
/dev/disk/by-id/ata-KINGSTON_SVP200S360G_50026B722901E1CB-part2 swap swap defaults 0 0
/dev/disk/by-id/ata-WDC_WD15EARX-00PASB0_WD-WCAZAE562024-part1 /home/op/WORK        ext4       defaults              1 2
> 

root:
> fdisk -l 

Disk /dev/sda: 60.0 GB, 60022480896 bytes, 117231408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x6dfd4fcc

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   113049404    56523678+  83  Linux
/dev/sda2       113049600   117229567     2089984   82  Linux swap / Solaris

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes, 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00038c6f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   943722495   471860224   83  Linux
/dev/sdb2       943722496  2930277167   993277336   83  Linux
linux-uxmh:/home/op # 

root:
>  mount | grep '^/dev'
/dev/sda1 on / type ext3 (rw,relatime,data=ordered)
/dev/sdb1 on /home/op/WORK type ext4 (ro,relatime,data=ordered)
/dev/sr0 on /run/media/op/ds17348 type iso9660 (ro,nosuid,nodev,relatime,uid=1000,gid=100,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2)
/dev/sr0 on /var/run/media/op/ds17348 type iso9660 (ro,nosuid,nodev,relatime,uid=1000,gid=100,iocharset=utf8,mode=0400,dmode=0500)
>


root:
> ls -l /dev/disk/by-label
total 0
lrwxrwxrwx 1 root root 10 Apr 29 13:11 CRIT -> ../../sdb2
lrwxrwxrwx 1 root root  9 Apr 29 13:23 ds17348 -> ../../sr0
lrwxrwxrwx 1 root root 10 Apr 29 13:11 WORK -> ../../sdb1
linux-uxmh:/home/op # 
> 


Hm : **“swap solaris” ** , no idea where this comes from, no solaris here

"“CRIT” sdb2 is a second partition beside “WORK” which is usually not mounted

Solaris uses the same type code as linux swap. So “fdisk” just lists both possibilities. If you don’t have solaris, just read that as saying “swap”.

As for your problem – I am guessing that it’s a hardware issue.

hardware-issue ?
on OpenSuse 13.1 32bit all works as usual.
I do not assume its an architecture problem 32/64 but some settings in the
64bit version may be bad.

Trying to mount /dev/sdb1 gives message:

An error occurred while accessing 'WORK', the system responded: The  requested operation has failed: Error mounting system-managed device  /dev/sdb1: Command-line `mount "/home/op/WORK"' exited with non-zero  exit status 32: mount: wrong fs type, bad option, bad superblock on  /dev/sdb1, missing codepage or helper program, or other error In some  cases useful info is found in syslog - try dmesg | tail or so. 

Even when i remove the CD the WORK partition is not accessible.
Only thing helps is a complete restart.
After restart all is normal again.

As already pointed out, 82 can mean either “Linux swap” or “Solaris”.

I do see no problems in your listings at all. The CD has it’s own label, device files and mount point. Comes nowhere near your /dev/sdb1, /dev/disk/by-label/WORK partition mounted on /home/op/WORK directory. Also it is mounted in the second case (contrary to your conclusion in the title of this thread).

However in the second case it is mounted read-only!

And your mount command gives an error, suggesting to look at

tail dmesg

Did you do that?

In any case, I would unmount it and then do an fsck of it.

What I’d try:

See what syslog/dmesg says.

Try a file system check (command fsck) on sdb1 (it has to be unmounted first).

filesystemcheck completed successfully without any error.
Same behavior as before :frowning:

And dmesg?

hm, not sure this helps. but

   79.302875] LVM: Logical Volume autoactivation enabled.
   79.302932] LVM: Activation generator successfully completed.
   79.879461] xor: measuring software checksum speed
   79.916016]    prefetch64-sse:  6517.000 MB/sec
   79.956014]    generic_sse:  6027.000 MB/sec
   79.956017] xor: using function: prefetch64-sse (6517.000 MB/sec)
   80.024037] raid6: sse2x1    2548 MB/s
   80.092024] raid6: sse2x2    2849 MB/s
   80.160028] raid6: sse2x4    2815 MB/s
   80.160031] raid6: using algorithm sse2x2 (2849 MB/s)
   80.160033] raid6: using intx1 recovery algorithm
   80.175391] bio: create slab <bio-1> at 1
   80.176914] Btrfs loaded
   80.240317] JFS: nTxBlock = 8192, nTxLock = 65536
   80.271851] NILFS version 2 loaded
   80.334745] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
  120.220396] st: Version 20101219, fixed bufsize 32768, s/g segs 256
  120.322352] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
  120.322359] EDD information not available.
  139.492306] SFW2-INext-DROP-DEFLT IN=enp0s7 OUT= MAC= SRC=fe80:0000:0000:0000:be5f:f4ff:fe05:49b5 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=84 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=44 
  267.556442] SFW2-INext-DROP-DEFLT IN=enp0s7 OUT= MAC= SRC=fe80:0000:0000:0000:be5f:f4ff:fe05:49b5 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=84 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=44 
  282.565240] fuse init (API version 7.22)
  523.566275] SFW2-INext-DROP-DEFLT IN=enp0s7 OUT= MAC= SRC=fe80:0000:0000:0000:be5f:f4ff:fe05:49b5 DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=84 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=44 
  662.214572] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
  698.946416] LVM: Logical Volume autoactivation enabled.
  698.946559] LVM: Activation generator successfully completed.
  781.808095] ata2.00: exception Emask 0x10 SAct 0x0 SErr 0x1950000 action 0xe frozen
  781.808113] ata2: SError: { PHYRdyChg CommWake Dispar LinkSeq TrStaTrns }
  781.808121] ata2.00: failed command: READ DMA EXT
  781.808135] ata2.00: cmd 25/00:08:a8:10:c1/00:00:31:00:00/e0 tag 0 dma 4096 in
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x14 (ATA bus error)
  781.808141] ata2.00: status: { DRDY }
  781.808154] ata2: hard resetting link
  781.808158] ata2: nv: skipping hardreset on occupied port
  787.720047] ata2: link is slow to respond, please be patient (ready=0)
  791.864084] ata2: SRST failed (errno=-16)
  791.864100] ata2: hard resetting link
  791.864107] ata2: nv: skipping hardreset on occupied port
  796.992082] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  797.472555] ata2.00: configured for UDMA/133
  797.472570] ata2.00: device reported invalid CHS sector 0
  797.472590] ata2: EH complete
  828.804092] ata2.00: exception Emask 0x10 SAct 0x0 SErr 0x1950000 action 0xe frozen
  828.804108] ata2: SError: { PHYRdyChg CommWake Dispar LinkSeq TrStaTrns }
  828.804116] ata2.00: failed command: READ DMA
  828.804130] ata2.00: cmd c8/00:08:08:09:00/00:00:00:00:00/ef tag 0 dma 4096 in
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x14 (ATA bus error)
  828.804137] ata2.00: status: { DRDY }
  828.804149] ata2: hard resetting link
  828.804153] ata2: nv: skipping hardreset on occupied port
  834.716055] ata2: link is slow to respond, please be patient (ready=0)
  836.676070] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  841.676184] ata2.00: qc timeout (cmd 0xec)
  841.676199] ata2.00: failed to IDENTIFY (I/O error, err_mask=0x4)
  841.676205] ata2.00: revalidation failed (errno=-5)
  841.676220] ata2: hard resetting link
  841.676226] ata2: nv: skipping hardreset on occupied port
  847.184043] ata2: link is slow to respond, please be patient (ready=0)
  849.760073] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  849.781210] ata2.00: configured for UDMA/133
  849.781226] ata2.00: device reported invalid CHS sector 0
  849.781250] sd 1:0:0:0: [sdb]  
  849.781255] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
  849.781259] sd 1:0:0:0: [sdb]  
  849.781264] Sense Key : Aborted Command [current] [descriptor]
  849.781270] Descriptor sense data with sense descriptors (in hex):
  849.781272]         72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00 
  849.781288]         00 00 00 00 
  849.781296] sd 1:0:0:0: [sdb]  
  849.781300] Add. Sense: No additional sense information
  849.781305] sd 1:0:0:0: [sdb] CDB: 
  849.781309] Read(10): 28 00 0f 00 09 08 00 00 08 00
  849.781323] end_request: I/O error, dev sdb, sector 251660552
  849.781356] ata2: EH complete
  880.804122] ata2.00: exception Emask 0x10 SAct 0x0 SErr 0x1950000 action 0xe frozen
  880.804139] ata2: SError: { PHYRdyChg CommWake Dispar LinkSeq TrStaTrns }
  880.804148] ata2.00: failed command: READ DMA EXT
  880.804162] ata2.00: cmd 25/00:08:00:09:40/00:00:23:00:00/e0 tag 0 dma 4096 in
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x14 (ATA bus error)
  880.804168] ata2.00: status: { DRDY }
  880.804181] ata2: hard resetting link
  880.804185] ata2: nv: skipping hardreset on occupied port
  881.676071] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  882.132790] ata2.00: configured for UDMA/133
  882.132806] ata2.00: device reported invalid CHS sector 0
  882.132825] ata2: EH complete
  924.701618] ISO 9660 Extensions: Microsoft Joliet Level 3
  924.776056] ISO 9660 Extensions: RRIP_1991A
>

> tail dmesg 
tail: cannot open ‘dmesg’ for reading: No such file or directory
> 


Sorry, should just be dmesg, no tail :shame: