LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-06-2004, 11:03 PM   #1
jordanthompson
Member
 
Registered: Oct 2004
Posts: 115

Rep: Reputation: 15
removed disk partitions - disk is now too small


Hi all,
I have a 12o GB disk that was originally partitioned into 4 disks. I decided to be more flexible (this is intended to be a backup disk) so I deleted all of the partitions via fdisk and created a new one. Unfortunately, the new one is only showing it is 49GB. I assume I need to format it after partitioning(?) but I can't figure out how.

Of course there may be a size limit for a primary partition as well...

any help here would be most helpful!!

thanks
 
Old 12-07-2004, 06:17 AM   #2
gco10996
LQ Newbie
 
Registered: Oct 2002
Location: New Windsor, NY
Distribution: Red Hat, Slackware, Smoothwall, Fedora, Mandrake, *BSD
Posts: 20

Rep: Reputation: 0
I'm assuming this is in preparation of a fresh OS install . . .

Is fdisk/cfdisk showing your total capacity for all devices to be only 49GB? Or does the 49GB reflect those devices with a filesystem?

At any rate: to format a partition in linux, here's a man page excerpt for mkfs (the linux formatter, or more precicely, filesystem creator):

mkfs [ -V ] [ -t fstype ] [ fs-options ] filesys [ blocks ]
DESCRIPTION
mkfs is used to build a Linux file system on a device, usually a hard disk partition. filesys is either the device name (e.g. /dev/hda1, /dev/sdb2) or the mount point (e.g. /, /usr, /home) for the file system. blocks is the number of blocks to be used for the file system.
The exit code returned by mkfs is 0 on success and 1 on failure.

In actuality, mkfs is simply a front-end for the various file system builders (mkfs.fstype) available under Linux. The file system-specific builder is searched for in a number of directories like perhaps /sbin, /sbin/fs, /sbin/fs.d, /etc/fs, /etc (the precise list is defined at compile time but at least contains /sbin and /sbin/fs), and finally in the directories listed in the PATH enviroment variable. Please see the file system-specific builder manual pages for further details.

OPTIONS
-V
Produce verbose output, including all file system-specific commands that are executed. Specifying this option more than once inhibits execution of any file system-specific commands. This is really only useful for testing.
-t fstype
Specifies the type of file system to be built. If not specified, the default file system type (currently ext2) is used.
fs-options
File system-specific options to be passed to the real file system builder. Although not guaranteed, the following options are supported by most file system builders.
-c
Check the device for bad blocks before building the file system.
-l filename
Read the bad blocks list from filename
-v
Produce verbose output.
 
Old 12-07-2004, 08:20 AM   #3
jordanthompson
Member
 
Registered: Oct 2004
Posts: 115

Original Poster
Rep: Reputation: 15
This is actually a working system. I have a disk that was multiply partitioned and I now want to use strictly as a backup so I don't want the partitions any more. I ran fdisk and deleted the partitions and then recreated a single partition. I think the step I missed was actually formatting it. Sounds like this does everything - I'll give it a shot tonight when I get home - thanks for the tip.
 
Old 12-07-2004, 11:54 AM   #4
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
as a suggestion, you'll probably not want to use an ext2 filesystem, you're better off with a journaling file system like ext3 or reiserfs.

How did you get the 49GB figure?
 
Old 12-07-2004, 10:35 PM   #5
jordanthompson
Member
 
Registered: Oct 2004
Posts: 115

Original Poster
Rep: Reputation: 15
mkfs did the trick - I'd never heard of it and when I did an apropos on fornat and fdsik, I don't remember it coming up - thanks for pointing it out.

I do have another question (see near the bottom of this posting.)

I did use ext3 as you suggested.

The 49GB must have been what the first partition was set to. When I did the fdisk, It resized the drive, but somehow it kept the original size before formatting.

Another thing I needed to do... I needed to mount /dev/hdd (instead of /dev/hdd1) in /etc/fstab.

Now, df -h reports:
[root@dot root]# df -h /backup/
Filesystem Size Used Avail Use% Mounted on
/dev/hdd 111G 7.9G 97G 8% /backup

(Note it is a 120 GB drive, but it is reporting as 111 GB.)

And finally, fdisk -l reports:
Disk /dev/hdd: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/hdd doesn't contain a valid partition table
[root@dot root]#

QUIESTION/OBSERVATION:
The part about not having a valid partition table bothers me (although it seems to be working fine...) Can someone explain this?

thanks to all that helped!

Jordan
 
Old 12-07-2004, 10:52 PM   #6
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
Quote:
Originally posted by jordanthompson
...
Another thing I needed to do... I needed to mount /dev/hdd (instead of /dev/hdd1) in /etc/fstab.

Now, df -h reports:
[root@dot root]# df -h /backup/
Filesystem Size Used Avail Use% Mounted on
/dev/hdd 111G 7.9G 97G 8% /backup
...
Disk /dev/hdd doesn't contain a valid partition table
[root@dot root]#
...
QUIESTION/OBSERVATION:
The part about not having a valid partition table bothers me (although it seems to be working fine...) Can someone explain this?

thanks to all that helped!

Jordan [/B]
Hmmm. Odd. I think I know what happened though. When you created the filesystem you typed something like:

mkfs.e2fs -j /dev/hdd

hdd is the name of the whole drive. Instead of formating the first partition only, you formated EVERYTHING. There IS no partition table, because you formated over the top of it. If you just want one partition, I wouldn't worry about it too much. Normally you would fdisk /dev/hdd to create hdd1, and then format hdd1.

When you used fdisk to check the drive stats, it tried to read the partition table, and didn't find anything that made sense. You can either use the drive as is, or you can fdisk again and format hda1 only.

Last edited by gd2shoe; 12-08-2004 at 02:21 PM.
 
Old 12-08-2004, 11:37 AM   #7
jordanthompson
Member
 
Registered: Oct 2004
Posts: 115

Original Poster
Rep: Reputation: 15
Great catch - I think that is exactly what I did.

Would reformatting also report a more correct size of the drive (closer to 120GB instead of the 111GB it currently shows?)

Thanks for your help,
Jordan
 
Old 12-08-2004, 02:29 PM   #8
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
No. Often disk manufactures lie about the disk size.

Technically:
1024B = 1KB
1024KB = 1MB
1024MB = 1GB

This is NOT the metric system, but it steals the naming convention from the metric. Disk manufacturers like to use a metric conversion to use a slightly larger number to sell the drive.

120,000,000,000B = 111.75GB

Sorry, but I think that is what is happening here.
 
Old 12-08-2004, 03:40 PM   #9
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Technically there is no such a prefix as K, it stands for Kelvin and Sir Kelvin has nothing to do with bytes.
Correct prefix is k- for 1000, and Ki for kilobinary.

http://physics.nist.gov/cuu/Units/prefixes.html

Have a great day!
 
Old 12-08-2004, 06:03 PM   #10
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
Ok, smart alek...

There is a bit of controversy over this that I was hoping to avoid. 'k' is a metric prefix; 'KB' on the other hand is NOT a metric unit (as I mentioned above).

A few years ago, scientist and others discovered that computer geeks were "misusing" the metric prefixes.

"Oh no, they're using our prefixes to mean something else, we've got to do something about it! Here, let's tell them that they can no longer use KB, MB, and GB. We will instead benevolently bestow upon them the KiB, MiB, and GiB."

Alright, so the push probably came mostly from those who are in the computer science field to some extent, though a minority of them. The fact remains that few people use these measurements. The fact also remains that there would be EXTREMELY little confussion if everyone just accepted the fact that memory is measured in base 1024 increments.
 
Old 12-08-2004, 06:08 PM   #11
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
Note also that you didn't post the page you thought you did. The one you were after was:

http://physics.nist.gov/cuu/Units/binary.html

Which can be found off of that page. Note also that the NIST is hosting this information, but are not taking credit for it. They are only forwarding the standard that is trying to be enforced, not the one(s) being widely used.
 
Old 12-08-2004, 06:26 PM   #12
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Sorry, I posted right page.
My point was there is no prefix "K".
You can use kB or KiB, but no KB.
 
Old 12-08-2004, 06:36 PM   #13
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
Quote:
Originally posted by Emerson
Sorry, I posted right page.
My point was there is no prefix "K".
You can use kB or KiB, but no KB.
Yeah, and my point is that I can use KB all I want to (1024 B). Until KiB actually becomes an industry standard (if ever), there is nothing wrong with using a unit name that is widely known. Don't get my wrong, I'm not totally opposed to something like KiB, I just don't see a point to trying to convince an entire industry to change it's naming scheme for no reason. I say, let the standard stand.
 
Old 12-08-2004, 06:53 PM   #14
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Sorry again. I point flaming finger to MS. AFAIK they started to misuse this unit.
There is no standard containing prefix "K". !!! "K" stands for Kelvin degree (temperature).
The fact prefix K is not in SI table does not give you the right put it wherever you want.
Next thing you tell as the m (milli-) and M (mega-) are the same?
And stay cool, 310 K is just enough for your body.
Remember, a teacher's position comes with great responsibility.
 
Old 12-08-2004, 08:46 PM   #15
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
I'm sorry that I sound hot headed about it. It just really irritates me when standards are not standard. MS may have been the culprit that spread the "misuse" around, but I have a suspicion that 'KB' was used before then.

The fact that 'K' is not in the SI table neither gives nor takes away the right to use it in this context. It is an informal industry standard. I acknowledge that if I wanted to use a formal designation, I would use KiB. If all of the sudden everyone started using this new set of terms, most of my frustration over this would go away. As it stands, the terms are just not used, not even by manufacturers (by and large).

No, you don't have to worry. 'm' and 'M' are safe from the evil likes of me!

The last line of your post shows intelligence and perspective. In a sense, we are all teachers and students here. The truth is, there are many wonderful teachers here at linuxquestions. There are also some who have partial answers, and are willing to lend a hand. I believe that I tend to fit in this category. I'll tend to answer when nobody more intelligent than I cares to. I prefer to think of everyone here as helping hands, all helping each other. The idea that someone will take what I say, and immediately accept it as true is scary, but it will happen.
 
  


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
HP DL360 wont send message when disk is removed. nickrb Linux - Hardware 0 06-07-2005 06:15 AM
scsi hard disk removed asif_mohdshafi Linux - Hardware 6 01-16-2005 02:50 AM
Removed second hard disk, Mandrake will not boot. TravisOSF Linux - Hardware 5 06-22-2004 11:28 AM
Floppy too small for Mandrake 9.2 boot disk? MSeven20 Mandriva 6 12-16-2003 06:56 AM
Now the disk size is to small... Hachaso Linux - Software 5 05-18-2001 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:07 PM.

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