четверг, 11 ноября 2010 г.

Создаем новый LVM

создание раздела
fdisk /dev/hda
u
p
n


w
<перечитать диски>

~]# pvcreate /dev/hda4
Physical volume "/dev/hda4" successfully created

~]# pvdisplay
"/dev/hda4" is a new physical volume of "45.00 GB"
--- NEW Physical volume ---
PV Name /dev/hda4
VG Name
PV Size 45.00 GB
Allocatable NO
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID sY9uM2-qwt0-mR2w-0rMw-pRuh-bp4s-1fG1Ro

~]# vgcreate vg0 /dev/hda4
Volume group "vg0" successfully created

~]# lvcreate -v -L +20G vg0
Setting logging type to disk
Finding volume group "vg0"
Archiving volume group "vg0" metadata (seqno 1).
Creating logical volume lvol0
Creating volume group backup "/etc/lvm/backup/vg0" (seqno 2).
Found volume group "vg0"
visited lvol0
visited lvol0
Creating vg0-lvol0
Loading vg0-lvol0 table
Resuming vg0-lvol0 (253:0)
Clearing start of logical volume "lvol0"
Creating volume group backup "/etc/lvm/backup/vg0" (seqno 2).
Logical volume "lvol0" created

или mkfs
[root@centos ~]# mkfs.ext3 /dev/mapper/vg0-lvol0
mke2fs 1.39 (29-May-2006)

]# mount /dev/mapper/vg0-lvol0 /var1

Комментариев нет:

Отправить комментарий