Partition and mount my secondary hard drive on CentOS 5.5 64bit?
5,147
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
Related videos on Youtube
Author by
Andrew Fashion
Updated on September 17, 2022Comments
-
Andrew Fashion almost 2 years
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!
-
Andrew Fashion over 13 years# 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 over 13 yearsAdding 8289532k swap on /dev/sda2. Priority:-1 extents:1 across:8289532k
-
Michael Lowman over 13 years@andrew are you certain that you have a secondary hard drive? Try
fdisk -l /dev/sdb
-
Andrew Fashion over 13 yearsI paid for two HDDs, I sure hope so
-
Andrew Fashion over 13 years# 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
-
silviud over 13 yearsok then just follow from fdisk /dev/sdb
-
Andrew Fashion over 13 yearswrong box sorry, let me re run that command on correct server
-
Andrew Fashion over 13 yearsHere is the output... Nothing
-
silviud over 13 yearsok then what it could be then is they set a hard ware raid for you and you see just one drive ... call the supplier.
-
Andrew Fashion over 13 years[root@D18634 ~]# fdisk -l /dev/sdb [root@D18634 ~]# no output what so ever
-
Andrew Fashion over 13 yearsfdisk /dev/sdb Unable to open /dev/sdb [root@D18634 ~]#
-
silviud over 13 yearsif there is no second drive into the system is not much you can do.
-
Andrew Fashion over 13 yearsokay i guess i dont have a second, thank you! time to complain :)