Menambah disk baru di OpenBSD

Disk baru: IDE SAMSUNG SV0411N 40GB

1. check dmesg

#dmesg |grep wd

wd0 at pciide0 channel 0 drive 0: < st310014a >
wd0: 16-sector PIO, LBA, 9767MB, 20003537 sectors
wd1 at pciide0 channel 0 drive 1: < samsung >
wd1: 16-sector PIO, LBA48, 38204MB, 78242976 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
wd1(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 5

wd0 : hdd system dimana OpenBSD diinstall

wd1 : hdd baru yang akan ditambahkan ke system

2. ok..menuju ke partisi disk

#fdisk -i wd1

akan muncul pertanyaan :
Do you wish to write new MBR and partition table? [n]

ketik : y enter


3. Buat table partisi

#disklabel -E wd1

kita akan dibawa ke simple editor jika perintah disklabel ditambahkan option -E

> p g
device: /dev/rwd1c
type: ESDI
disk: ESDI/IDE disk
label: SAMSUNG SV0411N
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total bytes: 37.3G
free bytes: 0.0G
rpm: 3600
16 partitions:
# size offset fstype [fsize bsize cpg]
a: 37.3G 0.0G 4.2BSD 2048 16384 16
c: 37.3G 0.0G unused 0 0

Keterangan perintah dalam simple editor :

p [spasi] [satuan] : menampilkan tabel partisi yang telah dibuat

[satuan m:megabytes g:gigabyte k:kilobyte b:byte]

a [spasi] [label partisi] : menambahkan table partisi

[label partisi] : a - p

d [spasi] [label partisi] : menghapus table partisi

e : edit parameter disk

q : keluar sekaligus menyimpan table partisi

Example :

menambahkan table satu table partisi dengan besar 30GB :

> a a
offset: [63]
size: [78236487] 30g
Rounding to cylinder: 62915265
FS type: [4.2BSD]
> q
Write new label?: [y]

4. Format table partisi :

#newfs wd1a

memformat table partisi a disk wd1 [harddisk baru]

/dev/rwd1a: 30720.3MB in 62915264 sectors of 512 bytes
152 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
super-block backups (for fsck -b #) at:
32, 414688, 829344, 1244000, 1658656, 2073312, 2487968, 2902624, 3317280, 3731936, 4146592, 4561248, 4975904, 5390560,
5805216, 6219872, 6634528, 7049184, 7463840, 7878496, 8293152, 8707808, 9122464, 9537120, 9951776, 10366432, 10781088,
11195744, 11610400, 12025056, 12439712, 12854368, 13269024, 13683680, 14098336, 14512992, 14927648, 15342304, 15756960,
16171616, 16586272, 17000928, 17415584, 17830240, 18244896, 18659552, 19074208, 19488864, 19903520, 20318176, 20732832,
21147488, 21562144, 21976800, 22391456, 22806112, 23220768, 23635424, 24050080, 24464736, 24879392, 25294048, 25708704,
26123360, 26538016, 26952672, 27367328, 27781984, 28196640, 28611296, 29025952, 29440608, 29855264, 30269920, 30684576,
31099232, 31513888, 31928544, 32343200, 32757856, 33172512, 33587168, 34001824, 34416480, 34831136, 35245792, 35660448,
36075104, 36489760, 36904416, 37319072, 37733728, 38148384, 38563040, 38977696, 39392352, 39807008, 40221664, 40636320,
41050976, 41465632, 41880288, 42294944, 42709600, 43124256, 43538912, 43953568, 44368224, 44782880, 45197536, 45612192,
46026848, 46441504, 46856160, 47270816, 47685472, 48100128, 48514784, 48929440, 49344096, 49758752, 50173408, 50588064,
51002720, 51417376, 51832032, 52246688, 52661344, 53076000, 53490656, 53905312, 54319968, 54734624, 55149280, 55563936,
55978592, 56393248, 56807904, 57222560, 57637216, 58051872, 58466528, 58881184, 59295840, 59710496, 60125152, 60539808,
60954464, 61369120, 61783776, 62198432, 62613088,

di atas adalah proses format wd1a

5. Mounting partisi baru

Buat direktori dimana partisi baru akan dimount

#mkdir /cache/

#mount /dev/wd1a /cache

Terakhir masukkan ke /etc/fstab :

#nano /etc/fstab

/dev/wd1a /cache ffs rw,nodev,nosuid 1 1

#reboot

Check kembali apakah partisi baru sudah otomatis dimounting ke /cache

#mount

/dev/wd1a on /cache type ffs (local, nodev, nosuid)

Finish sampe disini dulu, kalau ada pertanyaan & masukan lain silakan kirim comment!

thx.

moc.tenuajih@idubirt

Leave a Reply