superyupkent Posted October 11, 2003 Report Share Posted October 11, 2003 Hi all, I'm having a little space problem at my server. Since my mysql/php databases started to work, I have a forum running and more ppl visiting my site. The problem is that when I configured my site nearly 1 year ago I installed the partition table as default. Now I am having a rather small /var and a big /home. While all my website space and other vital programs are situated on /var. Is there a way I can repartition my hard drive? Thanks, Alex Link to comment Share on other sites More sharing options...
bvc Posted October 11, 2003 Report Share Posted October 11, 2003 http://mandrakeusers.org/viewtopic.php?t=8127 look at the YinYeti's post. Does that help? Link to comment Share on other sites More sharing options...
superyupkent Posted October 11, 2003 Author Report Share Posted October 11, 2003 in reply to bvc, even though this post helped me to understand more about the structure of the Linux partition table and it's uses. It is not exactly what I was looking for, perhaps I should give you some more details. I am currently running Mandrake 9.0 together with apache, php, mysql, my hard drive is a 20GB maxtor with the following partitions: 1(boot)(2% of 20GB) 400MB 92MB Free 2(extd)(98% of 20GB) 19.6GB --MB Free 5(swap)(2% of 20GB) 400MB --MB Free 6(/usr)(20% of 20GB) 4GB 2.92GB Free 7(/var)(6% of 20GB) 1100MB 594MB Free 8(/home)(70% of 20GB) 14GB 12.75GB Free As you can see I have a lot of space available @ /home, space that I don't use. However, since I am busy getting a heavy pic based website I could use that space @ /var. So I am hoping there is a way for me to repartition /home to lets say 4GB en take the 10GB I have left to /var. Hope this is more info Alex Link to comment Share on other sites More sharing options...
Ixthusdan Posted October 11, 2003 Report Share Posted October 11, 2003 Could you list the partition lables as they exist in linux? Caution: changes in partitions could cause a loss of data!!! Even on a good day! I have successfully altered space, and I have lost everything, all following the same proceedures. Take heed and back-up. Link to comment Share on other sites More sharing options...
bvc Posted October 11, 2003 Report Share Posted October 11, 2003 You can cp -fR /var /home/var (verify all data is there) mv -f /var /var.old ln -s /home/var /var verify that /var links to /home/var ls /var edit /etc/fstab's mount point to /var to /home/var and reboot. ...use the above at your own risk :wink: When/if all is well...you can rm -f /var.old As you know, MANY apps look for /var, and you can not change that, so a symlink somewhere is a necessity. Link to comment Share on other sites More sharing options...
aru Posted October 11, 2003 Report Share Posted October 11, 2003 edit /etc/fstab's mount point to /var to /home/var and reboot....use the above at your own risk :wink: When/if all is well...you can rm -f /var.old Forgive me to pop into this thread bvc :roll: but REBOOT??? My god!!! :shock: :P Just do: ~# mount -a -o remount or if you aren't confident, do it by steps: ~# umount /dev/<old var partition> ~# mount -a In both ways the partition table will be updated ;) Link to comment Share on other sites More sharing options...
bvc Posted October 11, 2003 Report Share Posted October 11, 2003 :shock: ....Sure...now you show up :wink: ......I was just doing as you SIG use to say and keeping it simple stupid :wink: we've missed ya :D Link to comment Share on other sites More sharing options...
Cannonfodder Posted October 11, 2003 Report Share Posted October 11, 2003 Well if you can repartition /home into 2 separate partitions, you can use one of the new partitions as /var instead.. just update your /etc/fdisk file to reflect the change.. Correction: /etc/fdisk is actually /etc/fstab Thanks BVC you old hound! Link to comment Share on other sites More sharing options...
bvc Posted October 11, 2003 Report Share Posted October 11, 2003 /etc/fstab :wink: Link to comment Share on other sites More sharing options...
superyupkent Posted October 12, 2003 Author Report Share Posted October 12, 2003 Well everything worked fine but my apache wont read from /home. So now I get a 403 forbidden error. I also only moved /var/www --> /home/www, how should i unmount then? With what commands? Alex Link to comment Share on other sites More sharing options...
bvc Posted October 12, 2003 Report Share Posted October 12, 2003 post your /etc/fstab and the output from df -h Link to comment Share on other sites More sharing options...
superyupkent Posted October 12, 2003 Author Report Share Posted October 12, 2003 Here you go, please observe that I havent changed my fstab yet. FSTAB: /dev/hda1 / ext3 defaults 1 1 none /dev/pts devpts mode=0620 0 0 /dev/hda8 /home ext3 defaults 1 2 /dev/hdc /mnt/cdrom auto user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0 /dev/fd0 /mnt/floppy auto user,iocharset=iso8859-1,sync,codepage=850,noauto,exec 0 0 none /proc proc defaults 0 0 /dev/hdb1 /maxtor ext3 user 0 2 /dev/hda6 /usr ext3 defaults 1 2 /dev/hda7 /var ext3 defaults 1 2 /dev/hdA5 Swap swap defaults 0 0 /proc /proc proc defaults DF -h: Filesystem Size Used Avail Use% Mounted on /dev/hda1 236M 119M 105M 54% / /dev/hda8 14G 1.2G 13G 9% /home /dev/hdb1 19G 33M 18G 1% /maxtor /dev/hda6 3.9G 871M 2.8G 24% /usr /dev/hda7 1.1G 433M 579M 43% /var Since all my important websites are under var/www/html/www, var/www/html/forum, var/www/html/gallery, I thought it might be better to just copy /var/www to /home/www. Hope you can give me some info in that in relation to the fstab. Also there seems to be a problem with apache, since the program only permits access under /var/www/...... Hope this does it Alex Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now