Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to prepare my second hard drive for user image uploads. Here is the current layout:

#  sudo parted /dev/sda print

Model: ATA WDC WD2500KS-00M (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      32.3kB  107MB   107MB   primary   ext3         boot 
 2      107MB   8595MB  8488MB  primary   linux-swap        
 3      8595MB  10.7GB  2147MB  primary   ext3              
 4      10.7GB  250GB   239GB   extended                    
 5      10.7GB  250GB   239GB   logical   ext3              

Information: Don't forget to update /etc/fstab, if necessary. 

I am assuming #4 is my secondary drive? How do I partition and mount it so I can begin using it? And how do I add to fstab? I understand if it's to many questions in one, just help me with whatever you can I guess :) Thank you for any help!

share|improve this question

1 Answer 1

up vote 3 down vote accepted

number 4 is not the second drive is just an extended partition so don't do anything with it !

to find your second drive run this

dmesg |grep sd

note what disks are coming up (you already have the sda so make sure you don't touch it) probably you will have sdb and if that is the case do the following

fdisk /dev/sdb
n -- to add a new primary partition and choose the whole drive 
w -- to write it to the drive
mkfs.ext3 /dev/sdb1 -- to create the file system
mount /dev/sdb1 /to_my_image_dir
share|improve this answer
    
# dmesg |grep sd SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB) sda: Write Protect is off sda: Mode Sense: 00 3a 00 00 SCSI device sda: drive cache: write back SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB) sda: Write Protect is off sda: Mode Sense: 00 3a 00 00 SCSI device sda: drive cache: write back sda: sda1 sda2 sda3 sda4 < sda5 > sd 0:0:0:0: Attached scsi disk sda sd 0:0:0:0: Attached scsi generic sg0 type 0 EXT3 FS on sda5, internal journal EXT3 FS on sda3, internal journal EXT3 FS on sda1, internal journal –  Andrew Fashion Jan 7 '11 at 19:10
    
Adding 8289532k swap on /dev/sda2. Priority:-1 extents:1 across:8289532k –  Andrew Fashion Jan 7 '11 at 19:10
    
@andrew are you certain that you have a secondary hard drive? Try fdisk -l /dev/sdb –  Michael Lowman Jan 7 '11 at 19:12
    
I paid for two HDDs, I sure hope so –  Andrew Fashion Jan 7 '11 at 19:17
    
# fdisk -l /dev/sdb Disk /dev/sdb: 892.2 GB, 892279455744 bytes 255 heads, 63 sectors/track, 108480 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 108480 871365568+ 83 Linux –  Andrew Fashion Jan 7 '11 at 19:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.