1830234 Members
2035 Online
109999 Solutions
New Discussion

Linux Add Hard Drive

 
SOLVED
Go to solution
Steven Chen_1
Super Advisor

Linux Add Hard Drive

Hello,

I have Redhat Linux on HP server and added a SCSI drive. After adding, I find Linux lacks hpux ioscan and vgcreate.. commands to work on creating the working drive.

Could someone give me some hints on the less advanced Linux OS?

I like hpux.

Thanks a lot,

Steven
Steve
3 REPLIES 3
Santosh Nair_1
Honored Contributor
Solution

Re: Linux Add Hard Drive

You should be able to find the newly attached scsi drive by doing a cat on /proc/scsi/scsi. This actually lists all the SCSI attached devices. Once you have determined the device file for the disk, e.g. /dev/sda, /dev/sdb, etc, you should be able to use fdisk to partition up the disk and then mke2fs to creat the filesystem.

Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
Steven Chen_1
Super Advisor

Re: Linux Add Hard Drive

Santosh,

Thank you very much for the help! I finally get the SCSI drive recognized (I was wrong to think it was but not yet).

But I am troubled with fdisk and mke2fs. I know hpux that is easy to do.

From /proc/scsi/scsi, I get:

--------------------------
[root@linuxapp scsi]# cat scsi
Attached devices:

Host: scsi2 Channel: 00 Id: 06 Lun: 00
Vendor: BNCHMARK Model: DLT1 Rev: 4022
Type: Sequential-Access ANSI SCSI revision: 02

Host: scsi3 Channel: 00 Id: 00 Lun: 00
Vendor: DELL Model: PERCRAID Mirror Rev: 0001
Type: Direct-Access ANSI SCSI revision: 02

Host: scsi3 Channel: 00 Id: 01 Lun: 00
Vendor: DELL Model: PERCRAID Stripe Rev: 0001
Type: Direct-Access ANSI SCSI revision: 02
-----------------------------

The last Host is the newly added drive.

So my question is:
Where can I find the drive info and get the fdisk command going? I am going to use sdb, considering the first two drives are mirrored and this one is going to stand-alone.

I am thinking in term of hpux, but I am not in the right track.

Thanks a lot if you could help.

Steven

Steve
David Harmon
New Member

Re: Linux Add Hard Drive

If you already know the /dev/sd# of the drive, then you can fdisk /dev/sd# and create your partitions, usually ext2 on Redhat.

mkfs /dev/sd##, where the Second number is the parition number. Just running mkfs /dev/sdb1 will format the first partition of scsi disk b with ext2 by default, using the entire partition size for the filesystem.

then, if you've ext3 support, you can convert your ext2 filesystem to ext3 (jounralling) with tune2fs -j /dev/sdb1.

Edit your /etc/fstab, add a new entry and make sure your filesystem type matches ext2 or ext3.

Now you can mount it.