LaGiPusHinGWitH ---- IT

Navigation

Home |

Categories

Monthly Archives

Most recent entries

Syndicate

Site Credits

Powered by:
ExpressionEngine

Design by:
BlogMoxie

Membuat Partisi dan File System Linux

Category: OS
Author: roninmorgue
Date: May, 03rd 2007
Location: Indonesia, Jakarta
Web: http://www.forum.mercubuana-it.org/

----------------------------------------

affected :

Tulisan saya ini diinspirasikan dari pengalaman dikantor, disaat
harddisk diserver sudah tidak lagi dapat menampung data backup pada
server database. Kemudian ditambahkan harddisk sebagai backup storage
pada server.

POC :

Sebelumnya HD tambahan tersebut merupakan HD yang sudah memiliki partisi
NTFS dan akan dijadikan partisi Linux, dan HD tersebut adalah IDE.

Sebelumnya perhatikan dahulu apakah HD terhubung ke Primary atau Secondary
dan sebagai master atau slave.
Ketentuannya sbb:
PM=hda, PS=hdb, SM=hdc, SS=hdd
bisa diperiksa dengan perintah “dmesg | more”, dan berhubung HD terkoneksi
sebagai Primary Slave, maka saya menggunakan hdb. Langkah-langkah:

1. Login sebagai root dari shell command.
2. Ketikkan fdisk /dev/hdb

[root@alt2007 sbin]# ./fdisk /dev/hdb

The number of cylinders for this disk is set to 9729.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):

3. Ketikkan m untuk mengetahui daftar perintah selengkapnya
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)

4. Ketikkan p untuk melihat partisi yang ada pada HD
Command (m for help): p

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb2 2 9729 78140160 f Win95 Ext’d (LBA)
/dev/hdb5 2 9729 78140128+ 7 HPFS/NTFS

5. Ketikkan d untuk menghapus partisi yang telah ada pada HD
Command (m for help): d
Partition number (1-5): 2

Command (m for help): d
Partition number (1-5): 5

6. Periksa partisi HD kembali
Command (m for help): p

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

terlihat bahwa HD tidak memiliki partisi.

7. Ketikkan n untuk memasukkan/membuat partisi pada HD

Command (m for help): n
Command action
e extended
p primary partition (1-4)

pilih ‘p’

Partition number (1-4): 1
First cylinder (1-9729, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-9729, default 9729):
Using default value 9729

8. Periksa kembali partisi pada HD

Command (m for help): p

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 9729 78148161 83 Linux

9. Lakukan penulisan partisi pada HD

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

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

10. Langkah berikutnya adalah membuat file system pada partisi HD

[root@alt2007 sbin]# ./mkfs /dev/hdb1
mke2fs 1.32 (09-Nov-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
9781248 inodes, 19537040 blocks
976852 blocks (5.00%) reserved for the super user
First data block=0
597 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@alt2007 sbin]#

11. Edit file /etc/fstab, tambahkan pada baris terakhir berikut:

[root@alt2007 sbin]# vi /etc/fstab

LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/sda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/hdb1 /mnt/hddtambahan ext2 defaults 1 1

12. Lakukan mounting untuk harddisk

[root@alt2007 ]# mount -a
mount: mount point /mnt/hddtambahan does not exist

jika ada pesan seperti diatas berarti anda belum membuat file mounting
buat terlebih dahulu dan lakukan mounting ulang:

[root@alt2007 ]# mkdir /mnt/hddtambahan
[root@alt2007 ]# mount -a
[root@alt2007 ]# cd /mnt/hddtambahan/
[root@alt2007 hddtambahan]# ls
lost+found

Sekarang HD sudah bisa digunakan untuk backup sementara. smile

PS : Thanx for admin/wawan yang sudah memberikan petunjuk dan key dalam
mengatasi kesulitan saya. Pokoknya kalau ada masalah lagi jangan
sungkan-sungkan untuk memberitahu yah.

------------------------------------------------------------

Shoutz:
~~~~~~
~ forum|staff (roninmorgue, darkstar, admin, qnoyyy, gaga, kalion,
WaferStick, newbie, cloud, acieis)
~ mercubuana-it@yahoogroups.com ,
~ x-code staff n members at yogya_family_code, ^family_code^,
---------------------------------------------------------------

Contact:
~~~~~~~~
roninmorgue || forum|staff
Homepage: http://www.forum.mercubuana-it.org/
email: roninmorgue[at]yahoo[dot]co[dot]id
anstellwinkel[at]yahoo[dot]com[dot]au
petambakudang[at]yahoo[dot]co[dot]id
---------------- [ EOF ] ----------------------------------------

Posted by roninmorgue on 08/25 at 01:28 AM
Computer Unix • (0) Comments • (127) TrackbacksPermalink

Name:

Email:

Location:

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?