> On Friday 23 March 2007 08:58, Robert Nelson wrote:
>>
>> > -----Original Message-----
>> > From: Erich Prinz [mailto:[EMAIL PROTECTED]
>> > Sent: Thursday, March 22, 2007 10:15 AM
>> > To: Josh Fisher
>> > Cc: bacula-users@lists.sourceforge.net (E-mail); Robert Nelson
>> > Subject: Re: [Bacula-users] Removable disk HOWTO?
>> >
>> >
>> > On Mar 22, 2007, at 11:55 AM, Josh Fisher wrote:
>> >
>> > >
>> > > Erich Prinz wrote:
>> > >> True, drives are assigned the next available drive letter.
>> > >>
>> > >> In many of the simple deployments I have, it is a simple two disk
>> > >> rotation. The USB drives always get the same drive mapping - which
>> > >> can easily get thrown out of whack with the introduction of another
>> > >> device by an end user. Hence why servers run headless and locked
>> away
>> > >> in closets.
>> > >>
>> > >> Just thinking out loud, but Is it possible to use UNC versus drive
>> > >> mappings?
>> > >>
>> > >>
>> > >
>> > > The win32 Bacula SD probably uses fopen() and so would support UNC
>> > > paths. But I don't know if it is possible to symlink to a UNC path,
>> > > so I
>> > > don't know if UNC paths would work using the approach vchanger
>> takes.
>> > > Also, that would not affect how USB drives are handled.
>> >
>> >            Hmmm.... isn't this the mechanism drive mapping uses
>> > essentially a
>> > symlink?
>> >
>>
>> UNC Paths are a network concept and don't apply to local disks unless
>> they
>> have been shared and are accessed through the redirector.  Unless you
>> are
>> referring to names like \\??\C:\filename.ext, which look sort of like
>> UNC
>> paths but aren't.  They still require a drive letter.
>>
>> Drive letters are just NT object manager symlinks (not the same as NTFS
>> filesystem symlinks) to the device objects exposed by the disk device
>> drivers.  Similarly all WIN32 "devices" are just NT object manager
>> symlinks
>> to various device objects exposed by NT drivers.
>>
>> It should be possible to create a link between the USB disk device
>> object
>> and a name that is accessible to WIN32 applications using a path such as
>> \\.\DriveName\filename.exe.  I haven't tried this and I'm not sure that
>> the
>> "c" runtime apis such as fopen() and open() wouldn't get confused.
>>

Looking into MSDN at http://msdn2.microsoft.com/en-us/library/aa365733.aspx,
it appears it is possible to remove the drive letter assignment
altogether. This is done by first adding the mountpoint, then assigning
the drive letter to nothing. At least this is true for fixed disk drive
volumes. Since the mapping is by GUID of the volume, it might also work
for USB drive partitions. Very similar to a hard link. So it might be
possible to create  C:\dev\usb0, C:\dev\usb1, etc. and make them the
mountpoints for the USB drives. If I understand correctly, these mappings
are permanent and could be done in Disk Manager. Another "feature" is that
any attempt to access those directories with normal file operations when
thier corresponding drive is not plugged in will result in a Access Denied
error, so it would be easy to determine which USB drive was plugged in.

Also, as far as I can tell, this is below the filesystem layer, so should
be transparent to C file i/o functions.

>> > >
>> > > Perhaps the best approach would be to force the use of a Windows 2k
>> or
>> > > greater NTFS filesystem on the USB drives to be used. Then it would
>> be
>> > > possible to mount the USB drive partition at a "reparse point" on
>> the
>> > > directory tree of a fixed disk NTFS volume, rather than assigning it
>> a
>> > > drive letter at all. A NTFS reparse point is essentially what the
>> rest
>> > > of the world calls a mountpoint. The difference is that in *nix any
>> > > drive partition can be mounted at a given mountpoint, so we can
>> > > have all
>> > > of the drives associated with a virtual changer always be mounted
>> > > at the
>> > > same mountpoint and they don't even have to use the same
>> > > filesystem. I'm
>> > > not so sure how Windows determines which USB drive partitions get
>> > > mounted at a particular reparse point, so I'm not sure if it is
>> > > possible
>> > > to have one reparse point at which all associated USB drives will
>> get
>> > > mounted.
>> >
>> >            I don't know either.
>> >
>>
>> Reparse points are more than mount points.  They are also used to
>> implement
>> symlinks, Distributed File System, Remote Storage Server, and numerous
>> other
>> things where you need a file system object to contain meta data which
>> represents something else.
>>
>> In theory it shouldn't matter what fs is the target of a reparse point,
>> although the NTFS filesystem might enforce that it is NTFS so that
>> applications aren't confused by the filesystem characteristics changing
>> in
>> the middle of the file tree.  But I don't think this is case.  The only
>> restriction I know of is that the filesystem that contains the reparse
>> point
>> must support them (kind of obvious :-)

Yes. Apparently the reparse point itself must be defined on a NTFS
volume's directory tree, but the volume mounted at the reparse point can
be any filesystem for which there is a driver. The MSDN docs specifically
say NTFS, FAT32, FAT16, and even ISO9660.

>>
>> The trick is preventing the mount manager from assigning a drive letter.
>>  It
>> uses information in the registry to specify which volume devices are
>> allocated drive letters and which ones should be mounted on a mount
>> point.
>> I'm not sure if it is valid to have multiple volumes map to the same
>> mount
>> point.
>>
>> It should be possible to create a utility that creates the appropriate
>> information so that the mount manager will mount the device
>> automatically on
>> the mount point.  But you would have to connect the USB device and then
>> run
>> the utility.
>>
>> I'll see if I can whip something up tomorrow.

It may be possible using Window's Disk Manager.

>
> We might also be able to facilatate this in the SD by coming up with some
> sort
> of "dynamic" Archive Device assignment that would be done at runtime
> rather
> than statically from the conf file.  E.g.
>
>   Archive Device = "|script.bat"
>
> could read the name of the archive device by executing "script.bat".  Just
> an
> idea, I'm not sure if this would help, or if it would be that easy in
> Bacula
> or not ...

Yes, that would work if it is feasible for the SD. It may not be
necessary, though. It appears likely that USB drive partitions can be
mounted at a mountpoint in a NTFS directory tree. I have not tried it yet
with USB drives, but it is documented to work with fixed disks. The
question is whether or not it is possible to symlink to a file in the
filesystem mounted at the reparse point. If so, then perhaps we can use
the same method used in Linux, creating symlinks to the bacula volume file
on the USB drive partition's filesystem, and then configuring SD to use
the symlinks (one symlink per virtual drive).

>
>>
>> >
>> > > I am certain that the FAT32 filesystem could not be used
>> > > without drive letters.
>> >
>>
>> I'm not so sure about that.

You're right. And it only makes sense now that I think of it. Drive letter
assignment should have nothing to do with filesystem type.

>>
>> >            Most USB drives ship with FAT32, however, it carries a 2GB
>> > limit on
>> > file size and that fact can cause issues.
>> >
>> >            IMO on the WIN side of the world, NTFS would be the only
>> > format to
>> > use for more reasons than just the above.
>> >
>> > > However, reparse points would eliminate the drive
>> > > letter assignment problems and at least allow defining one reparse
>> > > point
>> > > per drive.
>> >
>> >
>> >            Robert Nelson would be an excellent resource on this
>> question.
>> > I've
>> > cc'd him too.
>> >
>> >
>> > >
>> > >> Erich
>> > >>
>> > >> On Mar 21, 2007, at 2:10 PM, Josh Fisher wrote:
>> > >>
>> > >>
>> > >>> Erich Prinz wrote:
>> > >>>
>> > >>>> Any chance of a Wintel version becoming available?
>> > >>>>
>> > >>>>
>> > >>>>
>> > >>>>
>> > >>> In Windows, drives are mounted by drive letter. It is possible to
>> > >>> mount
>> > >>> a particular USB drive at a particular drive letter and make that
>> > >>> mapping permanent. However, as far as I know, it is not possible
>> to
>> > >>> force multiple USB drives to be assigned the same drive letter. If
>> > >>> I am
>> > >>> wrong, and it is possible to permanently assign the same drive
>> > >>> letter to
>> > >>> more than one drive, then a win32 version would not be too hard.
>> > >>>
>> > >>> Another way might be to assign drives to virtual changers by drive
>> > >>> letter, where each drive letter would map to a particular
>> > >>> magazine and
>> > >>> the drive letters are reserved for those drives. That seems
>> > >>> feasible,
>> > >>> and I will investigate it.
>> > >>>
>> > >>>
>> > >>>
>> > >>>> On Mar 20, 2007, at 2:04 PM, Josh Fisher wrote:
>> > >>>>
>> > >>>>
>> > >>>>
>> > >>>>> The latest version is 0.7.4 and was posted to the bacula-users
>> > >>>>> list
>> > >>>>> 2006-12-12. It currently isn't  hosted anywhere that I know of,
>> > >>>>> and I don't think attachments are kept in the archives,  so
>> > >>>>> here it
>> > >>>>> is again. Perhaps I should find somewhere to host it.
>> > >>>>>
>> > >>>>> I don't know if anyone else is using this method for USB drives,
>> > >>>>> but I can say that I have been using it with bacula 2.0.x for
>> > >>>>> several months without any problems.
>> > >>>>>
>> > >>>>> --- Josh Fisher
>> > >>>>>
>> > >>>>> Hristo Benev wrote:
>> > >>>>>
>> > >>>>>
>> > >>>>>> Hi,
>> > >>>>>>
>> > >>>>>> what is latest version of removable disk howto and where it
>> could
>> > >>>>>> be accessed?
>> > >>>>>>
>> > >>>>>> Thanks
>> > >>>>>>
>> > >>>>>> Hristo Benev
>> > >>>>>>
>
> ..
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
>


-- 
Josh Fisher <[EMAIL PROTECTED]>
Provectus Pharmaceuticals




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to