Menambahkan Hard Disk Pada Sistem Operasi Linux

Assalamualaikum,

Cara menambahkan HDD pada linux:

1 pasang HDD SATA/SCSI/ATA pada mesin linux

2 deteksi dengan perintah lshw -C disk

*-disk
description: SCSI Disk
physical id: 0.0.0
bus info: scsi@4:0.0.0
logical name: /dev/sdb
size: 279GiB (300GB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: guid=948a39bb-7397-44cd-96fe-6d473ce46212 sectorsize=512
*-cdrom
description: DVD reader
product: DVD-ROM TS-H353C
vendor: TSSTcorp
physical id: 0.0.0
bus info: scsi@0:0.0.0
logical name: /dev/cdrom
logical name: /dev/sr0
version: LE01
capabilities: removable audio dvd
configuration: ansiversion=5 status=nodisc
*-disk
description: ATA Disk
product: ST3250318AS
vendor: Seagate
physical id: 0.0.0
bus info: scsi@1:0.0.0
logical name: /dev/sda <<<< disk yang baru dipasang
version: CC38
serial: 5VMCTBG4
size: 232GiB (250GB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: ansiversion=5 guid=cb2cc2ab-11f5-4d13-a321-21530bc371e0 se ctorsize=512

3 format HDD fdisk /dev/sda

WARNING: GPT (GUID Partition Table) detected on ‘/dev/sda’! The util fdisk doesn’t support GPT. Use GNU Parted.
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition’s system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): d
No partition is defined yet!

Command (m for help): c
DOS Compatibility flag is set (DEPRECATED!)

Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
Using default value 1
First sector (63-488397167, default 63):
Using default value 63
Last sector, +sectors or +size{K,M,G} (63-488397167, default 488397167):
Using default value 488397167

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

periksa di /dev apakah sudah terdapat partisi sda1

4 selesai format lanjutkan dengan mkfs -t ext4 /dev/sda1

mke2fs 1.42.9 (4-Feb-2014)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
15269888 inodes, 61049638 blocks
3052481 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
1864 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:
done

5 buat folder mouting mkdir /media/mycache lanjutkan dengan mounting manual mount /dev/sda1 /media/mycache

hasil:

root@ProxyLAB-15-88:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb2 283605632 1241556 267934636 1% /
none 4 0 4 0% /sys/fs/cgroup
udev 2005992 4 2005988 1% /dev
tmpfs 403348 732 402616 1% /run
none 5120 0 5120 0% /run/lock
none 2016732 0 2016732 0% /run/shm
none 102400 0 102400 0% /run/user
/dev/sdb1 523248 3428 519820 1% /boot/efi
/dev/sda1 240234136 60564 227947264 1% /media/mycache

apabila ingin membuat HDD sda di mounting automatis maka buat scrip berikut di /etc/fstab

/dev/sda1 /media/mycache ext4 defaults 0 2

Selesai

kunjungi artikel dan jurnal penelitian mahasiswa dosen di http://eprints.binadarma.ac.id

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *


[+] kaskus emoticons nartzco