Proxmox local lvm где
Перейти к содержимому

Proxmox local lvm где

  • автор:

whoa there, pardner!

Your request has been blocked due to a network policy.

Try logging in or creating an account here to get back to browsing.

If you’re running a script or application, please register or sign in with your developer credentials here. Additionally make sure your User-Agent is not empty and is something unique and descriptive and try again. if you’re supplying an alternate User-Agent string, try changing back to default as that can sometimes result in a block.

You can read Reddit’s Terms of Service here.

if you think that we’ve incorrectly blocked you or you would like to discuss easier ways to get the data you want, please file a ticket here.

when contacting us, please include your ip address which is: 178.132.111.61 and reddit account

Proxmox кластер. Хранилище local-lvm при добавлении к кластеру исчезло.

Добрый день. Думаю меня нужно направить куда то почитать. Спасибо за уделённое время!

Цель создать Кластер proxmox. Тренируюсь на двух нодах (pve02 pve13). В планах 7 боевых нод загнать в кластер.

-pve02 при установке исп. zfs RAID1 (1Tb+1Tb)

-pve13 при установке исп. LVM (так как диск 1)

1. Хранилище local-lvm на pve13, после присоединения pve13 к кластеру на pve02 исчезло. Появилось local-zfs — нерабочее конечно.

Хранилище local на pve13 то доступно, то нет.

cat /etc/pve/storage.cfg dir: local path /var/lib/vz content iso,vztmpl,backup zfspool: local-zfs pool rpool/data sparse content images,rootdir 

Как нужно поправить конфиг что бы видеть свои ранее созданные хранилища на кождой ноде? (Единого хранилища для всех НОД (NAS СХД) нет и не будет к сожалению, каждая нода будет хранить свои машины на своих винтах)

2. На нодах которые запланировал присоединить к кластеру уже есть контейнеры и ВМы. Есть возможность присоединить вместе с ними? (усложняется всё совпадающими CTID)

3. Для чего служит HA — сердечко. По какому принципу эта система работает?

4. Что еще нужно учесть при создании кластера?

Спасибо Вам за любое участие.

Еще вопрос: на pve02 создал RAID1 — zfs. Тестирую — выключаю 1 HDD. Перезапускаю — работает. Сообщений об отсутствии 1-ого HDD в RAID1 не вижу.

5. Как мониторить состояние RAID1 ?

6.Как добавить новый HDD в RAID1 в замен успорченного?

ishk0
08.02.18 14:46:58 MSK

2. Нет, сделай бекап и потом разверни
4. HA будет работать только с общим стораджем, запускать виртуалки если они потухли на живой ноде(в общем как настроишь)
5. Лучше отдельная сетка для кластера

Ien_Shepard ★★★
( 08.02.18 15:31:45 MSK )
Ответ на: комментарий от Ien_Shepard 08.02.18 15:31:45 MSK

Спасибо.

Остался главный вопрос с хранилищем.

Посмотрел storage.cfg на не присоединённых нодах

lvmthin: local-lvm thinpool data vgname pve content rootdir,images

Добавил в кластер — толку нет.

ishk0
( 08.02.18 15:43:24 MSK ) автор топика

pvvking ★★
( 08.02.18 19:26:41 MSK )
Ответ на: комментарий от pvvking 08.02.18 19:26:41 MSK

Вы правы.

Да. Я конечно же видел этот трактат. Вот ссылки на ту тему которая меня интересует:

Простите за не смышлённость, но я не вижу тут подсказки — как реализовать задуманное.

СХЕМА того построения, которое мне требуется.

Скриншот_проблемы — к pve13 приписывается local-zfx которого у него нет. И отсутствует loсal-lvm который у него был до присоединения в кластер. (закомменчины мои эксперименты)

Описание проблемы: Не могу каждой ноде назначить своё хранилище.

Спасибо за любую подсказку.

root@pve13:~# vgdisplay -v --- Volume group --- VG Name pve System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 27 VG Access read/write VG Status resizable MAX LV 0 Cur LV 3 Open LV 2 Max PV 0 Cur PV 1 Act PV 1 VG Size 931.26 GiB PE Size 4.00 MiB Total PE 238402 Alloc PE / Size 234359 / 915.46 GiB Free PE / Size 4043 / 15.79 GiB VG UUID 8KVtut-2ggY-rG13-fiWT-1g28-rzS9-tblxtw --- Logical volume --- LV Path /dev/pve/swap LV Name swap VG Name pve LV UUID vyZ7fQ-GHWQ-x90f-py3w-4JDc-sgIy-eXwA4S LV Write Access read/write LV Creation host, time proxmox, 2018-02-02 15:49:48 +0300 LV Status available # open 2 LV Size 8.00 GiB Current LE 2048 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Logical volume --- LV Path /dev/pve/root LV Name root VG Name pve LV UUID epp7P6-T7AQ-Zp47-sdqc-tDRe-SjBT-FqC8c7 LV Write Access read/write LV Creation host, time proxmox, 2018-02-02 15:49:48 +0300 LV Status available # open 1 LV Size 96.00 GiB Current LE 24576 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 --- Logical volume --- LV Name data VG Name pve LV UUID id1k8m-4T1r-Fmhf-b7lP-hmDe-eQ5K-FbOJWe LV Write Access read/write LV Creation host, time proxmox, 2018-02-02 15:49:49 +0300 LV Pool metadata data_tmeta LV Pool data data_tdata LV Status available # open 1 LV Size 811.26 GiB Allocated pool data 0.00% Allocated metadata 0.42% Current LE 207683 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:4 --- Physical volumes --- PV Name /dev/sda3 PV UUID lxDBHB-qoY5-C4B0-uOCC-MRNs-MF5I-6L74n2 PV Status allocatable Total PE / Free PE 238402 / 4043

Logical Volume Manager (LVM)

Most people install Proxmox VE directly on a local disk. The Proxmox VE installation CD offers several options for local disk management, and the current default setup uses LVM. The installer lets you select a single disk for such setup, and uses that disk as physical volume for the Volume Group (VG) pve . The following output is from a test installation using a small 8GB disk:

# pvs PV VG Fmt Attr PSize PFree /dev/sda3 pve lvm2 a-- 7.87g 876.00m # vgs VG #PV #LV #SN Attr VSize VFree pve 1 3 0 wz--n- 7.87g 876.00m

The installer allocates three Logical Volumes (LV) inside this VG:

# lvs LV VG Attr LSize Pool Origin Data% Meta% data pve twi-a-tz-- 4.38g 0.00 0.63 root pve -wi-ao---- 1.75g swap pve -wi-ao---- 896.00m

Formatted as ext4 , and contains the operating system.

This volume uses LVM-thin, and is used to store VM images. LVM-thin is preferable for this task, because it offers efficient support for snapshots and clones.

For Proxmox VE versions up to 4.1, the installer creates a standard logical volume called “data”, which is mounted at /var/lib/vz .

Starting from version 4.2, the logical volume “data” is a LVM-thin pool, used to store block based guest images, and /var/lib/vz is simply a directory on the root file system.

Hardware

We highly recommend to use a hardware RAID controller (with BBU) for such setups. This increases performance, provides redundancy, and make disk replacements easier (hot-pluggable).

LVM itself does not need any special hardware, and memory requirements are very low.

Bootloader

We install two boot loaders by default. The first partition contains the standard GRUB boot loader. The second partition is an EFI System Partition (ESP), which makes it possible to boot on EFI systems and to apply persistent firmware updates from the user space.

Creating a Volume Group

Let’s assume we have an empty disk /dev/sdb , onto which we want to create a volume group named “vmdata”.

Please note that the following commands will destroy all existing data on /dev/sdb .

First create a partition.

# sgdisk -N 1 /dev/sdb

Create a Physical Volume (PV) without confirmation and 250K metadatasize.

# pvcreate --metadatasize 250k -y -ff /dev/sdb1

Create a volume group named “vmdata” on /dev/sdb1

# vgcreate vmdata /dev/sdb1

Creating an extra LV for /var/lib/vz

This can be easily done by creating a new thin LV.

# lvcreate -n -V /

A real world example:

# lvcreate -n vz -V 10G pve/data

Now a filesystem must be created on the LV.

# mkfs.ext4 /dev/pve/vz

At last this has to be mounted.

be sure that /var/lib/vz is empty. On a default installation it’s not.

To make it always accessible add the following line in /etc/fstab .

# echo '/dev/pve/vz /var/lib/vz ext4 defaults 0 2' >> /etc/fstab

Resizing the thin pool

Resize the LV and the metadata pool with the following command:

# lvresize --size + --poolmetadatasize + /
When extending the data pool, the metadata pool must also be extended.

Create a LVM-thin pool

A thin pool has to be created on top of a volume group. How to create a volume group see Section LVM.

# lvcreate -L 80G -T -n vmstore vmdata

Storage: LVM Thin

LVM normally allocates blocks when you create a volume. LVM thin pools instead allocates blocks when they are written. This behaviour is called thin-provisioning, because volumes can be much larger than physically available space.

You can use the normal LVM command-line tools to manage and create LVM thin pools (see man lvmthin for details). Assuming you already have a LVM volume group called pve , the following commands create a new LVM thin pool (size 100G) called data :

lvcreate -L 100G -n data pve lvconvert --type thin-pool pve/data

Configuration

The LVM thin backend supports the common storage properties content , nodes , disable , and the following LVM specific properties:

LVM volume group name. This must point to an existing volume group.

The name of the LVM thin pool.

Configuration Example ( /etc/pve/storage.cfg )

lvmthin: local-lvm thinpool data vgname pve content rootdir,images

File naming conventions

The backend use basically the same naming conventions as the ZFS pool backend.

vm-- // normal VM images

Storage Features

LVM thin is a block storage, but fully supports snapshots and clones efficiently. New volumes are automatically initialized with zero.

It must be mentioned that LVM thin pools cannot be shared across multiple nodes, so you can only use them as local storage.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *