Plaivid Enterprise Storage Architecture and Configuration Document
Quick Guide for Professionals: If you only require executable commands, please refer to the Quick Reference section at the end of the document.
This document has been compiled based on Enterprise standards for the Plaivid virtualization environment and PVM infrastructure. The objective is the provisioning and management of storage space for use in the virtualization environment, including creating RAID, configuring LVM, and presenting the storage to PVM.
In PVM architecture, after creating a Volume Group (VG), there is no need to create filesystems such as ext4 or perform Mount operations to utilize it as Storage. In this architecture, the Volume Group is introduced directly to PVM in the Storage Manager section as Storage of type volume group, and storage space management is handled by PVM itself.
Subsequently, virtual machine disks on this Storage are created and managed as Logical Volume (LV); such that each virtual machine disk will have a corresponding LV in the Volume Group.
In case the storage space requires a File System, the method for creating and preparing the ext4 filesystem is also provided in this document so that the storage space can be used as a regular filesystem.
Important Note: This guide is written for storages that are already RAIDed (whether hardware or software) but have not yet been partitioned, formatted, or mounted at the operating system level. The objective is to connect these spaces to the server in a standard and secure manner for storing Plaivid virtual machine data as well as Backups.
Why is this document important?
Before anything else, we must understand why we cannot simply give a raw disk to the server and use it.
When a new disk (whether physical or RAIDed) is connected to the server, the operating system only sees a "piece of hardware"; something like an empty warehouse with no doors or windows. To be able to store anything inside this warehouse, we need a chain of tasks.
Simple Problem Analysis:
Imagine you have bought a vacant lot (Raw RAIDed Disk). To prepare it in the Plaivid / PVM environment, you must:
- Prepare the basic structure of the disk if needed (Partitioning)
- Convert the storage space into a flexible and manageable structure (LVM)
- Introduce the created space as a Volume Group (VG) directly to PVM; in this state, there is no need to create a File System or Mount it.
- PVM creates and manages virtual machine disks on this Storage as Logical Volume (LV).
- If the storage space is needed as a filesystem, you can create ext4 on the desired space and Mount it.
Without each of these stages, the disk is unusable for the operating system and for Plaivid.
Mental Map: Architectural Overview
Before entering the details, we must have a complete mental map. This map tells you "where you are on the path" at each stage.
Key Point: Each layer only communicates with the layer above and below it. If a problem occurs in one layer, the upper layers will not work. This principle is the basis of troubleshooting.
Basic Concepts
In this section, we explain each concept with three levels: Simple → Example → Technical.
What is Storage?
In Simple Terms: Storage means "any place where we keep data". Like a warehouse for files.
Tangible Example: Your laptop hard drive, USB flash drive, camera memory card; all are storage. In an Enterprise server, storage is usually several disks combined as one larger and safer unit (RAID).
From a Technical View: In Linux, every storage device appears as a Block Device in the path /dev/; for example, /dev/sda, /dev/sdb, /dev/nvme0n1.
What is RAID and why is it important?
In Simple Terms: RAID means "combining multiple disks so that speed increases, or if one disk fails, data is not lost".
| RAID Level | Role | Redundancy | Application |
|---|---|---|---|
| RAID 0 | Speed only | None | Test / Non-sensitive environment |
| RAID 1 | Mirror | Yes | OS Disk |
| RAID 5 | Stripe + Parity | Tolerates 1 disk | General Storage |
| RAID 6 | Stripe + Double Parity | Tolerates 2 disks | Large Storage |
| RAID 10 | Mirror + Stripe | High | Sensitive DataStore / DB |
From a Technical View: In HPE servers, RAID is managed by the Smart Array Controller and the management tool is ssacli. RAID is performed at the hardware level, and the operating system only sees an integrated Logical Drive (like /dev/sdb).
Important: This document assumes RAID has already been built. We only verify the RAID, not build it.
What is a Partition?
In Simple Terms: Partition means "dividing a large disk into smaller parts". Like dividing a large apartment into several rooms.
Tangible Example: A 10TB disk can be divided into one 10TB partition (the whole disk) or several partitions like 2TB + 3TB + 5TB.
From a Technical View: There are two main types of partition tables:
- MBR (Old): Max 2TB, max 4 Primary partitions.
- GPT (Modern): Supports disks larger than 2TB, up to 128 partitions, Enterprise standard.
In an Enterprise environment, we always choose GPT. Because RAID disks are almost always larger than 2TB.
What is LVM and why is it critical?
In Simple Terms: LVM means a layer of "flexibility" between the disk and the filesystem. With its help, you can increase or decrease storage space without losing data.
Tangible Example: Assume you have a room that is full. Without LVM, you have to move everything to make the room bigger. With LVM, you just push a wall forward and the room gets bigger — without touching the items inside.
Three Levels of LVM:
What is a Filesystem (ext4)?
In Simple Terms: A Filesystem is a set of structures and rules that manage how files and folders are stored, organized, and accessed on storage space.
Why ext4?
- A stable, mature, and widely used filesystem in Linux and Enterprise environments.
- Supports large files and storage spaces.
- Has Journaling capability which reduces the probability of filesystem inconsistency and corruption after sudden power loss or shutdown by logging filesystem changes.
- For scenarios such as DataStore and BackupStore, if a filesystem is required, it is considered a suitable and common option.
Note on PVM Architecture: For Volume Group based Storage in PVM, creating ext4 and performing Mount operations are not mandatory; the VG is managed directly by PVM as Storage. Using ext4 is relevant when the storage space is intended to be used as a regular File System.
What is Mounting?
In Simple Terms: Mount means "connecting a storage space to a folder in the operating system". After mounting, whatever you write in that folder is actually stored on that disk.
Example: If we mount the LV on /plaivid/datastore, any file that Plaivid creates in this path is actually stored on the RAID disk.
Critical Note: Temporary mounting disappears after reboot. For permanent mounting, it must be registered in the /etc/fstab file.
At this stage, you should be able to explain:
- What is the difference between Partition and LVM?
- Why is partitioning alone not enough?
- Why does permanent mounting require fstab?
Prerequisites (Before Action)
Before starting, check these items:
| # | Prerequisite | Why is it important? |
|---|---|---|
| 1 | root or sudo access | All commands require high privileges |
| 2 | Install tools: parted, lvm2, e2fsprogs, ssacli | Main tools of this document |
| 3 | Verify healthy RAID | Installing on broken RAID = disaster |
| 4 | Target disk must be empty | No important data on the disk |
| 5 | Backup of fstab | Preventing boot failure in case of error |
Identifying Disks and Checking RAID
Important Principle: Before any action, we must ensure we are working on the "correct disk".
Displaying all connected disks
lsblk
lsblk -f
fdisk -l
Sample output of lsblk:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 480G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 479G 0 part /
sdb 8:16 0 10T 0 disk ← Raw RAID disk without partition
Output Interpretation:
sdais the operating system disk (has partition, is mounted).sdbis our target RAID disk: Has no partitions, is not mounted. This is what we must prepare.
Critical Warning: Before any operation, precisely note the name of the target disk. Executing a command on the wrong disk = Total data loss.
Checking RAID with ssacli
Objective: Ensure that the disk /dev/sdb is actually a healthy RAID Logical Drive.
# 1. List controllers
ssacli controller all show status
# 2. Display Logical Drives
ssacli controller slot=0 ld all show
# 3. Full details
ssacli controller slot=0 ld all show detail
# 4. Check physical disks
ssacli controller slot=0 pd all show status
Sample output:
Smart Array P408i-a in Slot 0
Controller Status: OK
Cache Status: OK
Battery/Capacitor Status: OK
Array A
logicaldrive 1 (10.0 TB, RAID 5, OK) ← Array status is healthy
Interpretation: If all statuses are OK, the RAID is healthy and we can continue. If you see Failed, Rebuilding, or Degraded, stop and fix the RAID problem first.
| Status | Meaning | Action |
|---|---|---|
OK | Healthy | Continue |
Rebuilding | Rebuilding | Wait until finished |
Degraded | One disk failed, RAID still works | Replace disk |
Failed | RAID is broken | Recover before any work |
- Do you know the exact name of the target disk? (e.g.,
/dev/sdb) - Have you confirmed the RAID is healthy?
- Have you confirmed the disk is empty?
If the answer to all three is "Yes", proceed.
Partitioning (Two Methods)
In this section, we review two methods: parted and fdisk. Choose only one of these two — both yield the same result.
Why two methods?
| Tool | Pros | Cons | Suitable for |
|---|---|---|---|
parted | Modern, Script-friendly, fast | Syntax differs from old tools | Automation, Enterprise environment |
fdisk | Interactive, familiar, default in all distros | Requires more skill for scripting | Individuals familiar with traditional tools |
Recommendation: In Plaivid, we prefer parted because it performs better in Automation. However, fdisk is also excellent for better understanding.
Method 1 — Partitioning with parted
# 1. Create GPT partition table
parted /dev/sdb mklabel gpt
# 2. Create partition (100% of whole disk)
parted /dev/sdb mkpart primary 0% 100%
# 3. Activate LVM flag
parted /dev/sdb set 1 lvm on
# 4. Verify structure
parted /dev/sdb print
Command Explanation:
mklabel gpt: Creates a GPT type partition table.mkpart primary 0% 100%: Creates a Primary partition that takes the whole disk. Using0%and100%ensures the partition is aligned (best performance).set 1 lvm on: Activates the LVM flag on partition 1 so LVM detects it.
Method 2 — Partitioning with fdisk
fdisk is interactive. Run the following command:
fdisk /dev/sdb
Inside the fdisk environment, enter these letters in order:
g: Create GPT partition tablen: New partition1: Partition numberEnter: Start sector (default)Enter: End sector (whole disk)t: Change partition type31: Select Linux LVM code in GPTp: Display for confirmationw: Write and exit
In modern fdisk (util-linux), the Linux LVM type number in GPT is 31. If you don't know the number, type L in the t prompt to see the full list.
Verifying Partition
lsblk /dev/sdb
partprobe /dev/sdb # Notify kernel
Sample output:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sdb 8:16 0 10T 0 disk
└─sdb1 8:17 0 10T 0 part ← Partition ready for LVM
``>
<Callout type="success" title="Partitioning Checkpoint">
Partition `/dev/sdb1` should be visible in the output of `lsblk`.
</Callout>
## Building LVM Architecture
It has three stages: **PV → VG → LV**. Each stage depends on the previous one.
### Creating Physical Volume (PV)
```bash
pvcreate /dev/sdb1
pvs # Display summary
pvdisplay /dev/sdb1 # Display details
Creating Volume Group (VG)
Naming Convention: We use vg_datastore for DataStore and vg_backupstore for BackupStore.
vgcreate vg_datastore /dev/sdb1
vgs
vgdisplay vg_datastore
After creating the Volume Group (VG), in the scenario of using LVM-based Storage in PVM, the main Storage structure is ready and the VG can be introduced directly in Storage Manager as Storage of type volume group. Therefore, to prepare Storage for use in PVM, continuing LVM stages such as manual LV creation is not mandatory; PVM manages virtual machine disks as LV.
If your goal is to become more familiar with the LVM structure and manual management of Logical Volume (LV), or if the storage space is intended to be used as a File System, you can read the subsequent sections of the document.
If File System Creation is Required
From this point onwards, you can continue if you need to create a file system.
Creating Logical Volume (LV)
lvcreate -l 100%FREE -n lv_datastore vg_datastore
lvs
lvdisplay /dev/vg_datastore/lv_datastore
Parameter Explanation:
-l 100%FREE: Use all free space of the VG.-n lv_datastore: Name of the Logical Volume.- Final output path:
/dev/vg_datastore/lv_datastore
Why 100%FREE? In the Plaivid environment, usually one VG is used for a specific purpose (DataStore or BackupStore), so it makes sense for all space to be in one LV. If you want to create multiple LVs, use -L 500G (e.g., 500 Gigabytes).
The output of lvs should display your LV with the correct size.
Formatting with ext4
Now the LV is ready, but it is not yet "writable" because it lacks a filesystem.
mkfs.ext4 -L datastore /dev/vg_datastore/lv_datastore
Explanation:
-L datastore: We give a Label to the filesystem (useful for identification).- Formatting on LVs is fast (a few seconds to minutes depending on size).
Getting UUID (for fstab):
blkid /dev/vg_datastore/lv_datastore
Sample output:
/dev/vg_datastore/lv_datastore: LABEL="datastore" UUID="a1b2c3d4-5678-90ab-cdef-1234567890ab" TYPE="ext4"
``>
Copy this UUID — you will need it in the next section.
<Callout type="info">
**From a Technical View:** UUID is a unique identifier for the filesystem that never changes. Using UUID instead of `/dev/sdX` ensures that even if the order of disks changes in the system (e.g., after hardware replacement), Mounting will still work correctly.
</Callout>
## Mounting (Temporary and Permanent)
### Creating Mount Point
```bash
mkdir -p /plaivid/datastore
Temporary Mount (Test)
mount /dev/vg_datastore/lv_datastore /plaivid/datastore
df -hT | grep datastore
If the corresponding line is seen with type ext4 and correct size, the test was successful. For temporary removal:
umount /plaivid/datastore
Permanent Mount via fstab
Before any change to fstab, definitely take a backup.
cp /etc/fstab /etc/fstab.bak.$(date +%F)
Adding entry to fstab:
Edit the file /etc/fstab and add the following line to the end of it:
UUID=a1b2c3d4-5678-90ab-cdef-1234567890ab /plaivid/datastore ext4 defaults,nofail 0 2
Column Explanation:
| Column | Value | Description |
|---|---|---|
| 1 — Device | UUID=... | Unique identifier of the filesystem |
| 2 — Mount Point | /plaivid/datastore | Mount path |
| 3 — Type | ext4 | Filesystem type |
| 4 — Options | defaults,nofail | Mount options |
| 5 — Dump | 0 | Backup by dump (disabled) |
| 6 — fsck | 2 | Order of fsck check during boot |
Why nofail? If someday this disk is unavailable, the operating system will still boot (prevents boot loop). Very important for DataStore and BackupStore.
Testing fstab before reboot (Critical):
findmnt --verify --verbose
mount -a
df -hT | grep datastore
Critical Warning: If you reboot the server without testing and the fstab entry is incorrect, the system might come up in emergency mode. Always test with mount -a and findmnt --verify.
Final Testing
Before handing over to Plaivid, perform these tests:
# 1. Check free space
df -hT /plaivid/datastore
# 2. Write test (100MB)
dd if=/dev/zero of=/plaivid/datastore/testfile bs=1M count=100
# 3. Clean up test file
rm -f /plaivid/datastore/testfile
# 4. Reboot test (recommended)
reboot
# After server comes up:
df -hT | grep datastore
BackupStore Scenario
Difference from DataStore: BackupStore is the location for keeping backup copies. The steps are exactly the same as DataStore, just with different names.
Standard Naming Table:
| Item | DataStore | BackupStore |
|---|---|---|
| VG Name | vg_datastore | vg_backupstore |
| LV Name | lv_datastore | lv_backupstore |
| Mount Point | /plaivid/datastore | /plaivid/backupstore |
| Label | datastore | backupstore |
| Speed Priority | High (VM Live) | Medium |
| Recommended RAID | RAID 10 | RAID 5 or 6 |
BackupStore Commands Summary (Assumption: disk /dev/sdc):
parted /dev/sdc mklabel gpt
parted /dev/sdc mkpart primary 0% 100%
parted /dev/sdc set 1 lvm on
pvcreate /dev/sdc1
vgcreate vg_backupstore /dev/sdc1
lvcreate -l 100%FREE -n lv_backupstore vg_backupstore
mkfs.ext4 -L backupstore /dev/vg_backupstore/lv_backupstore
mkdir -p /plaivid/backupstore
blkid /dev/vg_backupstore/lv_backupstore
# Add UUID in /etc/fstab, then:
mount -a
df -hT | grep backupstore
Troubleshooting (Diagnostic Thinking)
Golden Rule of Troubleshooting: Move from bottom to top. If there is a problem with Mounting, the root might be in LVM, Partition, or even RAID.
Common Scenarios
| Symptom | Probable Cause | Solution |
|---|---|---|
Disk not in lsblk | Broken RAID / Empty Slot | ssacli controller slot=0 pd all show |
| Partition not created | Old partition table | wipefs -a /dev/sdX then try again |
pvcreate says device busy | Old LVM mapping | dmsetup remove_all then try again |
| No Mount after reboot | Error in fstab | journalctl -xe + findmnt --verify |
| Emergency mode after reboot | Wrong fstab | Enter with mount -o remount,rw / and fix fstab |
mount says "wrong fs type" | Filesystem corrupted or not formatted | Check blkid, run e2fsck |
Key Troubleshooting Commands
journalctl -xe # System logs
dmesg | grep -i -E 'sd|error' # Kernel logs
e2fsck -f /dev/vg_datastore/lv_datastore # Check filesystem
vgchange -ay # Activate VG
findmnt --verify --verbose # Test fstab
ssacli controller slot=0 ld all show detail # Check RAID details
Emergency Mode: How to rescue wrong fstab?
If the server entered emergency mode due to a fstab error, execute the following commands:
# 1. Remount root partition as writable
mount -o remount,rw /
# 2. Restore fstab backup file
cp /etc/fstab.bak.YYYY-MM-DD /etc/fstab
# 3. Reboot system
systemctl reboot
Best Practices
- Always UUID, not
/dev/sdX: Disk order may change. UUID is unique and stable. - Use
nofailin fstab: Prevents boot failure if disk is inaccessible. - Semantic Naming:
vg_datastoreis better thanvg_data. Names should indicate the purpose. - Backup fstab: Before any change:
cp /etc/fstab /etc/fstab.bak.$(date +%F) - Test before reboot: Always run
mount -aandfindmnt --verifybefore rebooting. - RAID Monitoring: Weekly check with
ssacli ctrl all show statusto gauge disk health.
Common Mistakes
Mistake: Formatting disk directly without Partition and LVM.
Why it's wrong: In the future, expansion (Extend) will not be possible. Everything must be rebuilt.
Correct Way: Always use the chain Partition → PV → VG → LV → FS.
Mistake: Entering /dev/sdb1 in fstab.
Why it's wrong: With changing disk order, Mount will break.
Correct Way: Use UUID.
Future Storage Expansion (Bonus)
One of the biggest advantages of LVM: Expansion without Downtime. If a new disk is added in the future, it can easily be added to the VG.
# 1. Prepare new disk (e.g., /dev/sdd)
parted -s /dev/sdd mklabel gpt
parted -s /dev/sdd mkpart primary 0% 100%
parted -s /dev/sdd set 1 lvm on
pvcreate /dev/sdd1
# 2. Add to existing VG
vgextend vg_datastore /dev/sdd1
# 3. Expand LV to all new space
lvextend -l +100%FREE /dev/vg_datastore/lv_datastore
# 4. Expand filesystem (without unmount!)
resize2fs /dev/vg_datastore/lv_datastore
# 5. Verify
df -hT /plaivid/datastore
Magic of LVM: This entire operation is performed without interrupting the Plaivid service. VMs are still running, and in the end, the new space becomes available to Plaivid.
Teach-Back Questions (Comprehension Assessment)
If you can answer these questions, you have truly learned the concept:
- Why do we always use LVM in Enterprise instead of simple partitioning?
- If after a server reboot, Mounting doesn't work and the disk is not in
lsblk, where do you start? - Explain the difference between PV, VG, and LV with a daily life example.
- Why do we use UUID in fstab and not
/dev/sdb1? - If a RAID disk is in
Degradedmode, are you allowed to partition it? Why? - If you want to double the DataStore space without shutting down the server, what steps do you take?
- Why is the
nofailoption critical for DataStore in fstab but not for/?
Challenging Scenario
Scenario:
A colleague tells you:
"The Plaivid server did not come up after Reboot and entered Emergency Mode. To mount a disk, I had added an entry for
/dev/sdb1in/etc/fstabbecause the UUID was too long."
Questions:
- What is the root cause of the problem?
- How do you rescue the server?
- What recommendation do you make to prevent recurrence of this problem?
Configuration Analysis:
Using /dev/sdb1 in the /etc/fstab file, without using UUID and the nofail option, can cause two serious problems during the Boot process:
-
Dependency on Device Naming: The disk detection order may change, and consequently, the path
/dev/sdb1may no longer point to the desired disk or may not exist at all. -
Boot Disruption: In case of disk unavailability,
systemdmay detect the Mount as failed and enter Emergency Mode.
Recovery Path:
In the event of this situation, one can enter the system via Emergency Mode, re-mount the Root filesystem as rw, restore the fstab backup, and then Reboot the system.
Operational Recommendation:
To prevent dependency on device name and reduce the risk of Boot disruption, using UUID for disk identification and the nofail option for non-critical Mounts is recommended.
Quick Reference — Quick Reference for Professionals
If you are familiar with LVM, partitioning, and fstab concepts and are only looking for quick execution, this section is for you. All commands in execution order at a glance.
Changeable Variables
| Variable | Default Value | Description |
|---|---|---|
<DISK> | /dev/sdb | Target RAID disk |
<VG> | vg_datastore | Volume Group Name |
<LV> | lv_datastore | Logical Volume Name |
<MOUNT> | /plaivid/datastore | Mount Path |
<LABEL> | datastore | Filesystem Label |
Full Execution Checklist
# ── 0. Pre-flight ──────────────────────────────
ssacli controller slot=0 ld all show # RAID health
lsblk # confirm target disk
cp /etc/fstab /etc/fstab.bak.$(date +%F) # backup fstab
# ── 1. Partition (GPT + LVM flag) ──────────────
parted -s /dev/sdb mklabel gpt
parted -s /dev/sdb mkpart primary 0% 100%
parted -s /dev/sdb set 1 lvm on
partprobe /dev/sdb
# ── 2. LVM stack ───────────────────────────────
pvcreate /dev/sdb1
vgcreate vg_datastore /dev/sdb1
lvcreate -l 100%FREE -n lv_datastore vg_datastore
# ── 3. Filesystem ──────────────────────────────
mkfs.ext4 -L datastore /dev/vg_datastore/lv_datastore
# ── 4. Mount point + fstab (UUID-based) ────────
mkdir -p /plaivid/datastore
UUID=$(blkid -s UUID -o value /dev/vg_datastore/lv_datastore)
echo "UUID=$UUID /plaivid/datastore ext4 defaults,nofail 0 2" >> /etc/fstab
# ── 5. Verify BEFORE reboot ────────────────────
findmnt --verify --verbose
mount -a
df -hT | grep datastore
Quick Validation Checklist
After execution, confirm these four items:
- Output of
lsblkshows partitionsdb1. - Output of
vgsandlvsshows VG and LV with correct size. - Output of
df -hTdisplays the Mount path with typeext4and correct size. - Output of
findmnt --verifyis error-free.
Summary
- Storage Layer Structure: Strictly observing the chain order (RAID → Partition → LVM → FS → Mount) is mandatory to guarantee the stability of the operating system and Plaivid.
- Difference in PVM Architecture: To introduce Storage to PVM, creating a Volume Group (VG) is sufficient, and there is no need for
ext4format orMounton that same layer manually. - Configuration Security: Always use UUID and the
nofailexpression in the/etc/fstabfile, and accept its validity before rebooting withfindmnt --verifyandmount -a. - Online Flexibility: Thanks to the LVM layer, you can expand virtual machine storage space in the future without service downtime (Downtime).