08-25-2016
Would it be possible on RHEL 7 with the
-r flag of
lvreduce? I've used this lots on RHEL 6, though never with XFS
Quote:
-r, --resizefsResize underlying filesystem together with the logical volume using fsadm(8).
You probably have a filesystem that thinks it is larger than the LV it is on and will get IO errors if you try to write beyond the LV. The above should work on the filesystem information so that it matches the logical volume.
I hope that this helps,
Robin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HPUX 11iv2 #!/bin/sh
Hi all. I have a script that results in the creation of an ascii file which is ultimately emailed out to several people. The email wraps each line so I would like to reduce the font size of the ascii file. I looked at nroff and also tr but it wasn't clear to me how to do... (2 Replies)
Discussion started by: lyoncc
2 Replies
2. Red Hat
Hiya,
Is there a known method from converting LVM data to VxVM data..
ie we have a load of local and SAN (HPDM) mounts on RHEL 4u5/5u1 servers which are now required to be clustered with SFS (VxFS,VxVM,CFS,VCS etc)
I've come across the vxvmconvert, but thought that was HP-UX only?
Many... (0 Replies)
Discussion started by: itsupplies
0 Replies
3. Filesystems, Disks and Memory
Hiya,
Is there a known method from converting LVM data to VxVM data..
ie we have a load of local and SAN (HPDM) mounts on RHEL 4u5/5u1 servers which are now required to be clustered with SFS (VxFS,VxVM,CFS,VCS etc)
I've come across the vxvmconvert, but thought that was HP-UX only?
Many... (3 Replies)
Discussion started by: itsupplies
3 Replies
4. HP-UX
Hi,
I'm new to HP-UX.
I have LVM on /var with 92Gig. I would like to reduce it to create another LVM for Oracle client with 800 meg or so. How to do it. I'm running 11.iv3
Thanks (4 Replies)
Discussion started by: lamoul
4 Replies
5. Solaris
I'm trying to reduce hard drive size (number of cylinders) in SPARC Solaris. Its easy to change last cylinder of last slice, but that cannot be done for slice2/backupslice because it insists on whole disk. If I try to change disk type/geometry, all slices get replaced with some 'default'... (1 Reply)
Discussion started by: orange47
1 Replies
6. UNIX for Dummies Questions & Answers
My volume group of size 200 gb.
out of which only 100 gb is used by 2 logical volumes /dev/vg00/lvol0 and /dev/vg00/lvol0 respectively (both are 50 gb each).
Whenever i use vgreduce command to reduce the size of volume group i get below error.
# vgreduce vg00 -a
Physical volume... (16 Replies)
Discussion started by: pinga123
16 Replies
7. Linux
Hello,
I have install 2 HDD in my server and now installing the Centos6.4.
I want create the LVM of those 2 HDD's so while i'm doing this it is not allowing me to select these 2 disk's from allowable disk list.
Same problem if i tried to make Software RAID with creating LVM.
Please help. (1 Reply)
Discussion started by: purushottamaher
1 Replies
8. Red Hat
Hi,
inode size reached its 100% in /var
Due to this i'am getting the error No space left on device
my crond process is stopped and when i want to restart it
it is showing the below error
Starting crond: crond: can't open or create /var/run/crond.pid: No space left on device
df -i o/p
... (3 Replies)
Discussion started by: Mohamed Thamim
3 Replies
9. Linux
Hello,
I am trying to convert a single-drive Centos 7.2 installation with LVM into a two-disk mdadm mirror with mrrored LVM. I was able to follow the excellent instructions at:
http://www.dgoradia.com/creating-a-raid1-mirrored-on-an-existing-centos-on-lvm/and did create a two-disk mirror... (1 Reply)
Discussion started by: Clovis_Sangrail
1 Replies
10. UNIX for Advanced & Expert Users
All,
We have a physical server (Lenovo 3950) that we need to upgrade the OS from RHEL 6 to RHEL 7. We do not want to do an in-place upgrade but rather start with a fresh OS install. The plan is to remove the two local drives (Raid 1) and install two new drives for the fresh RHEL 7 install. ... (4 Replies)
Discussion started by: hburnswell
4 Replies
LEARN ABOUT CENTOS
lvreduce
LVREDUCE(8) System Manager's Manual LVREDUCE(8)
NAME
lvreduce - reduce the size of a logical volume
SYNOPSIS
lvreduce [-A|--autobackup {y|n}] [-d|--debug] [-h|--help] [-t|--test] [-v|--verbose] [--version] [-f|--force] [--noudevsync] {-l|--extents
[-]LogicalExtentsNumber[%{VG|LV|FREE|ORIGIN}] | [-L|--size [-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]} [-n|--nofsck] [-r|--resizefs] Logi-
calVolume{Name|Path}
DESCRIPTION
lvreduce allows you to reduce the size of a logical volume. Be careful when reducing a logical volume's size, because data in the reduced
part is lost!!!
You should therefore ensure that any filesystem on the volume is resized before running lvreduce so that the extents that are to be removed
are not in use.
Shrinking snapshot logical volumes (see lvcreate(8) for information to create snapshots) is supported as well. But to change the number of
copies in a mirrored logical volume use lvconvert(8).
Sizes will be rounded if necessary - for example, the volume size must be an exact number of extents and the size of a striped segment must
be a multiple of the number of stripes.
OPTIONS
See lvm(8) for common options.
-f, --force
Force size reduction without prompting even when it may cause data loss.
-l, --extents [-]LogicalExtentsNumber[%{VG|LV|FREE|ORIGIN}]
Reduce or set the logical volume size in units of logical extents. With the - sign the value will be subtracted from the logical
volume's actual size and without it the value will be taken as an absolute size. The total number of physical extents freed will be
greater than this logical value if, for example, the volume is mirrored. The number can also be expressed as a percentage of the
total space in the Volume Group with the suffix %VG, relative to the existing size of the Logical Volume with the suffix %LV, as a
percentage of the remaining free space in the Volume Group with the suffix %FREE, or (for a snapshot) as a percentage of the total
space in the Origin Logical Volume with the suffix %ORIGIN. The resulting value for the subtraction is rounded downward, for the
absolute size it is rounded upward. N.B. In a future release, when expressed as a percentage with VG or FREE, the number will be
treated as an approximate total number of physical extents to be freed (including extents used by any mirrors, for example). The
code may currently release more space than you might otherwise expect.
-L, --size [-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]
Reduce or set the logical volume size in units of megabytes. A size suffix of k for kilobyte, m for megabyte, g for gigabytes, t
for terabytes, p for petabytes or e for exabytes is optional. With the - sign the value will be subtracted from the logical vol-
ume's actual size and without it it will be taken as an absolute size.
-n, --nofsck
Do not perform fsck before resizing filesystem when filesystem requires it. You may need to use --force to proceed with this option.
--noudevsync
Disable udev synchronisation. The process will not wait for notification from udev. It will continue irrespective of any possible
udev processing in the background. You should only use this if udev is not running or has rules that ignore the devices LVM2 cre-
ates.
-r, --resizefs
Resize underlying filesystem together with the logical volume using fsadm(8).
Examples
Reduce the size of logical volume lvol1 in volume group vg00 by 3 logical extents:
lvreduce -l -3 vg00/lvol1
SEE ALSO
fsadm(8), lvchange(8), lvconvert(8), lvcreate(8), lvextend(8), lvm(8), lvresize(8), vgreduce(8)
Sistina Software UK LVM TOOLS 2.02.105(2)-RHEL7 (2014-03-26) LVREDUCE(8)