LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-30-2005, 08:30 PM   #1
ExCIA
Member
 
Registered: Mar 2005
Posts: 78

Rep: Reputation: 15
What is the correct way of partition/format extra hard drives?


Hello all,

I'm using Debian on a server called Acer Altos 11K, which has 8 SCSI-2 'hotswap' slots and so far I'm just using one 9.1 GB hard drive.

Recently, I just added another 9.1 GB hard drive and how do I go about partition/format and mount the drive?

I know that the first hard drive is 'sda1' and the second one is 'sda2'
 
Old 04-30-2005, 09:11 PM   #2
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
If the drive has any trace of a Microsoft filesystem, it would be best to zero the drive out first. Install in box and use:

dd if=/dev/zero of=/dev/<your drive device here> bs=512

I then partition with fdisk /dev/<your drive device here>, exit with "w" to write the info to disk.

Then I format the partitions with the chosen filesystems:

mke2fs /dev/<your drive device here> -> ext2
mke2fs -j /dev/<your drive device here> -> ext3
mkswap /dev/<your drive device here> -> swap
mkreiserfs /dev/<your drive device here> -> reiserfs
mkfs.xfs /dev/<your drive device here> -> xfs

I can't seem to make my drives work like I want
# Managing drives
LNAG - Accessing my drives
Rute - Device Mounting - Automatic Mounts: fstab

# Freeware tools for partitioning/resizing hard drive partitions:
Any Linux Live CD usually have fdisk, cfdisk and other tools available
Ranish Partition Manager
# Understanding Linux Filesystem layout:
Directory Navigation Help File
Filesystems, Directories, and Devices Help File
Proper Filesystem Layout
Advanced filesystem implementor's guide (requires registration)

Last edited by fancypiper; 04-30-2005 at 09:17 PM.
 
Old 04-30-2005, 09:59 PM   #3
brainiac
Member
 
Registered: Jan 2005
Location: middle of a cornfield, IL
Distribution: Kanotix HD Install, Debian Testing, XP Pro,Vista RC1
Posts: 145

Rep: Reputation: 15
Careful, sda2 is the second partition on the first drive. sdb1should be the second drive?
 
Old 04-30-2005, 10:00 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,143

Rep: Reputation: 322Reputation: 322Reputation: 322Reputation: 322
sda1 and sda2 are two partitions on the same hard drive, not two separate drives. Typically, your first SCSI hard drive will be /dev/sda and the second /dev/sdb.
 
Old 05-01-2005, 06:30 AM   #5
ExCIA
Member
 
Registered: Mar 2005
Posts: 78

Original Poster
Rep: Reputation: 15
You're right my mistake. It is /dev/sdb

This is what I have:

Channel A:

9.1 GB SCSI-2 (/ = sda1, swap = sda2)

Channel B:

9.1 GB SCSI-2 (sdb)
18 GB SCSI-2 (sdc)
9.1 GB SCSI-2 (sdd)

This is what I did to sdb (correct me if I'm wrong):

debian:~# dd if=/dev/zero of=/dev/sdb bs=512

20 minutes later...

debian:~# fdisk /dev/sdb

debian:~# mke2fs -j /dev/sdb

This is what I entered into fstab, is this correct?

/dev/sdb /sdb ext3 defaults 0 0

I did created the directory 'sdb' folder under / directory


I'm not sure about the <options>, <dump> and <pass>?


Or, do I leave options, dump and pass emtpy?

After I mounted the drive, I found lost+found in there?

Last edited by ExCIA; 05-01-2005 at 06:33 AM.
 
Old 05-01-2005, 11:25 AM   #6
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
My file for an example:
Code:
# Duron 950 Fedora Core 1 uilleann /etc/fstab file
/dev/hdb8       /               ext3            defaults                1 1
/dev/hdb1       /boot           ext3            defaults                1 2
none            /dev/pts        devpts          gid=5,mode=620          0 0
/dev/hdb11      /home           ext3            defaults                1 2
none            /proc           proc            defaults                0 0
none            /dev/shm        tmpfs           defaults                0 0
/dev/hdb12      /pub            ext3            defaults                1 2
/dev/hdb2       swap            swap            defaults                0 0
/dev/cdrom      /mnt/cdrom      udf,iso9660     noauto,owner,kudzu,ro   0 0
/dev/fd0        /mnt/floppy     auto            noauto,owner,kudzu      0 0
#/dev/hdb9      /mnt/debian     ext3            defaults                1 2
#/dev/hdb10     /mnt/fc3        ext3            defaults                1 2
#/dev/hdc1      /mnt/backup     ext3            defaults                1 2
#/dev/hdc1      /mnt/wav        ext3            defaults                1 2
#/dev/hdc1      /mnt/fat32      vfat            defaults,umask0,0,0     0 0
/dev/hda1       /mnt/WindowsXP  ntfs            defaults                0 0
/dev/hda5       /mnt/NTFSStorage        ntfs    defaults                0 0
 
Old 05-01-2005, 04:33 PM   #7
ExCIA
Member
 
Registered: Mar 2005
Posts: 78

Original Poster
Rep: Reputation: 15
Got it ok.

Thanks for your help.

Last edited by ExCIA; 05-01-2005 at 05:49 PM.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to format a hard drive partition? pujolasdf Linux - Newbie 2 05-06-2005 07:50 AM
How do I format multiple hard drives with root? sneckert Linux - Newbie 1 01-10-2005 11:58 AM
how to partition 2 hard drives (2 cents NEEDED) dimsun Linux - Newbie 4 10-17-2004 07:31 PM
i need partition magic where can i get it so can convert my hard drives? krt47 Linux - Software 5 08-02-2004 08:57 PM
How do I partition my Hard drives? yzrider210 Linux - Hardware 3 12-29-2003 08:50 PM


All times are GMT -5. The time now is 04:10 PM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration