LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-28-2005, 07:17 AM   #1
guam
LQ Newbie
 
Registered: Feb 2004
Location: Korea
Posts: 25

Rep: Reputation: 15
Increasing hard-disk space allocated to user


Hello,

I want to know how I can increase the hard-disk (storage space) space allocated to a user. I am using Redhat 9.0.

I have free space (unformatted) on my hard-disk. Can I somehow format the space and use for the existing linux installation. I do not want to reinstall linux again.

Thanks in advance.

Devel.
 
Old 02-28-2005, 07:24 AM   #2
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
hi,
to edit/change the space allocated to a user use the command ´edquota´.
pre-condition of course, quotas are set.
to use available free space of ur hdd, make a partition with fdisk and format this new partition with mk2fs.
 
Old 02-28-2005, 07:43 AM   #3
guam
LQ Newbie
 
Registered: Feb 2004
Location: Korea
Posts: 25

Original Poster
Rep: Reputation: 15
Hello overlord73,

Thanks for your help.

For the second query, can you kindly elaborate the procedure.

As the data on the existing is very critical at this point of time. And I want to allocate entire free space available to existing linux installation.

Thanks again.

Devel.

Last edited by guam; 02-28-2005 at 07:48 AM.
 
Old 02-28-2005, 08:12 AM   #4
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
hey guam,
as root do:
-fdisk /dev/hda
-m shows a little help
->p shows partitiontable
->c creates a new partition
->t edit the part.type
->w writes and exit
before u could do a ´fdisk -l´ to list all existing partitions so far.

after creating the partition, u can format it with mke2fs, for example:

mke2fs -j /dev/hda5
for ext3 on /dev/hda5
 
Old 02-28-2005, 10:19 PM   #5
guam
LQ Newbie
 
Registered: Feb 2004
Location: Korea
Posts: 25

Original Poster
Rep: Reputation: 15
Hello overlord73,

I successfully created a partition of the unused space of the hard-disk. But when I tried to format the new partition with mke2fs it gives following error.

/dev/hda4: Not enough space to build proposed file system while setting up superblock.

What is the fix for this? Am I doing something wrong?

Devel
 
Old 03-01-2005, 12:22 AM   #6
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
what does /proc/partitions show?
are you sure you have created a logical part. inside the extended?

but first..more simple ;-) ...have you rebooted?
 
Old 03-01-2005, 01:44 AM   #7
guam
LQ Newbie
 
Registered: Feb 2004
Location: Korea
Posts: 25

Original Poster
Rep: Reputation: 15
Yes, I rebooted the system.

Here is what /proc/partitions says:

major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq

3 0 58615704 hda 48948 70957 956210 409350 293109 3561865 30841036 26944990 -10 12935437 26877808
3 1 10482381 hda1 48281 70492 950226 408010 292577 3555997 30789848 25979340 0 861870 26398210
3 2 20972857 hda2 7 29 72 70 0 0 0 0 0 70 70
3 3 1052257 hda3 623 41 5048 980 530 5868 51184 965090 0 550700 966070
3 4 1 hda4 0 0 0 0 0 0 0 0 0 0 0
========================================================
The fdisk -l says:

Disk /dev/hda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1305 10482381 83 Linux
/dev/hda2 1306 3916 20972857+ 83 Linux
/dev/hda3 3917 4047 1052257+ 82 Linux swap
/dev/hda4 4048 7297 26105625 85 Linux extended
[root@viper sbin]#
===========================================================
And, finally mke2fs -j /dev/hda4 says:

[root@viper sbin]# ./mke2fs -j /dev/hda4
mke2fs 1.32 (09-Nov-2002)
/dev/hda4: Not enough space to build proposed filesystem while setting up superblock
[root@viper sbin]#
============================================================

What do you suggest now?

Humm..... I shall thank you later when it works....

Devel
 
Old 03-01-2005, 01:55 AM   #8
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Ok, the problem you have here is with the legacy size restriction of a HDD's superblock. There is only space to list four partitions, although there is a way to get around this. I see you created an extended partition using the rest of you HDD, this is good, now what you need to do is fire up fdisk again, and create a logical partition inside the extended partition. You can put as many logical partitions inside the extended one as you like, however, if you just want to use all the space, go ahead...

After you are done this, format the partition as described above (although you don't have to use ext3, you can use reiserfs of xfs if you like), then mount it somewhere in your current filesystem structure. /home would be good choice, but make sure to back-up your current /home first, so you can copy it over once your new partition is mounted. Update /etc/fstab and you should be good to go....

Last edited by bulliver; 03-01-2005 at 01:57 AM.
 
Old 03-01-2005, 06:02 AM   #9
guam
LQ Newbie
 
Registered: Feb 2004
Location: Korea
Posts: 25

Original Poster
Rep: Reputation: 15
Hello bulliver,

Thanks for the reply.

I did the steps as you mentioned. I can now mount the newly formatted space to /mnt/test (this is for testing only).

The goal is to increase the available space to users. That is increasing the storage space currently allocated to /home. How can I add this additional space to the user?

Actually, I did not understand why you suggested to mount the new partition to /home.

Devel
 
Old 03-01-2005, 06:37 AM   #10
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
Quote:
The goal is to increase the available space to users.
and the default place is /home/username!
so that´s why bulliver says: 1. backup /home, 2. mount new /"home-partition", 3. restore old home-data
 
Old 03-01-2005, 07:31 AM   #11
guam
LQ Newbie
 
Registered: Feb 2004
Location: Korea
Posts: 25

Original Poster
Rep: Reputation: 15
Hello,

Thanks a lot, overlord73 and bulliver.

Devel.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Increasing disk space Shankarrajus Fedora 1 04-22-2005 08:12 PM
allocated space of a directory Dave31836 Programming 8 10-04-2004 06:07 PM
Increasing my disk space ekoome Red Hat 6 09-22-2003 04:40 AM
Hard disk space shaahul Linux - Newbie 1 08-25-2003 10:48 AM
Disk space wastage 73 GB Hard disk rajgopalhg Linux - Hardware 2 10-18-2002 03:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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