首页
登录 | 注册

reduce filesystem on rhel

For this article, assume that the file system in question is 1GB mounted at /data on the logical volume /dev/vg0/LV. This file system needs to be reduced by 100MB, bringing it down to 900MB. Note: there must be enough free space on the file system to reduce it. If the file system is at 99% full, this may not work or may cause unrecoverable data loss.

 

Begin by unmounting the file system:

 



$ umount /data

 

Reduce the file system. Please note that this is done on /dev/vg0/LV. The number at the end is the final size of the filesystem, not the amount it is reduced by.

 



$ resize2fs /dev/vg0/LV 900M

 

The final logical volume shouldn't extend past the filesystem. Because the filesystem has been reduced by 100MB, the volume must also be reduced that amount:

 



$ lvreduce -L -105M /dev /vg0/LV -reduces the logical volume

 

Mount the filesystem and run df to verify the change was made.

 

WARNING: Reducing LVM can cause a catastrophe which could result in data loss. Plan and act accordingly. ALWAYS create backups!


相关文章

  • 摘自: http://bbs.chinaunix.net/thread-3764201-1-1.html 找到java的路径 # which java /bin/java # file /bin/java /bin/java: symbol ...
  • Hadoop集群完全分布式模式环境部署
    Hadoop简介         Hadoop是Apache软件基金会旗下的一个开源分布式计算平台.以Hadoop分布式文件系统(HDFS,Hadoop Distributed Filesystem)和MapReduce(Google Ma ...
  • MapReduce默认输出是在单个reduce中以key排序的,多个reduce输出之间是不排序的, 所谓全排序,就是指多个reduce之间的输出是有序的. 实现全排序有三种方法: 1.  使用一个reduce进行输出 MapReduce ...
  • Hadoop-2.8.0分布式安装手册
    Hadoop-2.8.0分布式安装手册.pdf 目录 目录 1 1. 前言 3 2. 特性介绍 3 3. 部署 5 3.1. 机器列表 5 3.2. 主机名 5 3.2.1. 临时修改主机名 6 3.2.2. 永久修改主机名 6 3.3.  ...
  • Hadoop-2.7.2分布式安装手册
    Hadoop-2.7.2分布式安装手册.pdf 目录 目录 1 1. 前言 3 2. 特性介绍 3 3. 部署 5 3.1. 机器列表 5 3.2. 主机名 5 3.2.1. 临时修改主机名 6 3.2.2. 永久修改主机名 6 3.3.  ...
  • ypdomainname此命令的适用范围:RedHat.RHEL.Ubuntu.CentOS.SUSE.openSUSE.Fedora.1ypdomainname [-v] 2选项 --help --version -v   .实例     ...

2020 unjeep.com webmaster#unjeep.com
12 q. 0.013 s.
京ICP备10005923号