Link to home
Start Free TrialLog in
Avatar of RareSeeds
RareSeedsFlag for United States of America

asked on

How to install a new hard drive in a Linux server as a single web-accessible folder?

I have a Linux server running Centos 5.5 with a 320 GB ioSafe drive and a newly-installed 1.5TB drive.  The server is set up as an HTTP and FTP server.  I will be storing some very large files for archiving, but I want those archives to go strictly on the new 1.5TB drive and be accessible as its own directory from the HTTP root for web browsing.

Here's how I need it to work: the most recent files will be stored on the ioSafe drive in a web-accessible directory, say, myserver.com/files.  This already happens, so there is nothing needed here.  A script triggered every day will archive the recently acquired files.  That archive needs to be saved to the new 1.5TB drive, accessible at myserver.com/archives.

I do not have the Centos GUI installed, but I do use Webmin.  If your ideas and instructions can center around the CLI or Webmin, you'll have a much better chance of an accepted answer.

Bottom line: how do I install a new hard drive as a single, web-accessible folder?

For those of you who haven't figured it out yet, here's why: the ioSafe is a waterproof/fireproof hard drive.  But it is not big enough for my needs.  In the event of disaster, I can afford to loose the older archives but I need to retain the most recent data.
ASKER CERTIFIED SOLUTION
Avatar of mccracky
mccracky
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
where is the iosafe drive mounted at the moment ?
# mount

i would assume your web root is at /var/www ?
Avatar of RareSeeds

ASKER

This worked perfectly.  To clarify the exact steps, the drive must first be partitioned, then formatted with the desired filesystem and mounted to the desired location.

In Webmin, here are the steps:
- Create Partition: go to Hardware>Partitions on Local Disks; click on the drive, then click on Add Primary Partition; choose the type and click Create.
- Create Filesystem & Mount: go to System>Disk and Network Filesystems; select the type of filesystem to create (likely ext3) and click Add Mount; set the Mounted As field to the desired location (/var/www/html/archives); click the radio button next to Disk and select the partition from the drop-down; set other options as desired and click Create.

Depending on the size of the drive, this may take from a few minutes to an hour.