PDA

View Full Version : Can't share primary hard drive.



Keithj
06-18-2005, 09:31 PM
Flushed with the delight of having got a Linux machine to share its hard drives with my network (after about 18 months of trying, off and on) I didn't notice at first that one drive was not appearing in the Windows machines' links to the Linux box.

I have three hard drives on this machine, one of them partitioned into two, hence hda1, hdb1, hdb2, and hdc5. I don't know why the machine decided to call drive C hdc5, but no matter.

The Knoppix 3.8.x system and all the operating stuff is installed on hdb2, which uses the Reiserfs file system (or so it reports). hdb2 will not allow access from the network - the other drives will. The very existence of hdb2 is hidden from the network.

The only difference I can see, at first glance, is that Konqueror shows the other drives as "/mnt/<drivename>", whereas hdb2 is just "/"

Any suggestions, anyone? There's a lot of stuff on hdb2 that I'd like to be able to access from the network. The relevant folders on hdb2 are set to share.

Harry Kuhman
06-18-2005, 11:47 PM
hence hda1, hdb1, hdb2, and hdc5. I don't know why the machine decided to call drive C hdc5, but no matter.
Not quite sure what is going on with your system, but here's a little info that might help: hda is, of course, the first hard drive, hdb the second and hdc the 3rd (all on IDE type interfaces) hda1 is the "first" partition on the first drive. First is a hard thing to define here, since not even all MS OSs look at the partition table in the same order, so what is the first partition to one OS might be the second or fourth to a different MS OS. But as to your hdc5, this is easy to understand. A disk can only have 4 "real" partition on it (a limititation of the size of the partition table). To get around this extended partitions and logical drives in extended partitions were invented. Linux uses hda1, hda2, hda3 hda4 for the physical partiitions on the first drive. The first logical partition on an extended partition on the first drive would be hda5. So in the case of hdc5 I can assume that this disk has an extended partition on it with a logical drive defined on it. It seems that there is no "primary" partition on this disk. Windows generally doesn't let you partition a disk this way, but other third party tools do. Or you can create the primary partition and then create the extended partition and later remove the primary partition (unfortunately, the space for it is"lost"), or you could just make a primary partition and then create an extended partition and never format the primary partition (Windows would still waste a drive letter on the unformatted primary prtition that way though). So you somehow managed to get on a logical drive on that disk but no formatted primary partition (which would have shown up as hdc1).

I'm very confused where the partitions were made and what is and isn't showing up where. But a common rule for MS systems is that you only create one primary partition and put all of the remaining space into logical drives on an extended partition, even though the partition table would imply that you can have 4 real partitions. Since your hdb1 and hdb2 imply that you have 2 real primary partitions on one hard disk, it might be that some windows systems are seeing only hdb1 and refusing to believe that hdb2 exists, although if they are seeing this across a network I'm hard pressed to understand why or how they can draw the distinction.

Keithj
06-19-2005, 12:46 AM
Thanks for that - it makes sense when you look at it that way!

The process of formulating my question above set me to thinking, and I solved the problem. hdb2 being the "boot" drive, its address isn't /mnt/hdb2 - it's just /. So I checked in smb.conf, and sure enough / wasn't there as a drive to share on the network. I edited /mnt/hdb2 to say / and all was well. It was as easy as that.

Then a new problem showed up - hda1 and hdb1, which had previous been shared across the network just fine, showed in the network but refused access. Both had miraculously changed ownership from users:users to root:root. Chown refused to change them back, but a little tinkering eventually got it to see things my way. Some faults, like that one, appear for a while, then disappear for no apparent reason.