Can I Extend directory when not enough space on HDD.


  1. Posts : 11,246
    Windows / Linux : Arch Linux
       #1

    Can I Extend directory when not enough space on HDD.


    Hi there

    I'm sure there's a way of doing this in Windows - perhaps symbolic links or whatever but I've totally forgotten how to do it or if it's even possible.

    In Linux say I've only 5 GB left in the / directory ( the main / is the root directory top level) and need to create a 50 GB directory say /database which must be on the root directory. The application needs it to be on the root directory (/) -- don't ask me why -- I didn't write the application !!!!!

    I can easily do this by creating the directory say on my /home/data directory and then using a BIND mount .

    So I create an entry /database in the root and one in the home directory which has oodles of space on it /home/jim/data/database. This home directory can also be on a totally different HDD as well. Then link the 2 with the mount bind command

    mount --bind /database /home/jim/data/database. (effectively mount --bind /olddir /newddir).

    Then everything the system needs to read / write to /database gets read / written to /home/jim/data/database

    Saves messing about and re-creating the system when just testing a largish database type application.

    Is there a similar system in Windows -- I don't want to keep creating new VM's for this type of stuff when it's essentially 1-off testing.

    Thanks to any Windows gurus out there who can suggest a decent solution.


    Cheers
    jimbo
      My Computer


  2. Posts : 668
    Win 10 pro
       #2

    Hi Jimbo

    maybe I can help (not a windows guru or a guru but faced similar problems)
    but it's not clear what you are trying to do, is windows in a virtual machine?
    if not you may use "disk managment" to extend the disk and do other management
    stuff ...
      My Computer


  3. Posts : 668
    Win 10 pro
       #3

    another idea, if windows is a kvm virtual machine
    you can resize the disk image:

    man qemu-img

    resize
      My Computer


  4. Posts : 11,246
    Windows / Linux : Arch Linux
    Thread Starter
       #4

    roy111 said:
    Hi Jimbo

    maybe I can help (not a windows guru or a guru but faced similar problems)
    but it's not clear what you are trying to do, is windows in a virtual machine?
    if not you may use "disk managment" to extend the disk and do other management
    stuff ...
    Hi there
    the problem is that the HDD is nearly full so can't be extended --if it were a VM it is easy enough to do - but the BIND type of idea seems the best as once I've done the testing I could just delete the DB file, and when I want a new one / test just re-bind to any other HDD and away I go again on the same machine !!!

    I did think of kvm but I'm on a REAL machine at the moment -- re-installing Windows again is a pain as I would then need to re-jig a whole slew of HDD's -- a lot of effort for minimal pain.

    I might though run a Windows VM on a Linux host --that would get round the problem - but doing intensive DB tests where you need to get access to physical reads, writes and HDD performance a VM isn't the best vehicle for that.

    Cheers
    jimbo
      My Computer


  5. Posts : 668
    Win 10 pro
       #5

    Ok so you need another disk (obviously) an i heard you can mount
    a disk as a dir in windows file system

    How to Mount a Hard Drive as a Folder on Your Windows PC

    now we wait the guru for the "mount bind" equivalent for windows

    in the mean time i give you an idea to make some REAL DAMAGE
    not testes at all, **you know better** if it can work:

    rename the database folder BEFORE mounting the new disk: database1

    mount the new disk in a new "database" folder

    copy database1 content into database dir (the new empty disk with full space) could it work?

    good luck
      My Computer


  6. Posts : 93
    Windows 10
       #6

    Jimbo45, you said it yourself: symbolic links. Use the command prompt’s mklink command to create them.
      My Computer


  7. Posts : 11,246
    Windows / Linux : Arch Linux
    Thread Starter
       #7

    Pyprohly said:
    Jimbo45, you said it yourself: symbolic links. Use the command prompt’s mklink command to create them.
    Thanks

    It was so long ago that I used those I'd forgotten all about them or if they even existed.

    Problem solved.

    Cheers

    jimbo
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:58.
Find Us




Windows 10 Forums