- 浏览: 1304753 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (351)
- Java General (37)
- .net General (2)
- Linux Toy (55)
- Oracle (81)
- Mysql (11)
- Programer Career (12)
- Oh, my living ! (2)
- Shell Script (8)
- Web Service (0)
- Linux Server (22)
- Php/Python/Perl (3P) (2)
- Javascript General (5)
- Saleforce Apex Dev (2)
- Web General (5)
- Xen & VM tech. (17)
- PSP (13)
- OpenSolaris (34)
- php (1)
- RAI/flex/action script (16)
- asterisk/CTI (7)
- 交互设计 (6)
- English (3)
- Lucene (1)
最新评论
-
GuolinLee:
markmark
JVM调优总结 -Xms -Xmx -Xmn -Xss -
di1984HIT:
写的太好啊。
JVM调优总结 -Xms -Xmx -Xmn -Xss -
javajdbc:
javajdbc 写道
JVM调优总结 -Xms -Xmx -Xmn -Xss -
javajdbc:
...
JVM调优总结 -Xms -Xmx -Xmn -Xss -
alvin198761:
非常感谢,国外的被封杀了,你这里还有一份
How to Convert An Image-Based Guest To An LVM-Based Guest
今天,不得不面对lvm了,毕竞是公司用的.
================================================================= 创建LVM 1、首先,我们要先创建新磁盘分区 #fdisk /dev/hda 2、激活刚创建好的分区 #partprobe
1、创建1个500MB分区(hda12),然后在fdisk命令下输入t,选择刚创建好的分区,输入8e,将刚创建好的分区转换为8e格式。输入w保存退出 #fdisk /dev/had 总结LVM几个高级命令:lvchange、vgexport/vgimport、vgcfgbackup/vgcfgrestore =============================================================== |
----
So you have an LVM based file system that needs extended? Now a days this can be done pretty quickly with a few commands. The following will walk you through a basic online resize of an ext3 and reiserfs based filesystem. Keep in mind, if you’re dealing with critical production data of any type, you probably should resize those offline, and during a scheduled maintenance window as a safety measure.
#df -k /mnt/test
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/testvg-test
2097084 1760768 336316 84% /mnt/test
When resizing volumes, you have to keep in mind that the file system also has to be made aware of the new volume size. A common misconception is that you can resize the LVM device and the file system will automatically grow with it, not the case in ext3 and reiserfs that I’m aware of.
The test volume we’re messing with is nearly full, so we will add another 1GB to this. We’ll start off first by extending the logical volume using the ‘lvextend’ command.
#lvextend
Please specify either size or extents (not both)
lvextend: Add space to a logical volumelvextend
[-A|--autobackup y|n]
[--alloc AllocationPolicy]
[-d|--debug]
[-h|--help]
[-i|--stripes Stripes [-I|--stripesize StripeSize]]
{-l|–extents [+]LogicalExtentsNumber[%{VG|FREE}] |
-L|–size [+]LogicalVolumeSize[kKmMgGtTpPeE]}
[-m|--mirrors Mirrors]
[-n|--nofsck]
[-r|--resizefs]
[-t|--test]
[--type VolumeType]
[-v|--verbose]
[--version]
LogicalVolume[Path] [ PhysicalVolumePath... ]#lvextend -L+1G /dev/testvg/test
Extending logical volume test to 3.00 GB
Logical volume test successfully resized
#lvs /dev/testvg/test
LV VG Attr LSize Origin Snap% Move Log Copy%
test testvg -wi-ao 3.00G
#
#df -h /mnt/test
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/testvg-test
2.0G 1.7G 329M 84% /mnt/test
#
Note the file system size remains at 2GB. Once the logical volume is extended, we will have to figure out what type of file system this is. You can run the following to determine this:
#mount | grep /mnt/test
/dev/mapper/testvg-test on /mnt/test type reiserfs (rw)
So we’re dealing with reiserfs.
It may also be smart to run an fsck at this point, depending on whether or not you can take the volume offline. Since this is test data, I’ll ignore the fsck and go ahead and resize the file system while it’s online. For reiserfs, this is done using the ‘resize_reiserfs’ command. You can either specify the size of let the command figure it out, and grow to the full extent of the volume. I’ll let it figure it out.
#resize_reiserfs /dev/testvg/test
resize_reiserfs 3.6.19 (2003 www.namesys.com)resize_reiserfs: On-line resizing finished successfully.
#df -h /mnt/test/
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/testvg-test
3.0G 1.7G 1.4G 56% /mnt/test
#
That’s it… Pretty tough huh?
Now for ext3, we’ll use the same volume.
#df -h /mnt/test
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/testvg-test
2.0G 68M 1.9G 4% /mnt/test
#mount | grep /mnt/test
/dev/mapper/testvg-test on /mnt/test type ext3 (rw)
#
#lvextend -L+1G /dev/testvg/test
Extending logical volume test to 3.00 GB
Logical volume test successfully resized
#!df
df -h /mnt/test
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/testvg-test
2.0G 68M 1.9G 4% /mnt/test
#
You’ll resize ext3 using the ‘resize2fs’ command as shown. Pretty similar to reiserfs.
#resize2fs
resize2fs 1.40.2 (12-Jul-2007)
Usage: resize2fs [-d debug_flags] [-f] [-F] [-p] device [new_size]#resize2fs /dev/testvg/test
resize2fs 1.40.2 (12-Jul-2007)
Filesystem at /dev/testvg/test is mounted on /mnt/test; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/testvg/test to 786432 (4k) blocks.
The filesystem on /dev/testvg/test is now 786432 blocks long.#!df
df -h /mnt/test
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/testvg-test
3.0G 68M 2.8G 3% /mnt/test
#
发表评论
-
Cygwin 中 xwin 的启动参数
2010-11-20 14:21 2706不知为何现在装的cygwin xwin没有startxwin ... -
三种数据库,取随机记录的方法
2010-09-16 12:23 1199mysql:select * from tablename o ... -
用 grep 恢复误删的文本文件
2010-08-26 14:34 1981作为长期的电脑使用者,肯定会有误删文件的经历,在 Mac ... -
使用TELNET手工操作 SMTP/POP 收发邮件
2010-08-09 21:44 2423说明:手工录入的用蓝色字体表示,#后的为注释,不可录入。= ... -
关于 port forward 的一个实例
2010-07-07 09:25 1550tomcat 服务于 8080端口,但不想在前面加 apach ... -
ubuntu 半虚拟化domU的安装方法
2010-06-05 21:12 2459ubuntu还没有通过http://方法安装,不像redh ... -
mount 硬盘镜像的一般问题。
2010-06-01 12:33 25461. 要搞清楚文件是 是由整个分区来的,还是整个硬盘来的 ... -
通过 ulimit 改善系统性能
2010-05-22 09:07 1335http://www.ibm.com/developer ... -
mencoder来提取电影mp3文件
2009-12-16 21:45 2023假如在欣赏电影过程中出现了一段美妙的插曲(特别是印度电影,一般 ... -
netcat usage sample
2009-11-28 18:33 1256This page documents various t ... -
dd 建立一个没有内容的大文件
2009-11-22 09:36 1952dd if=/dev/zero of=sparse-file ... -
Mounting a filesystem located on a partition of an image of a disk
2009-10-24 17:52 1595Mou ... -
将光盘镜像CentOS-5.3-i386-bin-DVD.iso设置成为yum源
2009-09-28 07:43 3691#mkdir /centos5.3.dvd (随便起个文件夹名 ... -
拷贝指定的文件出来但保持目录结构
2009-09-18 08:39 3039抽取当前目录以下的所有logo1.* 或 logo2.* 到 ... -
定制 bt4 frefinal live cd ( ubuntu)
2009-08-21 10:01 2572Customising the BackTrack 4 Pre ... -
linux 下查看 iso 文件信息
2009-08-21 09:55 2239root@feng-desktop:/media/sda5/i ... -
copy file over ssh with tar
2009-08-15 08:57 1417tar is usually used for achiv ... -
copy file using cpio
2009-08-11 17:38 1444http://bradthemad.org/tech/note ... -
copy file using tar
2009-08-11 17:22 1163We assume /source/dir is a file ... -
VLC webcam 准实时视频
2008-10-28 23:19 2387#!/bin/bash file=/root/video_$( ...
相关推荐
详细的LVM学习笔记,我自己一步步实现,记录下来的。
LVM管理操作笔记 很珍贵的培训资料,内部培训防止泄露
自己写的lvm和raid笔记,总结很比较全面(个人认为)。推荐下载
LVM(Logical volume manager)实验笔记。通过该实验,更加清楚LVM逻辑卷管理的原理。
基于RHEL5下LVM逻辑卷管理实验笔记
与可用的命令行选项相比,它的功能有一些限制。 例如,尚未在api中实现对物理卷和逻辑卷的调整大小。 尽管如此,仍计划在不久的将来做出贡献。 这是使用LVM 2.2进行测试的第一个版本,请在下面的链接中或通过电子...
逻辑卷管理通过将底层物理硬盘抽象封装起来,以逻辑卷的形式表现给上层系统,逻辑卷的大小可以动态调整,而且 ... 使用 LVM 的步骤: a. 物理硬盘格式化为 PV(物理卷),底层空间被分做每个4M大小的PE。
RHCE课程-RH131Linux管理笔记七-Linux分区,格式化,SWAP,LVM,软件RAID的创建 12月27日课程 8、自动挂载和NIS服务器及客户端配置 9、软件RIDE及XEN虚拟机 RHCE课程-RH131Linux管理笔记八-安装和管理XEN虚拟机 1月...
linux全套学习笔记_博雅运维,适合linux初学者,包含用户管理,进程管理,分区管理,vim,磁盘阵列,LVM逻辑卷,dns,ftp,nfs,samba,dhcp,apache,mysql,php,nginx,iptables,selinux,lamp,lnmp架构,phpmyadmin,...
LVM项目| 鞋子销售网站(在线商店) 这是一个封闭的项目,由客户的订单创建。 适用德国版权法规。 什么是LVM网站? 该网站提供用于转售的服装产品(鞋)。 由于这个原因,在这个项目中, 应该创建一个醒目醒目的...
本人在redhat linux 5上的学习笔记,动态增加硬盘、格式化、增加新分区到LVM下的Raid分区、分区故障模拟和替换、给分区扩容等 给同样的菜鸟和有需要的朋友,如有不正确的地方请大家指点
这是Oracle提供的一个卷管理器,用于替代操作系统所提供的LVM,它不仅支持单实例配置,也支持RAC这样的多实例配置。将给Oracle数据库管理员带来极大的方便,ASM可以自动管理磁盘组,并提供数据冗余和优化。特别是...
在不需要的 HV 上检查激活的 LVM 逻辑卷,寻找恶意 LV。 (如果你使用 clvm 它会显示误报) 检查不存在的 VM 的逻辑卷,寻找幻影 LV。用法安装节点 main.js笔记Hypervisor 列表是从 OpenNebula 自动加载的,如果...
2、Linux LVM逻辑卷管理 3、Linux 软RAID创建和维护 4、Quota磁盘限额 5、RedHat 5.4 RHCE YUM学习笔记 6、RHCE-253 Apache服务常规配置 7、RHCE-253 Apache服务高级配置 8、RHCE-253 DHCP服务配置 9、RHCE-253 DNS...
centos7 应用笔记: systemd-analyze 分析开机过程 centos7 是使用 systemd 管理服务的。 如果 开机很慢。可以使用 systemd-analyze 分析开机过程。 使用 systemd-analyze 分析开机过程 # 打印耗时的服务 systemd-...
Linux LVM逻辑卷管理.pdf 3. Linux 软RAID创建和维护.pdf 4. Quota磁盘限额.pdf 5. RedHat 5.4 RHCE YUM学习笔记.pdf 6. RHCE-253 Apache服务常规配置.pdf 7. RHCE-253 Apache服务高级配置.pdf 8. RHCE-253 ...
笔记Linux LINUX记事本 LVM常规 快照和恢复过程 在此过程中,将快照复制到逻辑卷之一以继续更新操作系统,如果出现问题,将对其进行还原。 概述 准备创建快照 可选查看内容 逆转 编辑菜单Grub 返回盘 准备创建...