LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-12-2010, 08:06 AM   #1
kais1
Member
 
Registered: Dec 2008
Posts: 61

Rep: Reputation: 17
mount file system


Dear all,

We are running RHEL ES 4.0


We have root file system with 600GB. we created a directory called
u01 inside root , now we want to mount this directory u01 inside root
as a new file system /u01 with 500 GB allocated to it..

How can I do this ?


Kai
 
Old 05-12-2010, 08:15 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,577
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
If I read you correctly you're saying you want to take 500GB of the 600GB root and make it a separate filesystem mounted as /u01?

It doesn't work like that. You'd have to reduce the root filesystem to 100 GB then create a new filesystem of 500 GB and mount that. That is to say you don't allocate from root - you allocate from free space and if root has it all allocated then you don't have any free space.

Reducing a filesystem would depend on many things:
Is it a partition? a logical volume? a software raid (meta disk)?
How full is root currently?
How old is this filesystem?

Doing this for any filesystem would be tricky - doing it for root could be very tricky indeed. Reducing a filesystem or its underlying device can lose data depending on where it is on disk.
 
Old 05-12-2010, 08:18 AM   #3
kais1
Member
 
Registered: Dec 2008
Posts: 61

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by MensaWater View Post
If I read you correctly you're saying you want to take 500GB of the 600GB root and make it a separate filesystem mounted as /u01?

It doesn't work like that. You'd have to reduce the root filesystem to 100 GB then create a new filesystem of 500 GB and mount that. That is to say you don't allocate from root - you allocate from free space and if root has it all allocated then you don't have any free space.

Reducing a filesystem would depend on many things:
Is it a partition? a logical volume? a software raid (meta disk)?
How full is root currently?
How old is this filesystem?

Doing this for any filesystem would be tricky - doing it for root could be very tricky indeed. Reducing a filesystem or its underlying device can lose data depending on where it is on disk.
Thanks for your patience and your elaborated answer,


If I read you correctly you're saying you want to take 500GB of the 600GB root and make it a separate filesystem mounted as /u01?

Yes

It doesn't work like that. You'd have to reduce the root filesystem to 100 GB then create a new filesystem of 500 GB and mount that. That is to say you don't allocate from root - you allocate from free space and if root has it all allocated then you don't have any free space.


How can I reduce the root file system t0 100GB ?

Reducing a filesystem would depend on many things:
Is it a partition? a logical volume? a software raid (meta disk)?

Its a logical volume


How full is root currently?

its only 5% filled.

How old is this filesystem?

New server installed 1 month back.



Kai
 
Old 05-12-2010, 08:22 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
You need to
  1. set a 500 GB volume (partition, logical volume, RAID or NAS volume ...).
  2. create a file system in the new volume.
  3. stop accessing any files under /u01 (safest to change to single user mode).
  4. mount the new file system somewhere, e.g. /mnt.
  5. copy everything from /u01 to /mnt using rsync or tar.
    [*mv /u01 as /u01.old.
  6. mkdir /uo1.
  7. create an fstab entry to mount the new file system on /u01.
  8. mount /u01.
  9. start up all you normally use.
  10. Test.
  11. (when all good) remove /u01.old

EDIT: In the light of new information (There was only the OP when I started composing it) the above omits the really interesting part about shrinking root

Last edited by catkin; 05-12-2010 at 08:26 AM.
 
Old 05-12-2010, 08:25 AM   #5
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 78
you can use something like gparted to reduce filesystems and create new partitions etc. However, make SURE you backup EVERYTHING. It should be fine, but things do happen when you start messing with filesystems. I have never reduced a partition by 500GB so who knows what will happen.
After you have your new partition creaded you can mount that partition as your new filesystem. It's generally best to do all this during your setup of Linux, but it's not impossible to do.
 
Old 05-12-2010, 08:32 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by kais1 View Post
Its a logical volume
Just to confirm ... Created by LVM? Or a logical partition?

EDIT: and which file system type is used for / ?

Last edited by catkin; 05-12-2010 at 08:33 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount disk - corrupted file EXT3 file system RAFAL Linux - General 3 04-08-2009 04:27 PM
How to read .chm file in fedora, can't mount ntfs file system ishti_du Linux - Newbie 12 03-06-2007 04:27 AM
Cannot mount new file system tarheel92x Solaris / OpenSolaris 1 12-30-2006 12:56 AM
Mounting file system in a file with mount Denes Programming 6 11-11-2005 01:04 PM
Cannot Mount File System slappycakes Linux - Hardware 18 10-13-2003 11:33 AM


All times are GMT -5. The time now is 06:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration