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 09-11-2007, 05:54 AM   #1
gorilly
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Rep: Reputation: 0
formatting drive to correct size help!!


Hi

ive added a new hard drive to my ubuntu server

i did an fdisk /hdc1/ made a mount gave it a name etc etc...

ive mapped a drive on a windows client, the drive is 160GB but on the windows client its only showing up as 30GB...


here are my settings

Quote:
Disk /dev/hda: 40.9 GB, 40982151168 bytes
255 heads, 63 sectors/track, 4982 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 4892 39294958+ 83 Linux
/dev/hda2 4893 4982 722925 5 Extended
/dev/hda5 4893 4982 722893+ 82 Linux swap / Solaris

Disk /dev/hdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 19456 156280288+ 83 Linux

help please getting it to the correct size!!

i know i need to format to the correct size but dont know how to do this, when i first formatted i did Fdisk, then N, then 1, then i used the total blocks like it suggested...

thanks
 
Old 09-11-2007, 06:04 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,486

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
You need to create a file system on it (like "format"in Windoze) - fdisk merely "reserves" the space.
"man mkfs"
 
Old 09-11-2007, 06:30 AM   #3
gorilly
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
so what you are saying is sudo mkfs /dev/hdc1?

i can already access the network drive / net partition but its only 30 or so GB
well i think really i need to learn the proper process if someone can help me please

so i do

fdisk /dev/hdc
Then i type n for new partition
i choose 1 for partition 1
then i say start at 1
end at 19457

how do i then add the filing system???

then i type W to write changes

then i mkdir /newdrive

then i nano /etc/fstab

what do i put in fstab?

thanks
 
Old 09-11-2007, 06:55 AM   #4
gorilly
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
ok i think ive done it now, the last thing i am stuck with is how to get a new directory onto the new drive... sounds silly i know
 
Old 09-12-2007, 09:14 AM   #5
gorilly
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
i did it in the end .... IIRC this is how


sudo mkdir /home/michael/hd2 <this makes a new directory in my home folder called HD2
sudo fdisk /dev/hdc <this makes a new partition on my hdc, options were n (for new partition), 1 (for partition 1) then defaults
sudo mkfs /dev/hdc1 <this formats the new partition as ext2
sudo mount /dev/hdc1 /home/michael/hd2 <mounts the new partition as the directory we made

i then did a reboot

then logged into SWAT, made a new share, pointed it at the hd2 directory and mapped my network drive.

now i have a 150GB mapped drive...
__________________
 
Old 09-12-2007, 09:40 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,486

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Congratulations - I was wondering if you still needed help.
ext2 is not a good option for a big partition like that - conversion to ext3 (ext2 with a journal) would be a better (and safer) option.
Can be done anytime - see the manpage for tune2fs; the "-j" option.
 
Old 09-12-2007, 11:10 AM   #7
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Depending on the distribution, mkfs by itself may actually default to ext3.
 
  


Reply

Tags
drive, format, hard, mount, server, ubuntu


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
Hard Drive not reporting the correct size. ddevore Linux - Hardware 14 03-10-2007 03:32 AM
is this the correct/best way to set file size? George2 Programming 8 07-19-2006 12:19 AM
HD not showing up as correct size, please help!! chriserickson Linux - Hardware 6 09-23-2005 02:04 PM
df not reporting correct size. mdarby Slackware 2 11-10-2004 08:36 AM
screen size not correct? blither Slackware 9 12-16-2002 10:53 PM


All times are GMT -5. The time now is 03:23 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration