Solved

Unmount opt dir under / dir and mounting it as a separate dir provided via SAN storage

Posted on 2009-05-14
6
462 Views
Last Modified: 2013-12-15
Hi Experts,

I have a server that will be allocated 1 terabyte of space via SAN Storage EVA8000. This server is a Redhat 5.1 server and has already been partitioned as follow:
/ Partition under the root partition the is an opt directory
/swap partition
/var partition

I only discovered later that the opt directory should be mount as a separate partition /opt and the space for this partition will be provided via storage SAN. Please advise on how to unmount the /opt partition under the / partition and mount it as a separate partition of 1 terabyte in Linux.

I will highly appreciate your help or guidence with this problem!!!!!

Regards
The Duke
0
Comment
Question by:LinuxDuke
  • 3
  • 2
6 Comments
 
LVL 19

Accepted Solution

by:
jools earned 125 total points
Comment Utility
/opt can be under / if you want...however... back to the question...


create a partition on the SAN disk using fdisk, I'll call it /dev/sdc1. Create the partition how ever big you need and save it to the disk (write).

run partprobe.

create a filesystem; mkfs -t ext3 /dev/sdc1

mount it;
   mkdir /newopt
   mount /dev/sdc1 /newopt

Copy /opt to /newopt
   cd /opt
   find . | cpio -pudm /newopt

!! make sure you have no services running that use it.... etc etc

modify /etc/fstab to use /dev/sdc1 or LABEL /dev/sdc1 as /opt and then run `mount -a`

dont think I forgot anything....
0
 

Author Comment

by:LinuxDuke
Comment Utility
Jools nice let me test it should take me a week to get the san requirements then I'll follow your steps.
Please assist me when I get problems with this when its working I will inform you.
I'll leave this open till I have done testing.

Thanks
The Duke
0
 
LVL 19

Expert Comment

by:jools
Comment Utility
absolutely, just post back here and I take a look.
0
 

Author Comment

by:LinuxDuke
Comment Utility
Thanks Jools still waiting for storage to be provided and once that is done will fallow your steps and update you that is why I'm leaving this post open.

Thanks
Duke
0
 
LVL 19

Expert Comment

by:jools
Comment Utility
no worries, thx for the update
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Noteā€¦
I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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.

763 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

8 Experts available now in Live!

Get 1:1 Help Now