Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I get this when I run smbmount command and then look at mount point with ls in order to see a list of dirs/files on the mount that I just tried to create.
What is this telling me? Other than the obvious, i.e. I/O error, which means nothing to me. What is the cause & how do I correct it?
JesseMor
/bin/ls or "ls" would be the command you use to list the contents of a directory. It is still used when you are using a GUI to browse for you. Obviously the problem is the samba mount is not loaded properly, and thus browsing the files gives you an error. Take a look at your /etc/fstab and see what may be causing a problem with said mount.
The only items here show the 4 HD partitions, hda1, hda2, hda3, & hda4.
These are I believe mounted in /dev. I for whatever reason expected to find them under /mnt. I used this cmnd to try to mount the windows directory located on a remote computer (it works most of the time, but sometimes it appears to disappear without any input from me, and other times it just doesn't want to mount).
# smbmount/D97MTT43/mydocuments /mnt/mydocuments
When it "doesn't want to mount", I determine this by ls mnt/mydocuments and see nothing there & the error message that I first mentioned.
HOWEVER, using # mount , I see that it looks like D97MTT43/mydocuments is mounted?? Any further attempts fail, since it thinks there is already something on this mount point, but as I said I can't see/access anything.
NOW, I can sometimes run # umount &/or # smbumount and then repeat my mount attempt, as before, and it occasionally works as I believe it should. It is the unpredictable behavior that I can't understand.
Do you see anything I'm doing wrong?
It is likely you don't have permissions like you think, default is pretty low for anything other than the /. Your whole fstab seems odd, but are all these working? You do not have a line for mounting the samba share at all, though, which is likely causing issues.
What distro are you using and did it, or your build that fstab?(and is that all of it? or abridged, I see no CD or floppy no shared memory...)
The best I can tell is that Kernel is 2.2.16 & Slackware 7.0.0. My adult son, a BSEE in Computer Science built this system in 2002, which is why I do not know much about it. The comment was my son's (# don't know what /dev/pts is on 16MAR2002 jem).
Yes, everything appears to be working. Yes, you see all 7 lines of fstab.
When booting, I see fd0 & hdc scroll by and I have used the floppy on several occasions. Also see "Secondary Master: ATAPI CDROM". I can't figure out where cdrom & floppy are located. After running smbmount cmnd, I then do # mount and see this:
/dev/hda1 on /type ext2 (rw)
/dev/hda3 on /usr type ext2 (rw)
/dev/hda4 on /usr2 type ext2 (rw)
none on /proc type (rw)
//D79MTT31/mydocuments on /mnt/mydocs type smbfs (0)
Also, there is nothing under /cdrom. I do find an entry in /dev (see below) for hdc and fd0 when I ran find -name hdc & fd0, but don't know what this means.
Under /dev, I found fd0 brw-rw----
and hdc brw-r-----
The b throws me----not a file & not a link, ??
Under /proc/sys/dev/cdrom, I find an info file showing track, size, etc. type stuff.
Under /proc/ide/ide2/hdc, I find file with model, settings, etc.
hdc is probably the name given to your CD rom drive, most distros would mount it to /dev/media or /mnt/cdrom or something depending on the the distro, but that is a different issue, really.
As for Slackware 7.0 with a 2.2 series kernel... wow. I woudln't be able to tell you much at all, I used some of those kernels when I was in school, but never set any up or cared about using linux for anything other than programming at the time. I think it may be time to upgrade distros though, to Slackware 10.2 with a much newer kernel.
Under /dev, I found fd0 brw-rw----
and hdc brw-r-----
The b throws me----not a file & not a link, ??
First of all, you shouldn't look for mount points under /dev. /dev is usually only used to store special device files (ie files that represent the interfaces to your actual devices, like your CD-ROM drive, your hard disks and stuff like that).
The "b" simply indicates that it's a "special block device". This means that, when Linux uses the block device file to write to the device, the data is sent out in blocks (typically 512 kilobytes). This is in contrast to
character device files (indicated by a "c" instead of the "b"), which take data byte-per-byte.
Hard disks for instance, can have both a block and a character device file as 2 different "interfaces" to the same physical device.
Quote:
Originally Posted by JesseMor
These are I believe mounted in /dev. I for whatever reason expected to find them under /mnt.
This indicates to me that you're misinterpreting the mount stuff. A device, under /dev, gets mounted to an empty directory, called the mount point. This mount point, from which you can access the contents of the device (ie disk, cd-rom) after the mount, can be anywhere on your disk. Most systems put the mount points
for CD-roms in /mnt or /media. Hard disks are mounted wherever you specify it in your /etc/fstab file.
So, /dev/hda1, 2, 3 and 4 get mounted on your filesystem in (resp.) /, a dedicated swap partition, /usr and /usr2.
Please use the correct terminology.
Quote:
Originally Posted by JesseMor
Under /proc/sys/dev/cdrom, I find an info file showing track, size, etc. type stuff.
Under /proc/ide/ide2/hdc, I find file with model, settings, etc.
Under /proc is some internal kernel stuff. Those aren't real files, they only show some information that your kernel keeps, such as device statistics and characteristics, for instance.
If you're unexperienced, I would recommend not messing with anything under /proc, since it could harm your system. When you obtain more experience, maybe you can play around with it.
As for the 2 items you've found:
/proc/sys/dev/cdrom probably just mentions the characteristics of your cd-rom drive.
/proc/ide/ide2/hdc indicates that the "hdc" device is on the IDE interface, which is very common for CD-ROMs.
Quote: "This indicates to me that you're misinterpreting the mount stuff. Please use the correct terminology. If you're unexperienced,........"
Reply: I'm marginally able to 'try' to communicate in this arena (newbie). If I were experienced & knew much more, I probably wouldn't be here begging for help.
In all seriousness, I'm trying and I sincerely appreciate all the assistance I can get. I think it is great that all of you are willing to spend some of your time to hold our hands occasionally. I try about everything I can before I trouble you for help, sometimes creating additional problems by holding off on the HELP call! Timmeke, thank you for shedding more light in providing the big picture which is largely missing in manuals and 'man'.
I'm afraid that I drifted afield in this matter, as one thing led to another, where, my objective was to determine why when I do smbmount //D79MTT31/mydocuments /mnt/mydocs, it sometimes works, sometimes appears to remain available for hours & then even though 'mount' shows it to still be there, the contents are missing. And you can rest assured the I do not understand the mnt concept, just trying to follow the instructions in my Samba manual.
JesseMor, sorry. I was simply trying to explain some of the terminology of the Linux world to you, so you could improve your communications in the future. I didn't mean to be so arrogant, especially because you're a newbie. Your attempts to communicate your problem in this forum are very nice indeed. This is indeed the best place to get help for your situation, so don't worry.
About your problem...
Do you see anything in the logs as to why the shared disk gets unmounted suddenly? When you notice this, you should read some of the files in /var/log/samba (or just plain /var/log).
Furthermore, is it possible that the mounted disk becomes temporarily unavailable? For instance, is the computer D79MTT31 available all the time? What kind of machine is it? A Windows box? Is it heavily used?
Have you checked what goes on on that machine as well?
I had the same problem, which I fixed by specifying a port for the samba server that I wanted to connect to. Before specifying the port number, I got the input/output error. After, it worked fine (so far). I carefully read the instructions by the coworker who set up the samba server, which gave a specific port number.
sudo mount -t smbfs //sambaserver.usc.edu/Data /mnt/snap -o
port=139,username=xxx,password=yyy
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.