On 16/01/2009, at 10:46 AM, Jon Sjvstedt wrote:

Hello,

On Thu, Jan 15, 2009 at 1:30 PM, Jon Sjvstedt
<d00...@dtek.chalmers.se>
wrote:

Hello all!
I have an issue with mount. The problem  is that i would like to
create
a
directory with subdirs. On the subdirs I would mount directories of
not
yet mounted disks. Example

mount /stuff/data1 /wd0d/dataa
mount /stuff/data2 /wd0d/datab
mount /stuff/data3 /wd1d
mount /stuff/data4 /wd2d/datad
mount /stuff/data5 /wd2d/datae


Syntax of your mount commands is a bit strange... according to
mount(8) the first argument should be a 'special' device, like
/dev/wd0a, not a regular directory.
Clarification attempt: I know that mount wants a device like /dev/wd0d,
but my example was an atempt to explain what I want to archive. I want
a
mounting point in the root file system to be mounted with a directory
found inside a device that is not yet mounted. I also want this
transparent to samba and NFS (I'll use both).

It would be perfectly ok to use more programs than mount to solve this


I want to do this because datax are all growing fast (it is my music
and
photos). Eventually dataa and datab will need their own disks.

Can this be done in a neat way? I only want to mount disks on the
root
partition


If each datax directory has it's own partition it's perfectly
possible.
The thing is that I want these mounted directories to share a disk (or
partition) until they both cant fit. Then, the biggest one have to move
away. If my ideas get to work, I only have to change the device of the
mounting, not the mounting point.

However, it seems to me that (from your example above) 'dataa' and
'datab' are on the same partition, and, from mount(8): "For disk
partitions, the special device must correspond to a partition
registered in the disklabel(5).", so no deal.


I'm still not understanding what you want or what the problem is. This
appears to me to be a perfectly ordinary mounting situation.

If you have a bunch of dirs, data[1-2], as subdirectories of /stuff,
then you can put whatever you want in these. Then, at some point you
can mount a different volume on any of these and the path will remain
as /stuff/datax. If you wish to then change the mounted volume, just
change your fstab or mount command as appropriate.
This will work with samba and nfs, as long as your smb.conf and exports
are set up correctly, and is a perfectly ordinary situation, as I said.

I'm confused by:
I want a mounting point in the root file system to be mounted with a
directory
found inside a device that is not yet mounted.

Do you want to hierarchically mount filesystems? This seems very odd.

Have I somehow misunderstood?


paulm

Reply via email to