I was wondering if anyone can tell me if it is possible to mount a drive (single partition) to a nested directory on an existing Samba mount point and have the entire structure considered one drive? The situation is this. I have a large drive mounted to a share called "/pub". This has been identified as my Samba mount point and all works as it should. What I would like to do is add a subdirectory to the drive mounted to the "/pub" share point and mount an additional drive to that. I would like to be able to have this second drive treated as an extention of the original disk, under Samba. This would mean that the capacity of the second drive would be pooled with the first drive, on which it is mounted. For example: I have a 200GB hard drive mounted to the directory "/pub". I would like to add an additional 60GB drive to this. Can I create a directory on the 200GB drive called "/pub/temp" and mount the 60GB drive to that mount point? Then be able to have Samba consider the whole mess as a single 260GB drive? I have already tried this (with my limited knowledge) and all that seems to happen is that the Samba identifed disk capacity size remains at the 200GB mark. The additional 60GB isn't recognized. Would this be possible, or am I blowing smoke out my lower orifice? If it is possible, how would I do this? Is there any documentation that would explain something like this somewhere? What would this be called if I were to look for it (I haven't the slightest idea how to start searching for such a thing)? Thanks to all in advance. Carter Campbell Calgary Alberta Canada
On 11/13/05, Carter Campbell <carter@soph-text.com> wrote:> I was wondering if anyone can tell me if it is possible to mount a drive > (single partition) to a nested directory on an existing Samba mount > point and have the entire structure considered one drive? > > The situation is this. I have a large drive mounted to a share called > "/pub". This has been identified as my Samba mount point and all works > as it should. What I would like to do is add a subdirectory to the > drive mounted to the "/pub" share point and mount an additional drive to > that. I would like to be able to have this second drive treated as an > extention of the original disk, under Samba. This would mean that the > capacity of the second drive would be pooled with the first drive, on > which it is mounted. > > For example: > I have a 200GB hard drive mounted to the directory "/pub". I would like > to add an additional 60GB drive to this. Can I create a directory on > the 200GB drive called "/pub/temp" and mount the 60GB drive to that > mount point? Then be able to have Samba consider the whole mess as a > single 260GB drive? > > I have already tried this (with my limited knowledge) and all that seems > to happen is that the Samba identifed disk capacity size remains at the > 200GB mark. The additional 60GB isn't recognized. > > Would this be possible, or am I blowing smoke out my lower orifice? If > it is possible, how would I do this? Is there any documentation that > would explain something like this somewhere? What would this be called > if I were to look for it (I haven't the slightest idea how to start > searching for such a thing)? > > Thanks to all in advance. > > Carter Campbell > Calgary Alberta > Canada > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/listinfo/samba >I don't think this is so much a samba thing as an os thing. samba doesn't export filesystems like nfs, it just exports directories which may be a singular filesystem, or contain multiple filesystems. Samba really doesn't care, just so long as it can access them. back to the 'os thing'. With linux, you can mount a filesystem on a directory that isn't empty. The underlying files are just hidden while the second fs is mounted. Unmount the second fs, and the directory still contains it's old files. as you described above, what you will end up with is being able to store 200gigs of data in /pub EXCEPT for anything in /pub/temp, which will be limited to 60gigs. Two different filesystems. What you want is not the job of samba. you want a logical volume management system. An lvms will allow you to grow/shink filesystems on the fly, append drives to give more space, etc. It's very cool. For linux, there is lvm2 and evms. Evms is a bit, well, it's totally invasive to your system and kernel, so look into lvm2. lvm2 is quite nice and not too difficult to get the hang of. Also make sure your filesystem can support the operations you want (ie. reiser3 will grow and shrink while in use, xfs is grow only, not sure about ext2/3, jfs - does anyone use it at all???). i would play around with lvm2 to get the hang of it first, maybe under vmware or qemu, as you are bound to hose something the first time through. ;-) -- Noah Dain
On 11/13/05, Carter Campbell <carter@soph-text.com> wrote:> Hi Noah; > > Thanks for the fast response. Actually, your response pointed to an inaccuracy in my original mail. Originally, I said: > > CC> > I have a 200GB hard drive mounted to the directory "/pub". I would like > CC> > to add an additional 60GB drive to this. Can I create a directory on > CC> > the 200GB drive called "/pub/temp" and mount the 60GB drive to that > CC> > mount point? Then be able to have Samba consider the whole mess as a > CC> > single 260GB drive? > > ND> you want a logical volume management system. An lvms will allow you > ND> to grow/shink filesystems on the fly, append drives to give more > ND> space, etc. It's very cool. > > What I meant to say is that I would like to create a directory, say "/tmp" on the 200GB drive and mount the 60GB drive to that and have the aggregate volume presented by Samba as a 260GB. By this, I meant that I would have the 200GB drive mounted to the empty directory "/pub" and then the 60GB drive would be mounted to an empty directory, say "/tmp" located on the 200GB drive. This would then be presented as a 260GB drive to the user. Is this possible just my tuning something in linux, or would you still recommend using lvm2?that won't work either. You still have two distinct filesystems, and samba just provides the network interface to them. Samba doesn't keep track of where to store files with respect to filesystem size. Say, for instance, that the 200gig unit was filling up, samba won't try to start writing new files to the 60gig drive to avoid running out of room. You're still back to lvm again if you want one large storage space. no matter where you mount a drive, it's being mounted somewhere in the virtual filesystem 'space', and not within an actual filesystem (here, the 200gig drive's fs).> > I think I will play with it anyway, just to play. > > Again, thanks for all your help. > > Carter > > Carter Campbell > Calgary Alberta > Canada > > > > > > > > >-- Noah Dain
On Sun, 2005-11-13 at 11:23 -0700, Carter Campbell wrote:> I was wondering if anyone can tell me if it is possible to mount a drive > (single partition) to a nested directory on an existing Samba mount > point and have the entire structure considered one drive? > > The situation is this. I have a large drive mounted to a share called > "/pub". This has been identified as my Samba mount point and all works > as it should. What I would like to do is add a subdirectory to the > drive mounted to the "/pub" share point and mount an additional drive to > that. I would like to be able to have this second drive treated as an > extention of the original disk, under Samba. This would mean that the > capacity of the second drive would be pooled with the first drive, on > which it is mounted. > > For example: > I have a 200GB hard drive mounted to the directory "/pub". I would like > to add an additional 60GB drive to this. Can I create a directory on > the 200GB drive called "/pub/temp" and mount the 60GB drive to that > mount point? Then be able to have Samba consider the whole mess as a > single 260GB drive? > > I have already tried this (with my limited knowledge) and all that seems > to happen is that the Samba identifed disk capacity size remains at the > 200GB mark. The additional 60GB isn't recognized. > > Would this be possible, or am I blowing smoke out my lower orifice? If > it is possible, how would I do this? Is there any documentation that > would explain something like this somewhere? What would this be called > if I were to look for it (I haven't the slightest idea how to start > searching for such a thing)? > > Thanks to all in advance. > > Carter Campbell > Calgary Alberta > Canadashort answer: yes it will work fine. longer answer: 200GB disk must be mounted before you can mount the 60GB disk. samba might mis-report size, but so what? does df -h show that the combined total is 260GB? lvm or evms would be a better way, but that would require quite a bit of work since the disks are already up and have data. -C