LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-24-2015, 12:16 AM   #1
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Rep: Reputation: 26
How to get mount command to run and connect a disk all only 1 partition


How to get mount command to run and connect a disk all only 1 partition ?
--Glenn

# mount -v /dev/sdc /media/disk2
mount: mount(2) failed: No such file or directory

#
# strace -e open mount /dev/sdc /media/disk2
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libmount.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libblkid.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libpcre.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/proc/filesystems", O_RDONLY) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/en_US.UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
open("/run/mount/utab", O_RDWR|O_CREAT|O_CLOEXEC, 0644) = 3
open("/dev/sdc", O_RDONLY|O_CLOEXEC) = 3
open("/sys/dev/block/8:32", O_RDONLY|O_CLOEXEC) = 4
mount: mount(2) failed: No such file or directory
+++ exited with 32 +++

# ll /media/disk2
total 0

# fdisk -l

.
.
Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes, 3907029168 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

# mount --help

Usage:
mount [-lhV]
mount -a [options]
mount [options] [--source] <source> | [--target] <directory>
mount [options] <source> <directory>
mount <operation> <mountpoint> [<target>]

Options:
-a, --all mount all filesystems mentioned in fstab
-c, --no-canonicalize don't canonicalize paths
-f, --fake dry run; skip the mount(2) syscall
-F, --fork fork off for each device (use with -a)
-T, --fstab <path> alternative file to /etc/fstab
-h, --help display this help text and exit
-i, --internal-only don't call the mount.<type> helpers
-l, --show-labels lists all mounts with LABELs
-n, --no-mtab don't write to /etc/mtab
-o, --options <list> comma-separated list of mount options
-O, --test-opts <list> limit the set of filesystems (use with -a)
-r, --read-only mount the filesystem read-only (same as -o ro)
-t, --types <list> limit the set of filesystem types
--source <src> explicitly specifies source (path, label, uuid)
--target <target> explicitly specifies mountpoint
-v, --verbose say what is being done
-V, --version display version information and exit
-w, --rw, --read-write mount the filesystem read-write (default)

-h, --help display this help and exit
-V, --version output version information and exit

Source:
-L, --label <label> synonym for LABEL=<label>
-U, --uuid <uuid> synonym for UUID=<uuid>
LABEL=<label> specifies device by filesystem label
UUID=<uuid> specifies device by filesystem UUID
PARTLABEL=<label> specifies device by partition label
PARTUUID=<uuid> specifies device by partition UUID
<device> specifies device by path
<directory> mountpoint for bind mounts (see --bind/rbind)
<file> regular file for loopdev setup

Operations:
-B, --bind mount a subtree somewhere else (same as -o bind)
-M, --move move a subtree to some other place
-R, --rbind mount a subtree and all submounts somewhere else
--make-shared mark a subtree as shared
--make-slave mark a subtree as slave
--make-private mark a subtree as private
--make-unbindable mark a subtree as unbindable
--make-rshared recursively mark a whole subtree as shared
--make-rslave recursively mark a whole subtree as slave
--make-rprivate recursively mark a whole subtree as private
--make-runbindable recursively mark a whole subtree as unbindable


#dmesg

2015-10-24T13:53:03.865691+11:00 test kernel: [58379.310044] usb 1-2: new high-speed USB device number 4 using ehci-pci
2015-10-24T13:53:04.001628+11:00 test kernel: [58379.446491] usb 1-2: New USB device found, idVendor=04fc, idProduct=0c25
2015-10-24T13:53:04.001661+11:00 test kernel: [58379.446504] usb 1-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
2015-10-24T13:53:04.001664+11:00 test kernel: [58379.446511] usb 1-2: Product: USB to Serial-ATA bridge
2015-10-24T13:53:04.001667+11:00 test kernel: [58379.446518] usb 1-2: Manufacturer: Sunplus Technology Inc.
2015-10-24T13:53:04.001670+11:00 test kernel: [58379.446523] usb 1-2: SerialNumber: ST32000542 5XW1ZMG4
2015-10-24T13:53:04.001673+11:00 test kernel: [58379.449478] usb-storage 1-2:1.0: USB Mass Storage device detected
2015-10-24T13:53:04.005699+11:00 test kernel: [58379.450122] scsi host5: usb-storage 1-2:1.0
2015-10-24T13:53:04.009508+11:00 test mtp-probe: checking bus 1, device 4: "/sys/devices/pci0000:00/0000:00:12.2/usb1/1-2"
2015-10-24T13:53:04.010717+11:00 test mtp-probe: bus: 1, device: 4 was not an MTP device
2015-10-24T13:53:05.009615+11:00 test kernel: [58380.455696] scsi 5:0:0:0: Direct-Access ST320005 42AS PQ: 0 ANSI: 2
2015-10-24T13:53:05.009644+11:00 test kernel: [58380.456130] sd 5:0:0:0: Attached scsi generic sg3 type 0
2015-10-24T13:53:05.009646+11:00 test kernel: [58380.457884] sd 5:0:0:0: [sdc] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
2015-10-24T13:53:05.013585+11:00 test kernel: [58380.460454] sd 5:0:0:0: [sdc] Write Protect is off
2015-10-24T13:53:05.013619+11:00 test kernel: [58380.460471] sd 5:0:0:0: [sdc] Mode Sense: 38 00 00 00
2015-10-24T13:53:05.017676+11:00 test kernel: [58380.464150] sd 5:0:0:0: [sdc] No Caching mode page found
2015-10-24T13:53:05.017698+11:00 test kernel: [58380.464164] sd 5:0:0:0: [sdc] Assuming drive cache: write through
2015-10-24T13:53:05.049635+11:00 test kernel: [58380.494889] sd 5:0:0:0: [sdc] Attached SCSI disk
 
Old 10-24-2015, 12:23 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Did you make a filesystem on sdc?
 
Old 10-24-2015, 01:23 AM   #3
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Original Poster
Rep: Reputation: 26
Quote:
Originally Posted by Emerson View Post
Did you make a filesystem on sdc?
Yes -at the time it was /dev/sdb

Some details:
--Glenn

# fsck.reiser4 --check /dev/sdb
*******************************************************************
This is an EXPERIMENTAL version of fsck.reiser4. Read README first.
*******************************************************************

Fscking the /dev/sdb block device.


Will check the consistency of the Reiser4 SuperBlock.


Will check the consistency of the Reiser4 FileSystem.


Continue?


(Yes/No): yes
***** fsck.reiser4 started at Fri Feb 27 02:58:06 2015
Reiser4 fs was detected on /dev/sdb.


Master super block (16):
magic: ReIsEr4
blksize: 4096
format: 0x0 (format40)
uuid: 3006ced1-7490-4ea8-a9b8-d82143c6bede
label: <none>

Format super block (17):
plugin: format40
description: Disk-format plugin.
version: 0
magic: ReIsEr40FoRmAt
mkfs id: 0x1ddaf754
flushes: 0
blocks: 488378640
free blocks: 217146980
root block: 37017218
tail policy: 0x2 (smart)
next oid: 0xedade
file count: 188313
tree height: 6
key policy: LARGE


CHECKING THE STORAGE TREE


Read nodes 197008413


Nodes left in the tree 197008413
Leaves of them 194764277, Twigs of them 2217790
Time interval: Fri Feb 27 03:00:05 2015 - Fri Feb 27 11:07:45 2015

CHECKING EXTENT REGIONS.


Read twigs 2217790


Time interval: Fri Feb 27 11:07:45 2015 - Fri Feb 27 13:18:06 2015

CHECKING THE SEMANTIC TREE


FSCK: semantic.c: 573: repair_semantic_dir_open: Failed to recognize the
plugin for the directory [29:0:2a].

FSCK: semantic.c: 651: repair_semantic_root_prepare: No root directory
opened.
Time interval: Fri Feb 27 13:18:06 2015 - Fri Feb 27 13:18:06 2015


FSCK: repair.c: 550: repair_sem_fini: On-disk used block bitmap and really
used block bitmap differ.

***** fsck.reiser4 finished at Fri Feb 27 13:18:07 2015
Closing fs...done

2 fatal corruptions were detected in FileSystem. Run with --build-fs
option to fix them.


-prevoius try
http://www.spinics.net/lists/reiserf.../msg04903.html
 
Old 10-24-2015, 01:29 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
The problem clearly occurs in the mount system call, so why do you strace open()?

Edit: man 2 mount says "ENOENT A pathname was empty or had a nonexistent component", which I have a hard time to understand.

Last edited by berndbausch; 10-24-2015 at 01:33 AM.
 
Old 10-24-2015, 01:35 AM   #5
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Original Poster
Rep: Reputation: 26
# strace -e open mount /dev/sdc /media/disk2
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libmount.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libblkid.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libpcre.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/proc/filesystems", O_RDONLY) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/en_US.UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
open("/run/mount/utab", O_RDWR|O_CREAT|O_CLOEXEC, 0644) = 3
open("/dev/sdc", O_RDONLY|O_CLOEXEC) = 3
open("/sys/dev/block/8:32", O_RDONLY|O_CLOEXEC) = 4
mount: mount(2) failed: No such file or directory
+++ exited with 32 +++
 
Old 10-24-2015, 03:07 AM   #6
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Original Poster
Rep: Reputation: 26
Re:
The problem clearly occurs in the mount system call
man 2 mount says "ENOENT A pathname was empty or had a nonexistent component"

#cat /proc/filesystems | awk '{print $NF}' | sed '/^$/d' | grep -i reiser
reiserfs
reiser4

I did:
# mount -t reiser4 /dev/sdc /media/disk2
mount: mount(2) failed: No such file or directory

# ll /media/disk2
total 0
 
Old 10-24-2015, 05:40 AM   #7
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Glenn D. View Post
# strace -e open mount /dev/sdc /media/disk2
I am curious what you get with
Code:
strace -e mount mount  /dev/sdc /media/disk2
The fact fhat reiserfs is in your /proc/filesystems doesn't mean it's on that disk. Have you fsck'd the disk recently?
 
Old 10-24-2015, 09:51 AM   #8
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Original Poster
Rep: Reputation: 26
Q:Have you fsck'd the disk recently?
A: [Feb 2015] See threads
http://www.spinics.net/lists/reiserf.../msg04665.html
http://www.spinics.net/lists/reiserf.../msg04900.html
Data and files on disk, just trying to access it but volume wont mount for some reason.
--Glenn
 
Old 10-24-2015, 09:51 AM   #9
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,774

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Rerun that strace with "-e file". The ENOENT error could have come from a lot of syscalls other than open(). (My bet would be on stat() or lstat().)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount more disk space to linux partition? NoahJK Linux - Server 2 08-29-2010 02:19 PM
mount does not show the disk partition saawan Linux - General 1 06-12-2009 02:29 PM
Cannot Mount CF Disk Linux Partition ravi14 Linux - Software 1 12-03-2008 12:54 AM
[HOW] mount a whole disk not just a partition duyuyang Linux - Software 5 11-27-2008 01:30 AM
Unable to mount disk partition lovingsanth Linux - Hardware 3 05-22-2008 08:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration