Solved

lvreduce in RHEL

Posted on 2014-03-28
5
474 Views
Last Modified: 2014-03-28
Recently  I have extended /tmp filesystem from 2GB to 10GB, While the system is up and running can I still run "lvreduce" to reduce it from 10GB to 2GB, When I run the command while the filessystem is mounted it is saying "THIS MAY DESTROY YOUR DATA". Is it mandatory that I need to unmounts the filesystem.

This is a production server and I will not be able to get an outage until next week, So is there a way to reduce the size without any outages.,...
0
Comment
Question by:aanya247
  • 3
5 Comments
 
LVL 21

Accepted Solution

by:
Mazdajai earned 500 total points
ID: 39961741
Not possible, you need to umount the file system to reduce a volume.
0
 
LVL 2

Expert Comment

by:smksa
ID: 39961775
Yes, it's not possible first need to unmount then it will be done.
0
 

Author Comment

by:aanya247
ID: 39962039
So what is the best way to reduce, If I have an outage, DOes booting into rescue mode or single user mode help me can someone guide me with the steps.
0
 
LVL 21

Assisted Solution

by:Mazdajai
Mazdajai earned 500 total points
ID: 39962054
you only need to be in rescue mode when dealing with root mount points. A proper way to would be -
1. back up the data
2. unmount the mount point
3. lvreduce with the reduce file system option or run resize2fs then lvreduve
4. remount
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39962669
I recommend using the resizefs option with lvreduce (or lvextend)

lvreduce -vr <lvm path>

Open in new window


Good luck and make sure you have back up!
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question