LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-15-2005, 10:14 AM   #1
buehler
LQ Newbie
 
Registered: Apr 2001
Location: Chicago
Distribution: Mandrake 10.0
Posts: 24

Rep: Reputation: 15
how to change filesystem mount point?


i just installed Linux on a new PC. everything went smoothly,
but i did make the mistake to have the installation program
automatically assign mount points to the filesystems.
right now i have:
>df -h
>/dev/ide/host0/bus0/target0/lun0/part1 5.8G 1.6G 4.0G 29% /
>/dev/ide/host0/bus0/target0/lun0/part6 104G 18G 86G 18% /home

so it's 120GB disk, and most of the disk space is mounted from /home.
problem is i want to run a webserver in /var/www/html/ which will need
most of the disk space!

how can i reassign the biggy 104GB filesystem, so that i can use it for
the webserver w/o having to reinstall the whole thing?
 
Old 04-15-2005, 10:22 AM   #2
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,513

Rep: Reputation: 58
I have never done something like this myself, but in theory it should work:

If you mount the large partition to let's say /temp-home, a new (empty) /home will be created on your rootpartition (/) after reboot. Now you can copy the data from /temp-home to the new home and the data from /var to /temp-home. After that, you change the mountpoint of your large partition to /var. The transition should be complete.

You need to resize your partitions to gain more space on /, since /home uses a considerable amount of space on /

Last edited by abisko00; 04-15-2005 at 10:25 AM.
 
Old 04-15-2005, 10:40 AM   #3
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,513

Rep: Reputation: 58
Sorry, but my previous suggestion wasn't the best idea. You better shrink your current /home to an amount you like and mount /var to the free space. You will need a LiveCD to do the shrinking/repartitioning since it is not possible on a mounted filesystem. I usually use KNOPPIX for this.
 
Old 04-16-2005, 07:37 AM   #4
munchkins
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware 10.0
Posts: 20

Rep: Reputation: 0
try using slackware's disc 2 (rescue disk)
 
Old 04-16-2005, 11:10 AM   #5
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Solus
Posts: 2,254

Rep: Reputation: 47
If you just installed the system and don't have a lot of stuff on it already, perhaps the easiest solution would be to simply reinstall it setting up the correct partitions.

For a fresh system it's the easiest way to go. Remember, any time you start resizing partitions there's a chance of losing data. While it doesn't happen often, it does happen. And if you aren't very experienced with working with partitions, a reinstall may be the least stressfull way to go.
 
Old 04-16-2005, 12:19 PM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
Quote:
Originally posted by abisko00
I have never done something like this myself, but in theory it should work:

If you mount the large partition to let's say /temp-home, a new (empty) /home will be created on your rootpartition (/) after reboot. Now you can copy the data from /temp-home to the new home and the data from /var to /temp-home. After that, you change the mountpoint of your large partition to /var. The transition should be complete.

You need to resize your partitions to gain more space on /, since /home uses a considerable amount of space on /
that looks fine to me

save the contents if /home to another directory sat /tmp-home

umount that /home partititon

move the contents of /tmp-home to /home

then again copy the contents of /var/www/html/ to /tmp-home

mount that big partion to /var/www/html

copy the contenets of /tmp-home to /var/www/html

replace entry from /etc/fstab for /home to that with /var/www/html

regards
 
  


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
How to give not-root user ability to mount devices to any mount point??? jdupre Linux - General 8 02-04-2012 11:03 AM
Mount problem - device already mounted or mount point busy zahoo Linux - General 7 08-28-2009 06:02 PM
samba mount when not owner of mount point cotton213 Linux - General 1 08-04-2005 07:21 AM
Can't change mount point. RoaCh Of DisCor SUSE / openSUSE 9 05-09-2005 02:51 PM
What is the correct method to change mount point? davidas Linux - Newbie 4 04-19-2004 04:54 PM


All times are GMT -5. The time now is 05:59 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