- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - Linux
- >
- System Administration
- >
- How to shrink filesystem in Red Hat Linux
-
- Forums
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- OEM Solutions
- Servers: The Right Compute
- Shifting to Software-Defined
- Telecom IQ
- Transforming IT
- Infrastructure Solutions German
- L’Avenir de l’IT
- IT e Trasformazione Digitale
- Enterprise Topics
- ИТ для нового стиля бизнеса
- Blogs
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Forums
-
Blogs
-
InformationEnglish
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-07-2011 05:05 AM
06-07-2011 05:05 AM
How to shrink filesystem in Red Hat Linux
I want to shrink the /(root) filesystem.
Can someone explain I to shrink a filesystem on a virtual machine?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-07-2011 07:22 AM
06-07-2011 07:22 AM
Re: How to shrink filesystem in Red Hat Linux
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-07-2011 07:23 AM
06-07-2011 07:23 AM
Re: How to shrink filesystem in Red Hat Linux
*On-line* shrinking of a filesystem (type ext2 or ext3) is not possible on RHEL 5.x.
If the filesystem is offline (not mounted), then you can use resize2fs to reduce it. But a root filesystem cannot be unmounted while the system is running, so you must boot from some alternative boot media to shrink the filesystem.
After the filesystem has been shrunk, the next step will be to shrink the LV or partition the filesystem is located in.
*Be very careful! Do not shrink the LV/partition any more than you've actually shrunk the filesystem!*
If you're using LVM, this step is easy to do with the "lvreduce" command, and can be done while the RHEL 5 OS is running, assuming that the filesystem shrinking step was correctly performed.
But if you're using traditional partitions, you need to use fdisk or similar partition table editor. This may be easiest to do while using the alternate boot media: if you resize the root partition of the OS you're currently running, a reboot (or the "partprobe" command) may be required to make the system see the updated partition table.
MK
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-07-2011 07:24 AM
06-07-2011 07:24 AM
Re: How to shrink filesystem in Red Hat Linux
I guess you can try booting in rescue mode and od the resize from there.
OR:
www.mondorescue.org
Use mondorescue to backup OS and Restore rsizing your partitions.
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2019 Hewlett Packard Enterprise Development LP