LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 10-06-2005, 11:33 PM   #1
kwickcut
Member
 
Registered: Nov 2004
Posts: 123

Rep: Reputation: 20
adding space


hello again

i was wondering how to add space to an area on the hd i am running mandrake 10.0 powerpack. in the directory var/www/html i am needing to make this area bigger. rite now it is 5.8 gigs used on a 68 gig hd also i have a 147 gig hd on this box. in the directory var/www/html i have 87.6 megs left out of 5.8 gigs how do i make this bigger. or can i make a folder on the 147 gig hd and move everything there. but now if i do that will apache have to be redirected and if so how do i do that thanks



kwick
 
Old 10-07-2005, 12:26 AM   #2
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 47
Edit: First stop apache (ie. stop the httpd service)

Move the /var/www/html folder onto the directory where you've mounted the 147GB drive. So if the 147gb is /mnt/bigdrive you'd do (as root):
Code:
cd /var/www
mv html/ /mnt/bigdrive
ln -s /mnt/bigdrive/html
Now by default (for security reasons I think) Apache won't follow symlinks so you need to add this entry into your /etc/httpd/conf/httpd2.conf:
Code:
<Directory />
 Options Indexes +FollowSymLinks
</Directory>
start apache again

Last edited by tkedwards; 10-07-2005 at 12:28 AM.
 
Old 10-07-2005, 09:56 AM   #3
RomanG
Member
 
Registered: Jan 2005
Location: Russia, Kazan
Distribution: Mandrake 10.2, RedHat sometimes..
Posts: 110

Rep: Reputation: 15
And... Is there is a data lossless method to repartition my HDD space?
For example for ext3, ext2, reisers file systems and using preferably standart linux (unix) utilites. GNU GPL is a mandatory.
In this case and in many others it would be better solution.
 
Old 10-07-2005, 07:19 PM   #4
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 47
Quote:
And... Is there is a data lossless method to repartition my HDD space?
For example for ext3, ext2, reisers file systems and using preferably standart linux (unix) utilites. GNU GPL is a mandatory.
Mandrake/Mandriva comes with diskdrake which allows you safely (lossless) resize ext2, etx3, NTFS, fat32 and I think (not 100% sure) Reiserfs partitions, its a lot like partition magic. You can find it in the Mandrake Control Centre under Mount Points->Partitions or (if you need to fiddle with the / partition) you'll need to either get to it by booting off the Mandrake Install CD and just going up to the partitioning part or by downloading and using PCLinuxOS LiveCD which comes with diskdrake also.

If you want to be able to span partitions across multiple disks you need to use LVM. I think diskdrake supports it but to create LVM partitions obviously you'll have to delete some or all of your existing partitions - its something you usually do when you install the system if you want it. Anyway the LVM Howto explains what it is and how it works: http://www.tldp.org/HOWTO/LVM-HOWTO/
 
Old 10-12-2005, 06:19 AM   #5
RomanG
Member
 
Registered: Jan 2005
Location: Russia, Kazan
Distribution: Mandrake 10.2, RedHat sometimes..
Posts: 110

Rep: Reputation: 15
But if I do not have X installed?
How to do it in command line?
 
Old 10-12-2005, 07:29 AM   #6
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 47
Just boot your system off the Mandrake Install CD and go up to the partitioning step. Alternatively boot the system off a PCLinuxOS liveCD
 
Old 10-13-2005, 05:28 AM   #7
RomanG
Member
 
Registered: Jan 2005
Location: Russia, Kazan
Distribution: Mandrake 10.2, RedHat sometimes..
Posts: 110

Rep: Reputation: 15
Oh, thank you for your reply and I am sorry for my incompetence. I forgot that I have to reboot every time I change my partition table, am I right?
[Well, I wanted to know if I can resize my HDD on a running server on the fly, without stopping it: I decided that if for example I want to decrease a partition that is mounted as /home, I should unmount it, then resize with a CLI-based program, then mount it again.]
 
Old 10-13-2005, 05:56 PM   #8
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 47
You can safely resize anything except your root or swap partitions while the machine is running. From the command line you'd use commands like parted and e2fsresize. However I'd strongly recomend rebooting so you can use diskdrake because with e2fsresize and parted you have to shrink the size of the file system, then shrink the partition and make sure you get them exactly the same size. I've had some difficulty doing that before - even if you put in the same size in blocks or bytes or whatever the partition may not exactly shrink to that size, its a bit tricky.
 
Old 10-13-2005, 06:37 PM   #9
RomanG
Member
 
Registered: Jan 2005
Location: Russia, Kazan
Distribution: Mandrake 10.2, RedHat sometimes..
Posts: 110

Rep: Reputation: 15
Thank you, tkedwards. You helped a lot.
 
Old 10-14-2005, 04:44 PM   #10
Redeye2
Member
 
Registered: Feb 2004
Location: San José, Costa Rica
Distribution: Ubuntu
Posts: 489

Rep: Reputation: 30
Another alternative if you don't want to enable symlinks, is to mount the new hard drive directly to /var/www/html. You'll need to copy the contents to a temporary directory, mount the new drive, then recopy back and it's done
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding space - can it be 'spanned' danimalz Linux - Hardware 1 10-22-2005 06:45 PM
Adding space to a partition... zaxs Linux - General 1 04-07-2005 10:49 PM
Adding swap space sbrewer Linux - Distributions 4 12-19-2004 04:32 AM
Adding more hd space zaipher Linux - General 9 09-28-2004 10:26 AM
Adding space to a partiion Maistre Linux - Newbie 5 02-26-2004 02:05 PM


All times are GMT -5. The time now is 04:16 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration