본문 바로가기

카테고리 없음

ucloud disk script only


[root@h002 ~]# fdisk -l

[root@h002 ~]# df -h

[root@h002 ~]# ls /dev/xv*

[root@h002 ~]# ls -alrt /dev/xv*

[root@h002 ~]# fdisk /dev/xvdb

Command (m for help): p

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-10443, default 1):      <-- Enter

Using default value 1

Last cylinder, +cylinders or +size{K,M,G} (1-10443, default 10443):  <-- Enter

Using default value 10443


Command (m for help): t

Selected partition 1

Hex code (type L to list codes): 8e

Changed system type of partition 1 to 8e (Linux LVM)


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.

Syncing disks.



[root@h002 ~]# fdisk -l
[root@h002 ~]# pvcreate /dev/xvdb1
 [root@h002 ~]# vgcreate DataVG /dev/xvdb1
[root@h002 ~]# vgdisplay
[root@h002 ~]# lvdisplay
[root@h002 ~]# lvcreate -L 80g -n data00 DataVG     // 숫자 80 과  00 임
[root@h002 ~]# lvcreate -l  20479 -n data00 DataVG
[root@h002 ~]# lvdisplay

[root@h002 ~]# df -h


[root@h002 ~]# fdisk -l
[root@h002 ~]# mkfs.ext4 /dev/DataVG/data00
[root@h002 ~]# mount /dev/DataVG/data00 /home/jacob/hdfs/

[root@h002 ~]# df -h

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       18G  2.9G   14G  18% /
tmpfs                 497M     0  497M   0% /dev/shm
/dev/xvda1            485M   52M  408M  12% /boot
/dev/mapper/DataVG-data00
                       79G  184M   75G   1% /home

[root@h002 ~]#
chmod   777   hdfs/
chown   jacob   hdfs/

[jacob@h001 hadoop]$ /etc/init.d/iptables stop