You are on page 1of 4

Mount Hard Disk Baru pada

Server Berbasis Linux


Ketika menambahkan hard disk pada server (khususnya Linux), anda perlu
format dan mount dulu agar hard disk tersebut bisa dikenali oleh server.
Nah, berikut adalah langkah-langkah lengkapnya:
1. Cek dulu apakah hard disk sudah terdeteksi. Caranya dengan
menjalankan perintah berikut di terminal anda:
fdisk -l
Apabila hard disk normal maka akan muncul partisi baru seperti contoh
berikut (hasil fdisk -l):
root@jagoan-K42JY:/home/jagoan# fdisk -l
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x7c12e647
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 190463999 95128576 7 HPFS/NTFS/exFAT
/dev/sda3 190466048 557555711 183544832 7 HPFS/NTFS/exFAT
/dev/sda4 557568016 625141759 33786872 5 Extended
/dev/sda5 557568018 565937819 4184901 82 Linux swap / Solaris
Partition 5 does not start on physical sector boundary.
/dev/sda6 565938176 625141759 29601792 83 Linux
Disk /dev/sdb: 5268 MB, 5268045824 bytes
163 heads, 62 sectors/track, 1018 cylinders, total 10289152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 000000000
Disk /dev/sdb doesnt contain a valid partition table
Pada hasil fdisk -l di atas, hard disk baru telah dikenali dengan partisi
/dev/sdb.

2. Setelah hard disk baru berhasil terdeteksi, sekarang create partisi baru
dengan perintah berikut
fdisk /dev/sdb
Maka akan muncul hasil berikut:
root@jagoan-K42JY:/home/jagoan# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF
disklabel
Building a new DOS disklabel with disk identifier 0xd75e15e1.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content wont be recoverable.
Warning: invalid flag 00000 of partition table 4 will be corrected by
w(rite)
Command (m for help):
Pilih m untuk melihat bantuan, atau langsung saja pilih n untuk create
partisi pada /dev/sdb
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Sekarang pilih p
Select (default p): p
Partition number (1-4, default 1):
Masukkan angka untuk jumlah partisi, misal 1. Lalu enter beberapa kali
sampai create berhasil:
Partition number (1-4, default 1): 1
First sector (2048-10289151, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-10289151, default
10289151):
Using default value 10289151
Command (m for help):
Sekarang pilih w untuk write/save partisi yang sudah di setting
sebelumnya

Command (m for help): w


The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
3. Cek partisi dengan fdisk -l maka akan muncul partisi baru /dev/sdb1
Disk /dev/sdb: 5268 MB, 5268045824 bytes
21 heads, 4 sectors/track, 122489 cylinders, total 10289152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd75e15e1
Device Boot Start End Blocks Id System
/dev/sdb1 2048 10289151 5143552 83 Linux
4. Setelah partisi baru terbentuk, sekarang ubah format partisi ke format
yang anda inginkan. Misal ext3 atau ext4. Gunakan command:
mkfs.ext4 /dev/sdb1
Maka format partisi akan berubah menjadi ext4, anda tinggal tunggu
beberapa saat hingga prosesnya selesai
root@jagoan-K42JY:/home/jagoan# mkfs.ext4 /dev/sdb1
mke2fs 1.42 (29-Nov-2011)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
321920 inodes, 1285888 blocks
64294 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1317011456
40 block groups
32768 blocks per group, 32768 fragments per group
8048 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

5. Setelah proses selesai, anda sudah bisa mount partisi baru. Tapi
sebelumnya anda harus create dulu folder tujuan mount dengan perintah
mkdir.
mkdir /xxxxx
mount /dev/sdb1 /xxxxx
6. Setelah mount berhasil, sekarang anda bisa cek dengan command
df -h
Jika sudah berhasil, akan muncul pesan berikut:
root@jagoan-K42JY:/home/jagoan# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 28G 25G 2.1G 93% /
udev 959M 4.0K 959M 1% /dev
tmpfs 387M 892K 386M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 967M 1.9M 965M 1% /run/shm
/dev/sdb1 4.9G 202M 4.5G 5% /xxxxx
Yang saya beri garisbawah berarti harddisk /dev/sdb1 telah berhasil
dimuat ke direktori /xxxxx. Jadi, selamat mencoba

You might also like