Solved

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

Posted on 2011-03-04
3
459 Views
Last Modified: 2012-08-14
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.
0
Comment
Question by:RareSeeds
3 Comments
 
LVL 12

Accepted Solution

by:
mccracky earned 250 total points
ID: 35037390
You just need to mount the new, large drive at myserver.com/archives.  (cli as root: "mount /dev/sdX1 myserver.com/archives" where sdX1 is the partition on your new drive)

Or, in fstab:

/dev/sdX1    /full/path/myserver.com/archives  <fstype(ext3?)> defaults 0 1

(See this page for fstab explanation: http://www.tuxfiles.org/linuxhelp/fstab.html )

If you already have scripts that move the older files to myserver.com/archives, then you're done.
0
 
LVL 7

Expert Comment

by:diepes
ID: 35043041
where is the iosafe drive mounted at the moment ?
# mount

i would assume your web root is at /var/www ?
0
 

Author Closing Comment

by:RareSeeds
ID: 35057822
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.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Valere unit 6 55
Connecting APC UPS 2200 via serial port 3 53
SRX240 SYSLOG Setting 6 51
Is MSDN subscription the answer? 4 28
The 6120xp switches seem to have a bug when you create a fiber port channel when you have a UCS fabric interconnects talking to them.  If you follow the Cisco guide for the UCS, the FC Port channel will never come up and it will say that there are n…
Moving your enterprise fax infrastructure from in-house fax machines and servers to the cloud makes sense — from both an efficiency and productivity standpoint. But does migrating to a cloud fax solution mean you will no longer be able to send or re…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now