= 2009-07-20 = * [http://jjhou.csdn.net/jjtbooks-thinking-in-java-2e.htm 《Thinking in Java》2e 中文版] * [公務] Hadoop 實驗平台加裝 1.5T 硬碟,並測試設定 LVM2 {{{ ~# apt-get install lvm2 ~# cat /proc/partition major minor #blocks name 8 0 160836480 sda 8 1 159180021 sda1 8 3 1654695 sda3 8 16 312571224 sdb 8 17 312568641 sdb1 8 32 1465138584 sdc ~# cfdisk /dev/sdc ~# cat /proc/partition major minor #blocks name 8 0 160836480 sda 8 1 159180021 sda1 8 3 1654695 sda3 8 16 312571224 sdb 8 17 312568641 sdb1 8 32 1465138584 sdc 8 33 1465136001 sdc1 ~# pvcreate /dev/sdc1 ~# pvdisplay --- Physical volume --- PV Name /dev/sdc1 VG Name hadoop PV Size 1.36 TB / not usable 897.00 KB Allocatable yes (but full) PE Size (KByte) 4096 Total PE 357699 Free PE 0 Allocated PE 357699 PV UUID zW4cyi-1jKf-zug9-FcnG-ReVd-82W2-WGdwFP ~# vgcreate hadoop /dev/sdc1 ~# vgdisplay --- Volume group --- VG Name hadoop System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 2 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 1.36 TB PE Size 4.00 MB Total PE 357699 <====== 等一下會用到這個數字 Alloc PE / Size 357699 / 1.36 TB Free PE / Size 0 / 0 VG UUID PTdhAu-cGBn-ZoWh-hL9u-MQ0F-enKT-DOcEtC ~# lvcreate -l 357699 -n hadoop-home hadoop ~# lvdisplay --- Logical volume --- LV Name /dev/hadoop/hadoop-home <======= LVM2 裝置的路徑 VG Name hadoop LV UUID 0C1hUa-QVJW-mAGL-ygtu-DoIL-6Cmi-viGZ8k LV Write Access read/write LV Status available # open 0 LV Size 1.36 TB Current LE 357699 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:0 ~# mkfs.ext3 /dev/hadoop/hadoop-home ~# mount /dev/hadoop/hadoop-home /mnt/ ~# }}} == LVM == * [http://linux.vbird.org/linux_basic/0420quota.php#lvm 鳥哥的 Linux 私房菜 - 關於 LVM 的部分] * [http://www.howtoforge.com/linux_lvm A Beginner's Guide To LVM] * [http://www.howtoforge.com/logical-volume-manager-how-can-i-extend-a-volume-group Logical Volume Manager: How can I extend a Volume Group?] * [http://www.howtoforge.com/how-to-resize-lvm-software-raid1-partitions-shrink-and-grow How To Resize LVM Software RAID1 Partitions (Shrink & Grow)] == High Availability == * [http://www.howtoforge.com/getting-high-with-lenny Getting High With Lenny] - 在 Lenny 上打造 HA 的環境 == Virtualization == * [http://www.howtoforge.com/kvm-and-openvz-virtualization-and-cloud-computing-with-proxmox-ve KVM & OpenVZ Virtualization And Cloud Computing With Proxmox VE]