LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-03-2008, 06:51 AM   #1
sfkong
LQ Newbie
 
Registered: Oct 2005
Location: London
Posts: 9

Rep: Reputation: 0
Unhappy Fedora 8: How to re-allocate server hardisk partition size?


Hi. I have a server with 80GB HDD, running Fedora 8. I type in 'df -h -T' in the terminal to get the filesystem listing as shown below. I have a few question and hope you guys can help me out.

Quote:
$ df -h -T
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda5 ext3 2.0G 599M 1.3G 32% /
/dev/sda8 ext3 48G 42G 4.3G 91% /home
/dev/sda6 ext3 996M 34M 911M 4% /tmp
/dev/sda3 ext3 9.7G 1.5G 7.8G 16% /usr
/dev/sda2 ext3 9.7G 305M 8.9G 4% /var
/dev/sda1 ext3 99M 27M 68M 29% /boot
tmpfs tmpfs 502M 0 502M 0% /dev/shm
QUESTIONS:

1. Is it possible to re-allocate the partition size safely using the command line interface only? I would like to maximise the disk space for use on '/home'. So, How can I move/relocate the free 7.8G (mounted on /usr) and 8.9GB (mounted on /var) to /home (sda8)?

2. If it is a NO NO to the first question, is '/usr' and '/var' as shown above safe for me to use? Meaning, can I save files to that directory without screwing up linux?

3. I know that hard disk usually show less space than advertise. But as you can see above, the total size is about 71GB only. And I am suppose to have a 80GB hdd, so is that normal about 9GB has disappeared? Does the boot section use up so much disk space?

4. In Fedora 8, when a file is deleted, is it totally removed and all disk space made available? Or is there a 'trash' folder that i need to empty occasionally, something equivalent to 'Windows Recycle Bin' in order to free up more disk space?


Thanks in advance. Cheers.

Last edited by sfkong; 07-03-2008 at 06:52 AM.
 
Old 07-04-2008, 05:37 AM   #2
AK007HK
LQ Newbie
 
Registered: Jul 2007
Location: Hong Kong
Distribution: FC9, FC7, RHEL5
Posts: 8

Rep: Reputation: 0
QUESTIONS:

1. Is it possible to re-allocate the partition size safely using the command line interface only? I would like to maximise the disk space for use on '/home'. So, How can I move/relocate the free 7.8G (mounted on /usr) and 8.9GB (mounted on /var) to /home (sda8)?

If u install FC8 at default setting, add one more harddisk use may use LVM command to do.
see below or google lvm command
http://www.redhat.com/magazine/009jul05/features/lvm2/
http://linuxshellaccount.blogspot.co...for-linux.html

3. I know that hard disk usually show less space than advertise. But as you can see above, the total size is about 71GB only. And I am suppose to have a 80GB hdd, so is that normal about 9GB has disappeared? Does the boot section use up so much disk space?

Harddisk vendor use 1M=1000 bytes , actually 1M=1024bytes. so a little bit difference occur.

4. In Fedora 8, when a file is deleted, is it totally removed and all disk space made available? Or is there a 'trash' folder that i need to empty occasionally, something equivalent to 'Windows Recycle Bin' in order to free up more disk space?

if u delete file in x-windows, u may find it at ~/.Trash
Delete these file to get more space.

Alan

Hope may help u .
 
Old 07-04-2008, 06:19 AM   #3
sfkong
LQ Newbie
 
Registered: Oct 2005
Location: London
Posts: 9

Original Poster
Rep: Reputation: 0
Hi. Thanks for the info on LVM, I am reading up on it now. But it does seems getting a bit complicated for wanting to change the size of the mounted drive (/var and /usr) to /home

BTW, can any user save files to /var and /usr, or does the access rights need to be change?

Cheers.
 
Old 07-04-2008, 09:56 PM   #4
AK007HK
LQ Newbie
 
Registered: Jul 2007
Location: Hong Kong
Distribution: FC9, FC7, RHEL5
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by sfkong View Post
Hi. Thanks for the info on LVM, I am reading up on it now. But it does seems getting a bit complicated for wanting to change the size of the mounted drive (/var and /usr) to /home

BTW, can any user save files to /var and /usr, or does the access rights need to be change?

Cheers.
u may change the user home directory u like at /etc/passwd.
but I don't suggest u use this way to solve your problem.
 
Old 07-05-2008, 03:11 AM   #5
sfkong
LQ Newbie
 
Registered: Oct 2005
Location: London
Posts: 9

Original Poster
Rep: Reputation: 0
To just make things simple and not touch anything that would screw the OS up.

Is it safe that I just create a folder and save files to the '/var' and '/usr' directory on Linux?

As I notice the following info:
Quote:
/usr (equivalent to Program Files /usr directory tends to store most software you install for personal use including media players and browsers.

/var (equivalent to c:\windows\temp) Linux uses the /var folder to temporarily store information for currently open programs, it generally isnt deleted since it caches software and aids in quick loading.
I haven't tried it yet. But do I need to change read/write permission for user to write to those folders?

Thanks again.
 
Old 07-05-2008, 10:45 AM   #6
AK007HK
LQ Newbie
 
Registered: Jul 2007
Location: Hong Kong
Distribution: FC9, FC7, RHEL5
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by sfkong View Post
To just make things simple and not touch anything that would screw the OS up.

Is it safe that I just create a folder and save files to the '/var' and '/usr' directory on Linux?

As I notice the following info:


I haven't tried it yet. But do I need to change read/write permission for user to write to those folders?

Thanks again.
which way to share the file samba, NFS?
what purpose to share the file , for one of the /home user ? for a group of user ?

either use samba or NFS , u need change suitable read/write permission for folder.
 
Old 07-05-2008, 02:07 PM   #7
sleddog
Member
 
Registered: Jan 2002
Location: Labrador, Canada
Distribution: CentOS, Debian
Posts: 182

Rep: Reputation: 35
1. Safely? I'd say no.

2. Provided that /usr and /var are mounted with the same options as /home, there's no technical reason you couldn't create a directory /var/home2 or /usr/home2 and put data (like new user accounts) there. It's non-standard though and could get confusing.

Check the mount options by simply running 'mount' at the command line.

3. It's normal. It's the way HDD manufacturers calculate disk space, plus there's some reserved space for superblocks (about 3% I think).

4. At the command prompt deleted is usually deleted. Gone. In a graphical windows manager there may be a recycle bin (as noted above).

Your problem is you're running out of disk space. The workaround in #2 might tide you over for a while but eventually you'll face the same issue again.

The simple solution is to add a second harddrive. If your system is using LVM you can probably add the new harddrive space to /home. If not, you can mount the new drive somewhere like /home2 and put data (e.g., new user accounts) there.

To see if you're using LVM, type 'lvs' at the command line:

Code:
[root@server:~] lvs
  LV       VG         Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  LogVol00 VolGroup00 -wi-ao 919.16G
 
Old 07-07-2008, 04:45 AM   #8
sfkong
LQ Newbie
 
Registered: Oct 2005
Location: London
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sleddog View Post
Your problem is you're running out of disk space. The workaround in #2 might tide you over for a while but eventually you'll face the same issue again.
Yup. Running out of disk space on /home. But, there's plenty of space on /var and /usr that i can used.

Quote:
/dev/sda3 ext3 9.7G 1.5G 7.8G 16% /usr
/dev/sda2 ext3 9.7G 305M 8.9G 4% /var
The full story is the server is setup for ftp. Everything is done in command line interface, no GUI required. Files go in and out, don't stay for long, so it seems the suggested workaround #2 would work fine for me, as I don't seems to run any more programs that would require the use of space on /var and /usr. And i don't want to change any serious settings that would screw up the system.

So the next question, is, what command (chmod something?) should i type to give access to my username to have read/write access to /var and /usr in order to create an extra folder, say named 'FTP_TEMP'? What should i add behind #chmod...

Cheers.
 
Old 07-08-2008, 01:14 AM   #9
WorldIsNotFair
Member
 
Registered: Jun 2008
Location: Jakarta
Distribution: CentOS 5
Posts: 89

Rep: Reputation: 17
Hello bro,

I suggest you take #4 suggestion from sleddog.

The problem will raise again if u choose #2, its non standard and it will
be confusing everyone someday.

Just buy a new hd, make lvm from that so in further you can resize it
online.

Well, if u insist to choose #2, if u create dir --> /usr/FTP_TEMP,
u can change owner/group owner to your user and run chmod 760 to that folder, to ensure u can read and write others cannot.


Regards
 
Old 07-08-2008, 01:39 AM   #10
sfkong
LQ Newbie
 
Registered: Oct 2005
Location: London
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks.

Well, the problem is I don't have physical access to the server, i paid for the server service from a webhosting company. They set the file system up that way, and I use putty terminal to access it, all the control i have is only from the command line interface. Any request for them to change anything or reinstall the OS to my specification means I have to pay them more $$$$$ .... so adding a HDD is not an option.

Ya... the method of using /usr/FTP_TEMP or /var/FTP_TEMP definately sound non standard, but seems the only way i have eh . Should be ok as I will be the one accessing it and will remember it. Thanks.

Last edited by sfkong; 07-08-2008 at 01:44 AM.
 
  


Reply



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
Grub loader not loading Windows XP or Fedora Core 1 after changing partition size. zetafunc Fedora - Installation 17 06-12-2005 01:27 AM
partition and format hardisk draggin Debian 1 02-24-2005 05:11 PM
Fedora on gateway solo 9550 se and can fedora mt a firewire hardisk ljrose Linux - Newbie 1 08-18-2004 06:43 PM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM
fdisk partition size differs from mounted partition size jimieee Linux - General 3 10-15-2003 03:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:48 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
Open Source Consulting | Domain Registration