文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>reduce filesystem on rhel

reduce filesystem on rhel

时间:2010-04-06  来源:peixubin

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!

相关阅读 更多 +
排行榜 更多 +
超级冒险王安卓版

超级冒险王安卓版

休闲益智 下载
玩具小镇手机版

玩具小镇手机版

休闲益智 下载
这一关特上头手机版

这一关特上头手机版

休闲益智 下载