SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2008
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Multiple Hard Drives

    Do I need to code a specific way in PHP to account for multiple hard drives on one server?

    For example, if I order a dedicated server with 3 hard drives, all 250 GB each, will I have to change my PHP code at all to access/modify specific files on a specific hard drive?

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    You shouldn't need to...
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    PHP Guru lampcms.com's Avatar
    Join Date
    Jan 2009
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No. Depending on the OS you will access the data the same way as you access it now.
    For example, on Linux a hard drive is mounted as a directory. If your host allows you to mount the drives yourself, you can, for example mount a second drive as /data/
    then you can just access files from the /data/ directory which would really read the data from a second hard drive.

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2008
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well that's pretty much what I'm saying.

    Let's say you have two hard drives.

    The first hard drive has a folder called /uploads/

    When the first hard drive runs out of space, does the system automatically store all new uploads in the second hard drive? (even though the directory is in the first hard drive) Or do I need to explicitly use the path to the second hard drive to do this?

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,820
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Unless you have the drives configured to form a single virtual drive then each drive would have its own directry path and you'd need to specify the appropriate directlry for which you wanted to access.

    If you did have three 250Gb drives configured so that the operating system sees them as one big 750Gb drive then a failure of any one of them could make it difficult to access the data on the other two.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •