Linux - Phân vùg HDD
Hn có bạn hỏi chia lại phân vùg trong linux, hix, lâu ko làm, may có bản note này :(
1. Add thêm HDD
Trước hết cần xem có mấy HDD đã, dùng lệnh
fdisk -l
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1044 8281507+ 8e Linux LVM
Có 1 ổ SCSI, ok, h add thêm 1 ổ IDE
H thử xem nhé
Disk /dev/hda: 8589 MB, 8589934592 bytes
15 heads, 63 sectors/track, 17753 cylinders
Units = cylinders of 945 * 512 = 483840 bytes
Disk /dev/hda doesn't contain a valid partition table
2. Chia làm 2 primary 3G và 5G
H tiến hành chia ổ IED này
Lỗi rồi :((, làm lại
Disk /dev/hda: 8589 MB, 8589934592 bytes
15 heads, 63 sectors/track, 17753 cylinders
Units = cylinders of 945 * 512 = 483840 bytes
Device Boot Start End Blocks Id System
/dev/hda1 6351 16685 4883287+ 83 Linux
/dev/hda2 1 6350 3000343+ 83 Linux
3. Định dạng theo etx3
mkfs.ext3 /dev/hda1
mkfs.ext3 /dev/hda2
4. Mount 2 ổ mới vào /mnt/sales và /mnt/accouting
[root@dhcppc0 mnt]# mkdir sales
[root@dhcppc0 mnt]# mkdir accounting
Tạo điểm nối đã
H là mount
[root@dhcppc0 mnt]# mount /dev/hda1 /mnt/sales/
[root@dhcppc0 mnt]# mount /dev/hda2 /mnt/accounting/
5. Bật 2 ổ trên phải được tự động khi bật máy
Thêm vào /etc/fstab:
/dev/hda1 /mnt/sales ext3 auto,user,noexec 0 0
/dev/hda2 /mnt/accounting ext3 auto,user,noexec 0 0
------------------------------------------------------------
Thanks for reading
--------------------------------------------------------------------------
All my Lab:
Linux Lab -- window and Cisco Lab
to be continued - I will update more.
Nam Habach