fuzzy's ongoing Linux server/router question thread

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
System:

Ubuntu Linux
A64 3200+ 754
3 IDE HDDs

Trying to set up a file server:


I'm actually using the desktop version, so I have a gui. But this is just great. My IDE drives save my primary one don't show up anymore.

When I had the drives connected to the controller card, I could see and read all four of my NTFS IDE drives after I had installed NTFS-3G.

Because the system was locking, I unplugged all the drives from the controller card and plugged two of them to the mobo's IDE channels. They show up in Ubuntu's Disk Manager, but I can't access them at all. I have their access path set to /mnt , but when I open the folder the drives aren't there
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
You are following the directions for being a _client_ to a file server. Go down to the next section.

When you "mount" a file share, it means you are making a remote file share accessible to your computer.
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
Originally posted by: Brazen
You are following the directions for being a _client_ to a file server. Go down to the next section.

When you "mount" a file share, it means you are making a remote file share accessible to your computer.

Dangit :(

I thought "mounting" a share was making a drive on the server "shareable"

Ok. Me report back.
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Have you rebooted. Do things like trying to mount your own file system back into itself may have made linux angry. Although I would think it's sanity checks would have prevented any damage. Most flavors of linux have been incredibly "lockup-free" for me, but it does happen, either because of some flaky package installed or some messed up configuration. Samba, though, would definately NOT be a "flaky" package, as should not be most everything in the Ubuntu apt repositories.

Try to undo anything you may have done, try a reboot, and try following the _server_ section of that Samba guide. If you are still having problems, you may just need to wipe the harddrive and start over in a clean environment.
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
Look into some linux basics, such as the directory structure and mounting.

Forget about drive letters, it's a crappy, archaic way of addressing volumes that windows won't let die

to "mount" a volume (be it a samba share, local disk, etc) is to assign it a usable path in the local directory structure. To share files, install the samba server (sudo apt-get install samba) and then configure /etc/samba/smb.conf (or I think Ubuntu has a GUI tool under administration, or use SWAT, which is industry standard. I prefer hacking it by hand myself, but I have enough experience to do so)
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Originally posted by: nweaver
Look into some linux basics, such as the directory structure and mounting.

Forget about drive letters, it's a crappy, archaic way of addressing volumes that windows won't let die

to "mount" a volume (be it a samba share, local disk, etc) is to assign it a usable path in the local directory structure. To share files, install the samba server (sudo apt-get install samba) and then configure /etc/samba/smb.conf (or I think Ubuntu has a GUI tool under administration, or use SWAT, which is industry standard. I prefer hacking it by hand myself, but I have enough experience to do so)

I assumed he is using the server edition of Ubuntu, so no GUI tools. SWAT would probably be a good idea though. Personally, I prefer editing the smb.conf by hand, too.
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
I'm actually using the desktop version, so I have a gui. But this is just great. My IDE drives except my primary one don't show up anymore.

When I had the drives connected to the controller card, I could see and read all four of my NTFS IDE drives after I had installed NTFS-3G.

Because the system was locking, I unplugged all the drives from the controller card and plugged two of them to the mobo's IDE channels. They show up in Ubuntu's Disk Manager, but I can't access them at all. I have their access path set to /mnt , but when I open the folder the drives aren't there :(
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I have their access path set to /mnt

You have all of them set to mount on /mnt? Even if it did mount them only the last one would be visible, every filesystem needs it's own mount point and you have to mount them before they're visible.
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
Originally posted by: Nothinman
I have their access path set to /mnt

You have all of them set to mount on /mnt? Even if it did mount them only the last one would be visible, every filesystem needs it's own mount point and you have to mount them before they're visible.


Wait, why do I have to mount a drive that's physically connected to the system? Shouldn't it be readable from its own computer right from the get-go?

And I'm trying to change their access paths, but they keep changing back to / , all of them.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Wait, why do I have to mount a drive that's physically connected to the system?

Because that's how it works. Even Windows does it, the only difference is that it uses corny drive letters to represent them and does it without you asking.

Shouldn't it be readable from its own computer right from the get-go?

Yep, but you have to tell it what filesystem it is and where you want it to go. Take a look at /etc/fstab, that's the file with all of the defaut local mount points that you setup when you installed the system.

And I'm trying to change their access paths, but they keep changing back to / , all of them.

/ is the root of all filesytems, you can't mount anything over top of it. Well you might be able to, but very bad things would happen if it worked.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Wait, why do I have to mount a drive that's physically connected to the system? Shouldn't it be readable from its own computer right from the get-go?

There are a few reasons. A couple that stand out are:
Because depending on your environment mounting a partition or drive or share automaticly at boot up time 'just because it can' can be disaster. Sometimes it will wipe out the information on the drive. Mostly this is a concern in the 'enterprise' were it's typical to have shared storage, but it's much better to have administrator decide that sort of thing for themselves.

Also there may be backup partitions or partitions that are misdetected and you don't want those mounted.

Also the system has no way to know exactly were you want to mount them. They could be for /home directory or not.

also yiou could be using LVM and want stuff reserved for snapshots or mirrors.

etc etc. there are about a dozen other reasons.

And I'm trying to change their access paths, but they keep changing back to / , all of them.

Don't use Ubuntu's disk manager. I think that that is the likely problem.

Mount points are controlled by the /etc/fstab file. Edit that directly if you want the best results.

Post it if it's confusing. Read (or look over) the output 'man fstab' file.
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
Originally posted by: Nothinman

Shouldn't it be readable from its own computer right from the get-go?

Yep, but you have to tell it what filesystem it is and where you want it to go. Take a look at /etc/fstab, that's the file with all of the defaut local mount points that you setup when you installed the system.

And I'm trying to change their access paths, but they keep changing back to / , all of them.

/ is the root of all filesytems, you can't mount anything over top of it. Well you might be able to, but very bad things would happen if it worked.

How do I "tell it" what file system it is? The file system of the two drives is NTFS. Drive Manager sees and displays them as NTFS. Why would I have to tell it what file system it's using when it already seems to know?

Back when these drives worked on the IDE controller card, the access path was by default /tmp... how is trying to mount the drives in /mnt mounting "on top" of / ?
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
Here's my current fstab:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdc1 /mnt ntfs
0 0
/dev/hdd1 /mnt ntfs
0 0

The old fstab was just this:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
How do I "tell it" what file system it is? The file system of the two drives is NTFS. Drive Manager sees and displays them as NTFS. Why would I have to tell it what file system it's using when it already seems to know?

It's probably because the Drive manager program is unreliable. I don't know for certain, but I think it's a pretty accurate guess.

If you want to know for certain you have to mount it manually. After you mount it manually then you can record what you've done in the /etc/fstab file and make it persistant.

Keep in mind that ntfs is not a native file system for Linux. Using them is not easy or convient and it's not going to be reliable for reading and writing data to and from it.

Generally speaking your system should of automaticly setup mount points for your drives at /media/<name>
But I don't know about NTFS-3g.

NTFS-3d uses FUSE, which is file system in userspace which is different from how it is typically done in Linux. (which is due to legal and technical reasons with ntfs)

I know it's a bit confusing, Linux is a different world from Windows in many ways.
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
Oh geez the system just hard locked again. I guess it's not because of the IDE controller card. Or maybe it is and this time it's due to something else.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
How do I "tell it" what file system it is?

If it's going to be mounted all of the time in /etc/fstab, if it's a one time thing you can tell it in the mount command. If you don't tell it the kernel will try to figure it out on it's own but that doesn't work all the time as the filesystem modules have to be loaded before you attempt to mount.

Why would I have to tell it what file system it's using when it already seems to know?

There are a few way it can guess, but it's safer just to tell it.

Back when these drives worked on the IDE controller card, the access path was by default /tmp... how is trying to mount the drives in /mnt mounting "on top" of / ?

There's no way all of them were accessible via /tmp at the same time. Actually that's not true, but we'll ignore that corner-case for now. =)

And I didn't say mounting them at /mnt was trying to mount them over top of /, you said "but they keep changing back to / , all of them."

/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdc1 /mnt ntfs 0 0
/dev/hdd1 /mnt ntfs 0 0

So is /dev/hdc your cdrom or one of your hard disks?

And even if this did work and hdc was one of your hard disks with hdc1 being an NTFS partition on that disk, you'd never see it because /dev/hdd1 is mounted over top of it. Each filesytem needs to be mounted on it's own unique directory.

And on top of that you're missing the 'options' column in your two NTFS lines so it'll never mount automatically anyway.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Originally posted by: fuzzybabybunny
Here's my current fstab:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdc1 /mnt ntfs
0 0
/dev/hdd1 /mnt ntfs
0 0

The old fstab was just this:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0


Alright. The format of the file goes like this:

device---mount pount---filesystem---options---dump---pass


This looks incorrect:
/dev/hdc1 /mnt ntfs
0 0
/dev/hdd1 /mnt ntfs
0 0

First off make a backup of your /etc/fstab file. Just make a copy so if you edit it wrong you can copy back over the original and get back to were you started.


If you have NTFS-3g setup correctly. Then make 2 directories to mount your stuff at...
sudo mkdir /media/winC
sudo mkdir /media/winD
(or however you like to name them.)

Then try to replace the last two lines with something like this:
/dev/hdc1 /media/winC ntfs-3g defaults 0 0
/dev/hdd1 /media/winD ntfs-3g defaults 0 0

Then try to mount them and see if it works...
sudo mount /media/winC
sudo mount /media/winD

That way you can make sure everything works before going on to deal with permissions and such.

see if that works...
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
So is /dev/hdc your cdrom or one of your hard disks?

And even if this did work and hdc was one of your hard disks with hdc1 being an NTFS partition on that disk, you'd never see it because /dev/hdd1 is mounted over top of it. Each filesytem needs to be mounted on it's own unique directory.

And on top of that you're missing the 'options' column in your two NTFS lines so it'll never mount automatically anyway.

Oh ******. I didn't notice that /dev/hdc was already suppose to be your cdrom drive!!

That is definately wrong...

use:
sudo cfdisk /dev/hda
sudo cfdisk /dev/hdb
sudo cfdisk /dev/hdc
sudo cfdisk /dev/hdd

and such to find out definately what partitions are aviable on what device.... Just be sure to make _no_changes_ in cfdisk as that can have bad effects on your data.


edit:
also you can use hdparm to find out more information about your drives...

sudo hdparm -i /dev/hda

Also you can probably use
hal-device-manager
to view details on your deviecs if you want a GUI to do it. Just keep in mind that it's for viewing stuff only and you don't do changes with it like you do with windows.
 

silverpig

Lifer
Jul 29, 2001
27,703
12
81
Also a

dmesg | grep hd*

might tell you some information about your hard drives.

But yeah, most of your problems are coming from that very messed up fstab file.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Are you in X or on the console? If you're in X switch to a virtual console (alt+F1) and see if there's any messages printed when it locks.

use:
sudo cfdisk /dev/hda
sudo cfdisk /dev/hdb
sudo cfdisk /dev/hdc
sudo cfdisk /dev/hdd

Just 'fdisk -l' should be good enough, it'll print the partition tables for all disks it can find.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
My guess that it's probably hanging waiting for I/O. Linux will hang if it's waiting on disk activity.

comment out the
/dev/hdc1 /mnt ntfs
0 0
/dev/hdd1 /mnt ntfs
0 0

stuff in your /etc/fstab file. You just stick the # symbol at the beginning of the line. That causes those lines to be ignored by the system. And go ahead a reboot.

Just don't comment out anything important like your root directory. The system needs this file at boot time to mount stuff.

Otherwise if you don't want to reboot you may try to go:
sudo df
to see mounted file systems and umount your ntfs stuff.
umount /mnt/
or whatever else may be mounted.


But it may be easier at this junction to reboot and undo any weirdness...
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
Ok, this is what my new fstab looks like:


proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdd /mnt/wind ntfs-3g defaults 0 0

When I do

cfdisk /dev/hdc

I get FATAL ERROR: Bad primary partition 0: Partition ends after end-of-disk
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
My guess that it's probably hanging waiting for I/O. Linux will hang if it's waiting on disk activity.

He's saying that it's hanging several minutes after booting though so if it was fstab it would have hung whenever 'mount -a' is run in the boot scripts.

One possibility is just a bug in the AMD64 system, there's reports of systems hanging on the debian-amd64 list and AFAIK no one has found the root cause yet. I don't think he ever said whether he installed the 64-bit or 32-bit system.