แค่เว็บๆหนึ่ง ! ที่อยากเก็บประสบการณ์
Home
 

เพิ่ม HDD ใหม่ใน Linux

HDD เพื่อทำ Backup

[root@www root]# fdisk -l

Disk /dev/hdc: 255 heads, 63 sectors, 9729 cylinders
Units = cylinders of 16065 * 512 bytes

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

Disk /dev/hda: 255 heads, 63 sectors, 2434 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2303 18498816 83 Linux
/dev/hda2 2304 2434 1052257+ 82 Linux swap

[root@www root]# fdisk /dev/hdd

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): 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 ลบ patition ที่มีอยู่ออกให้หมด
n สร้าง patition ใหม่เอาอันเดียวก็พอ
ตอนสร้างนี่ กด p นะ
w บันทึกแล้ว ก็ออกมา

จากนั้น Format มันให้เป็น ext3

[root@www root]# mkfs -t ext3 -c /dev/hdd1

น่าจะได้แล้ว แต่ต้อง Mount มันขึ้นมาดิ

[root@www root]# mkdir /mnt/hdd

[root@mail root]# mount -t ext3 /dev/hdd1 /mnt/hdd

[root@mail root]#vi /etc/rc.local
เพิ่ม

mount -t ext3 /dev/hdd1 /mnt/hdd

น่าจะได้แล้วน่ะ จะลอง Reboot ดูครับ
[root@mail root]#reboot

Off 

February 25, 2012 This post was written by Categories: เรื่องเล่ารายวัน No comments yet


Top