Re: Mount directories of unmounted disks/partitions
On Thu, Jan 15, 2009 at 10:46:35PM +0100, Jon Sj?stedt wrote: 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). so: - you have a device, /dev/wd0d. - on /dev/wd0d there does exist a filesystem. - in that filesystem is a directory called 'dataa'. - 'dataa' is a directory - 'dataa' contains files of image/photo/movie/music etc - you want to mount that 'dataa' dir at /stuff/data1 - you want to be able to do that without /dev/wd0d mounted ? -- jared
Re: Mount directories of unmounted disks/partitions
Hello all patient! Another clarification attempt :) I have a drive. Lets call it wd0. It has one partition wd0d that fills up the whole drive. The root of wd0d has three directories (and no other files) music, pictures and others. wd0d is mounted at /bananas The music directory of wd0d grows and suddenly needs more space than available on wd0. I add a new drive wd1 and create wd1d with all available space. I copy everything in wd0d/music to wd1d. I still want the same structure as before, but i dont want to mount wd1d in a directory that is inside wd0d. If mount would accept something like mount /bananas/pictures /dev/wd0d/pictures mount /bananas/others /dev/wd0d/others mount /bananas/music /dev/wd1d my problem would be solved. 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 The d00...@dtek.chalmers.se email address will eventually be abandoned during 2009. Please use addresses below instead Jon Sjvstedt _O_ Godvddersgatan 52 /(|)\ 418 38 GVTEBORG | H | -OOO-[-+X+-]-OOO- Hem 075 - 242 80 04( ) Mobil 0735 - 029 557 _| |_ jonsjost...@gmail.com jonsjost...@hotmail.com
Re: Mount directories of unmounted disks/partitions
On Fri, Jan 16, 2009 at 11:10:23AM +0100, Jon Sj?stedt wrote: Hello all patient! Another clarification attempt :) I have a drive. Lets call it wd0. It has one partition wd0d that fills up the whole drive. The root of wd0d has three directories (and no other files) music, pictures and others. wd0d is mounted at /bananas The music directory of wd0d grows and suddenly needs more space than available on wd0. I add a new drive wd1 and create wd1d with all available space. I copy everything in wd0d/music to wd1d. I still want the same structure as before, but i dont want to mount wd1d in a directory that is inside wd0d. Why not? I never had any problems with it. If mount would accept something like mount /bananas/pictures /dev/wd0d/pictures mount /bananas/others /dev/wd0d/others mount /bananas/music /dev/wd1d my problem would be solved. mount /dev/wd0d /bananas mount /dev/wd1d /bananas/music that would be my solution. What's so bad about not mounting under root that you don't want it? If you want everything to be mounted under the root: mount /dev/wd0d /bananas mount /dev/wd0d /bananas_music ln -s /bananas_music /banasas/music The symlink is unacceptable to you, it seems, because of nfs and smb exports. The other option I mentioned, using ccd and growfs, seems to be very well suited for you. But I'm repeating myself. Ariane
Re: Mount directories of unmounted disks/partitions
Why do You not use links? 1. mkdir /mnt/wd0 /mnt/wd1 2. mount /dev/wd0d /mnt/wd0 3. mount /dev/wd1d /mnt/wd1 4. cd /bananas 5. ln -s /mnt/wd0/* . 6. ln -s /mnt/wd1/* . Regards Uwe Hello all patient! Another clarification attempt :) I have a drive. Lets call it wd0. It has one partition wd0d that fills up the whole drive. The root of wd0d has three directories (and no other files) music, pictures and others. wd0d is mounted at /bananas The music directory of wd0d grows and suddenly needs more space than available on wd0. I add a new drive wd1 and create wd1d with all available space. I copy everything in wd0d/music to wd1d. I still want the same structure as before, but i dont want to mount wd1d in a directory that is inside wd0d. If mount would accept something like mount /bananas/ /pictures mount /bananas/others /dev/wd0d/others mount /bananas/music /dev/wd1d my problem would be solved. 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 The d00...@dtek.chalmers.se email address will eventually be abandoned during 2009. Please use addresses below instead Jon Sjvstedt _O_ Godvddersgatan 52 /(|)\ 418 38 GVTEBORG | H | -OOO-[-+X+-]-OOO- Hem 075 - 242 80 04( ) Mobil 0735 - 029 557 _| |_ jonsjost...@gmail.com jonsjost...@hotmail.com
Re: Mount directories of unmounted disks/partitions
How do you think file systems are mounted on top of / ? On 2009 Jan 16 (Fri) at 11:10:23 +0100 (+0100), Jon Sjvstedt wrote: :I still want the same structure as before, but i dont want to mount wd1d :in a directory that is inside wd0d. -- Never call a man a fool. Borrow from him.
Re: Mount directories of unmounted disks/partitions
If you wish to contribute there are clarifications for my somewhat unclear initial post. If you have not seen them, read the digest. How do you think file systems are mounted on top of / ? On 2009 Jan 16 (Fri) at 11:10:23 +0100 (+0100), Jon Sjvstedt wrote: :I still want the same structure as before, but i dont want to mount wd1d :in a directory that is inside wd0d. -- Never call a man a fool. Borrow from him. The d00...@dtek.chalmers.se email address will eventually be abandoned during 2009. Please use addresses below instead Jon Sjvstedt _O_ Godvddersgatan 52 /(|)\ 418 38 GVTEBORG | H | -OOO-[-+X+-]-OOO- Hem 075 - 242 80 04( ) Mobil 0735 - 029 557 _| |_ jonsjost...@gmail.com jonsjost...@hotmail.com
Re: Mount directories of unmounted disks/partitions
On Fri, Jan 16, 2009 at 5:10 AM, Jon Sjvstedt d00...@dtek.chalmers.se wrote: I still want the same structure as before, but i dont want to mount wd1d in a directory that is inside wd0d. If mount would accept something like mount /bananas/pictures /dev/wd0d/pictures mount /bananas/others /dev/wd0d/others mount /bananas/music /dev/wd1d my problem would be solved. mount can't do that. the only solution is to decide that your problem is not really a problem and just mount things normally.
Re: Mount directories of unmounted disks/partitions
On Thu, Jan 15, 2009 at 04:30:09PM +0100, Jon Sj?stedt wrote: 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 I'd use fstab to mount disks, I'm not sure if I understand your question correctly though. 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. A combination of ccd and growfs may do the trick there. If you use the serially concatenated option, you may be able to add subsequent disks (not sure though, never tried it). Can this be done in a neat way? I only want to mount disks on the root partition Symlinks often work, although they may fail if your filesystem is exported with nfs or samba and the link points to an area outside the exported area. Ariane
Re: Mount directories of unmounted disks/partitions
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. The d00...@dtek.chalmers.se email address will eventually be abandoned during 2009. Please use addresses below instead jonsjost...@gmail.com jonsjost...@hotmail.com fbscarel The d00...@dtek.chalmers.se email address will eventually be abandoned during 2009. Please use addresses below instead jonsjost...@gmail.com jonsjost...@hotmail.com
Re: Mount directories of unmounted disks/partitions
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