LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   File system mounting: Thunar can, mount can't (https://www.linuxquestions.org/questions/slackware-14/file-system-mounting-thunar-can-mount-can%27t-835116/)

catkin 09-29-2010 03:13 AM

File system mounting: Thunar can, mount can't
 
Hello :-)

A file system can be mounted by Thunar (Xfce's file system browser) but mount fails with "wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or helper program, or other error".

How can that be? What can Thunar (hald) be doing differently from the mount command?

Some more details:
  • The file system is on a USB HDD.
  • The file system is not in /etc/fstab.
  • The file system is JFS.
  • Specifying -t on the mount command gives the same result.
  • fsck has not been tried.
  • cfdisk display:
    Code:

      Name      Flags    Part Type FS Type        [Label]      Size (MB)
     ---------------------------------------------------------------------
      sdc1                Primary  Linux JFS      [CDB2]        500105.25

  • The OS is Slackware 13.0 32-bit.
  • (there was a udev rule for the partition which runs a script that tries to mount the file system but this was disabled for testing)
A CLI scrape:
Code:

root@CW8:~# df /dev/sdc1
Filesystem    Type    Size  Used Avail Use% Mounted on
-                -    1.7G  220K  1.7G  1% /dev
root@CW8:~# # Now mount the file system in Thunar
root@CW8:~# df /dev/sdc1
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sdc1      jfs    466G  205G  262G  44% /media/CDB2
root@CW8:~# # Now unmount the file system in Thunar
root@CW8:~# df /dev/sdc1
Filesystem    Type    Size  Used Avail Use% Mounted on
-                -    1.7G  220K  1.7G  1% /dev
root@CW8:~# tail -2 /var/log/messages
Sep 29 13:33:48 CW8 hald: mounted /dev/sdc1 on behalf of uid 1000
Sep 29 13:34:10 CW8 hald: unmounted /dev/sdc1 from '/media/CDB2' on behalf of uid 1000
root@CW8:~# file /media/hd0
/media/hd0: directory
root@CW8:~# mount /dev/sdc1 /media/hd0
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
      missing codepage or helper program, or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

Huh?

Best

Charles

GazL 09-29-2010 04:21 AM

What does /proc/mounts show while the filesystem is mounted through thunar?

You could try a '-t auto' on the mount, but I don't know why '-t jfs' wouldn't work.

catkin 09-29-2010 06:44 AM

Thanks GazL :)

Code:

root@CW8:~# cat /proc/mounts | grep sdc1
/dev/sdc1 /media/CDB2 jfs ro,nosuid,nodev 0 0
root@CW8:~# # Unmounted in Thunar
root@CW8:~# mount -t auto /dev/sdc1 /media/hd0
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
      missing codepage or helper program, or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

I believe (but stand to be corrected) that -t auto explicitly requests the default behaviour.

The script that was being run from a udev rule has been working for a while, using mount /dev/sdc1 /media/hd0 so the command does work except that two or three times it has resulted in the current error message. When that happened before I assumed file system corruption and re-ran /sbin/jfs_mkfs. This time the error came after reviewing the file system contents using Thunar.

onebuck 09-29-2010 06:59 AM

Hi,

I'm curious!

Try 'mount -t auto /dev/sdc1 /mnt/hd' since your root.

:hattip:

catkin 09-29-2010 07:11 AM

Thanks onebuck :)

Code:

root@CW8:~# ls -ld /mnt/hd
ls: cannot access /mnt/hd: No such file or directory
root@CW8:~# mkdir /mnt/hd
root@CW8:~# mount -t auto /dev/sdc1 /mnt/hd
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
      missing codepage or helper program, or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

EDIT: I already tried creating /tmp/mnt and using that as a mountpoint, too -- with the same result.

H_TeXMeX_H 09-29-2010 08:13 AM

I would make sure there are no bad blocks or that the drive is not failing.

GazL 09-29-2010 08:55 AM

Quote:

Originally Posted by catkin (Post 4112463)
I believe (but stand to be corrected) that -t auto explicitly requests the default behaviour.

Yes, you're quite right, man-page says:
Quote:

If no -t option is given, or if the auto type is specified,
mount will try to guess the desired type.
I wasn't really expecting it to work but as things weren't making much sense I figured it was worth a shot. ;)

catkin 09-29-2010 09:05 AM

Thanks H_TeXMeX_H :)

Code:

root@CW8:~# smartctl -i /dev/sdc
smartctl version 5.38 [i486-slackware-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: StoreJet Transcend  Version:
Serial number: 801130168383
Device type: disk
Local Time is: Wed Sep 29 19:14:39 2010 IST
Device does not support SMART
root@CW8:~# jfs_fsck -n /dev/sdc1
jfs_fsck version 1.1.14, 06-Apr-2009
processing started: 9/29/2010 19.28.44
The current device is:  /dev/sdc1
Block size in bytes:  4096
Filesystem size in blocks:  122096000
**Phase 1 - Check Blocks, Files/Directories, and  Directory Entries
**Phase 2 - Count links
**Phase 3 - Duplicate Block Rescan and Directory Connectedness
**Phase 4 - Report Problems
**Phase 5 - Check Connectivity
**Phase 6 - Perform Approved Corrections
**Phase 7 - Verify File/Directory Allocation Maps
**Phase 8 - Verify Disk Allocation Maps
488384000 kilobytes total disk space.
      115 kilobytes in 30 directories.
214038720 kilobytes in 344 user files.
        0 kilobytes in extended attributes
  206243 kilobytes reserved for system use.
274139152 kilobytes are available for use.
File system checked READ ONLY.
Filesystem is clean.

badblocks is running ... and running .... and running ...

If badblocks does find bad blocks, the original question (of how Thunar is able to mount it and mount is not) remains.

catkin 09-30-2010 06:55 AM

There are no badblocks (FYI it took ~18 hours!):
Code:

root@CW8:~# badblocks -n -s /dev/sdc1
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: done


H_TeXMeX_H 09-30-2010 09:23 AM

Alright, well, since SMART is not available, we can assume the disk is good.

Maybe see dmesg for any clues.

catkin 09-30-2010 12:54 PM

Already checked dmesg and found nothing. Mysterious.

Ah, well -- I'll create a new file system, ext3 this time, and see how it goes ...


All times are GMT -5. The time now is 07:06 PM.