'2015/01'에 해당되는 글 1건

  1. 2015.01.15 리눅스 LVM 볼륨 확장

[root@v3w210 ~]# fdisk -u /dev/xvdb;
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 5221.
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)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First sector (63-83886079, default 63):
Using default value 63
Last sector or +size or +sizeM or +sizeK (63-83886079, default 83886079):
Using default value 83886079

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.


mkfs.ext3 /dev/xvdb1;
pvcreate /dev/xvdb1;
vgs;
vgextend VolGroup00 /dev/xvdb1;
lvextend -l +100%FREE /dev/mapper/VolGroup00-LogVol00;
df -h;
resize2fs /dev/mapper/VolGroup00-LogVol00;
df -h;


reboot

Posted by 호랭이~