(OTish) Creating a persistent share on an external HD

Discussion in 'Acronis True Image Product Line' started by noisyjazzman, May 19, 2005.

Thread Status:
Not open for further replies.
  1. noisyjazzman

    noisyjazzman Registered Member

    Joined:
    May 19, 2005
    Posts:
    29
    I create all my acronis images on an external (firewire) drive on a machine on my home network, which I access via an smb share. As the shared dir is on an external drive, unfortunately it's not persistent between reboots.

    Is there a way of either (a) recreating the share automatically when the external HD is switched on, or (b) changing the machine policy (it's a Windows XP box) so that it does create a default ($) share on the external drive?
     
  2. MiniMax

    MiniMax Registered Member

    Joined:
    Mar 17, 2005
    Posts:
    566
    You could try scheduling a little CMD-file that uses NET SHARE:
    Code:
    > net share /?
    The syntax of this command is:
    
    
    NET SHARE sharename
              sharename=drive:path [/USERS:number | /UNLIMITED]
                                   [/REMARK:"text"]
                                   [/CACHE:Manual | Automatic | No ]
              sharename [/USERS:number | /UNLIMITED]
                        [/REMARK:"text"]
                        [/CACHE:Manual | Automatic | No ]
              {sharename | devicename | drive:path} /DELETE
     
  3. noisyjazzman

    noisyjazzman Registered Member

    Joined:
    May 19, 2005
    Posts:
    29
    Thanks for that suggestion. Do you (or anyone else) know if there is a way of automatically triggering such a script when the external HD is mounted?
     
  4. noisyjazzman

    noisyjazzman Registered Member

    Joined:
    May 19, 2005
    Posts:
    29
    I have tried btw to create an autorun.inf on the external HD, with an OPEN line that points to a script that does the NET SHARE stuff. But the autorun.inf isn't triggered when the firewire drive is mounted.

    Is there a registry key or other config step needed to enable autorun for the external drive?
     
  5. noisyjazzman

    noisyjazzman Registered Member

    Joined:
    May 19, 2005
    Posts:
    29
    OK I'm having a bit of a conversation with myself here, but I'll continue as I still don't quite have this licked :(

    Using TweakUI I've managed to get the autorun triggered. But because this is changing a currentuser part of the registry, it only works if I am logged in.

    Does anyone know if it is possible to automatically run a script when an external hard drive is mounted, when no-one is logged in?
     
  6. TonioRoffo

    TonioRoffo Registered Member

    Joined:
    Apr 23, 2005
    Posts:
    237
    I've not tested this, and it might or might not work, but try the following:

    On an XP box, you can mount a drive under a subdirectory instead of as a drive letter, so try this:

    * Make a subdir on your (fixed) C drive ex. C:\Backup

    * Open Computer Management (right-click my computer, choose manage) choose disk management

    * Right click the USB drive in disk management, and choose "change drive letter/path" (or something like that, i'm on a dutch windows version)

    * Remove the drive letter, choose ok

    * "change drive letter/path" on the same partition/usb drive again, choose add

    * choose "link this partition to an empty map" (loose translation again) - choose c:\Backup

    * Now when you go to C:\backup, you are actually on the USB drive.

    * Share the "fixed" C:\backup map

    I didn't try it, so i'm not sure it will work once you remove the drive. second, when you clone drive C now, i'm not sure it will include drive X

    Please feedback if this works for you!

    PS. If it doesn't work, try making a subdir C:\Backup, and under that another directory LINK - mount the drive on link, share C:\BACKUP !!
     
  7. noisyjazzman

    noisyjazzman Registered Member

    Joined:
    May 19, 2005
    Posts:
    29
    What a great idea. I knew you could mount a drive under an NTFS folder, but didn't think of it in this context.

    And, yes, it worked! I have my external drive mounted under c:\store, and have shared c:\store. The share stays there between reboots, whether the external drive is on or not, because of course when the HD is off, the share location still exists (as an empty folder).

    Thanks again.
     
  8. TonioRoffo

    TonioRoffo Registered Member

    Joined:
    Apr 23, 2005
    Posts:
    237
    you're welcome!

    If you ever would backup the C drive with Acronis, please tell me if it includes the mapped partition as well?

    Thanks.
     
  9. noisyjazzman

    noisyjazzman Registered Member

    Joined:
    May 19, 2005
    Posts:
    29
    I backed up the C: drive this morning, and the results look good. After backing up, I mounted the image (using 'explore image' in acronis) to Z:, and, sure enough, in Explorer the new Z: drive does contain the link to the external HD.

    In a cmd prompt, a 'dir' of z: shows exactly the same as a dir of c:. That is, the folder that links to the external drive is shown as a <JUNCTION>. I expected this, as mounting an external drive in a folder is a filesystem (ntfs) facility, and the image file is just a copy of the ntfs partition (I presume).

    For a 100% test of this, I'd need to restore the C: drive, but it looks pretty likely that it would work fine.
     
  10. TonioRoffo

    TonioRoffo Registered Member

    Joined:
    Apr 23, 2005
    Posts:
    237
    If it's a junction, then the external drive is not included in the image - only the "shortcut" to the USB drive, if you can call it that way.

    Thanks for letting me know!
     
  11. noisyjazzman

    noisyjazzman Registered Member

    Joined:
    May 19, 2005
    Posts:
    29
    Which is what I want, or I'd end up backing up my backups ;)
    No problem.
     
Thread Status:
Not open for further replies.