标签归档:LVM

Extending a logical volume in a virtual machine running Red Hat or Cent OS

Purpose

This article provides steps for extending the root partition residing in a logical volume created with Logical Volume Manager (LVM) in a virtual machine running Red Hat/Cent OS.

继续阅读

Resizing the disk space on Ubuntu Server VMs running on VMware ESXi 5

Resizing the disk space on Ubuntu Server VMs running on VMware ESXi 5

We generally do both dedicated and VPS hosting for our websites, apps and some premium projects we run for others.When we choose to have VPS servers (aka virtual machines or VMs for short) instead of dedicated servers, we usually opt for VMware‘s free ESXi 5 and install Ubuntu Server as the OS for the VPSs we create on top of ESXi 5. It may not be as friendly as some VPS providers like Amazon, Rackspace etc. but you got more control and it’s on YOUR hardware (pretty important actually!)…

Now, when you build a VPS on VMware, you start with say 40GBs of hard disk space. You install the OS, setup the server, move the sites on this new server and you’re on. But what happens when there’s no more room on the server for your site or sites and you need to add more disk space?

继续阅读

LVM recovery tale

Over the weekend I had the worrying experience of losing my LVM settings and potentially all my data… a quick search on the web showed a confusing set of information, much of it for older versions of LVM and therefore rather suspect.

Well, I recovered all my data and it was really quite simple, so I’ve written up what I did in the hope that someone else, in a similar situation, will find it useful. It’s a scary thing, losing the whole hard disk and knowing that, in reality, its all there. 继续阅读

PC 上的 LVM 灾难修复

硬盘单碟容量的快速增长和价格快速下降,为普通 PC 提供了丰富的存储空间,也带来的存储管理的需求。对于缺少昂贵硬件支撑的普通 PC 用户,Linux 上的 LVM 是一个理想的选择。对服务器用户而言,LVM 可以构建在基于 Raid 的磁盘组上,通过硬件冗余实现容灾;对于普通 PC 用户来说,可能没有那么多银子来实施,那么我们就不得不面对各种各样的窘境,譬如逻辑卷损坏,磁盘坏道,硬盘位置更改,硬盘损坏等等。好在 LVM 的开发者在设计中就包含了这些考虑,提供了一系列的方法来帮助我们解决这些问题,把数据损失降到最低。本文结合实例,分析和解决 LVM 在实用中可能遇到的各种问题。 继续阅读

Linux系统下LVM扩充方法

将LINUX系统下的一个分区/dev/sda6划给linux的LVM使用,具体操作如下:

1.用 fdisk /dev/sda分区

2.pvcreate /dev/sda6

3.vgextend VolGroup00 /dev/sda6

4.lvextend -L +10G /dev/VolGroup/LogGroup02

5.e2fsck -f /dev/VolGroup/LogGroup02

6.resize2fs /dev/VolGroup/LogGroup02

这就好了,第6步是让扩展的空间生效,要不你会发现df后磁盘的空间并没有扩大。

Expanding a LVM logical volume

This tip explains how to expand an existing logical volume by adding a new new physical volume to a volume group through LVM. The e2fsprogs and lvm2 packages are required to follow these steps, but these packages are mandatory on systems that use ext2/ext3 on a LVM2 logical volume.

继续阅读

LVM使用手册

1 简介
1.1 什么是LVM?
LVM是 Logical Volume Manager(逻辑卷管理)的简写,它由Heinz Mauelshagen在Linux 2.4内核上实现,目前最新版本为:稳定版1.0.5,开发版 1.1.0-rc2,以及LVM2开发版。
与 传统的磁盘与分区相比,LVM为计算机提供了更高层次的磁盘存储。它使系统管理员可以更方便的为应用与用户分配存储空间。在LVM管理下的存储卷可以按需 要随时改变大小与移除(可能需对文件系统工具进行升级)。LVM也允许按用户组对存储卷进行管理,允许管理员用更直观的名称 (如”sales’、 ‘development’)代替物理磁盘名(如’sda’、’sdb’)来标识存储卷。  继续阅读