How to add new hard disk in Centos

Connect new hard disk to SCSI connection


Sequences
Partitioning (fdisk) --> Formatting (mkfs) --> Mount --> Register in 'fstab' file


New device location
/dev/sd*

When you type
ls -l /dev/sd*
You can see the devices, and figure out whether it was partitioned.

ex) ls -l /dev/sd*
sda
sda1
sdb
sdc
sdc1

This means that three hard disks are connected and 'sdb' hard disk isn't partitioned yet.


Command
fdisk /dev/sdb

mkfs mksf.ext4 /dev/sdb1

mount /dev/sdb1   /directory


Auto connecting when machine is rebooted
Register at /etc/fstab

ex) /dev/sdb1      /directory      ext4      default    0  0

No comments:

Post a Comment