11-17-2009
From your wording I gather you do have a file system inside that logical volume. Does your system have OnlineJFS? Then you could shrink the filesystem first with fsadm -b, followed by lvreduce.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi, there are tons of RAID1 tutorials, but none of them deal with lvm. The problem is that I want to expand my current lvm partition over RAID1 rather than creating a new lvm partition after RAID1 is created.
My master harddrive has lvm partition. I'm wondering how to create a RAID1 image of... (1 Reply)
Discussion started by: onthetopo
1 Replies
2. Red Hat
Hi All,
How do I create /var as LVM type during install? I want my new OS to have /var as LVM so that I could extend it on the fly.
Thanks for any comment you may add. (2 Replies)
Discussion started by: itik
2 Replies
3. AIX
i have os 5.1 and i do mirror with hdisk0 and hdisk1 on rootvg
at the end i get error in mail that:
At least one partition mirror is broken please call sysadmin
hd5 boot 1 2 2 closed/stale N/A
the other fs seems ok and sync
what to do about the hd5??? (4 Replies)
Discussion started by: amitt74
4 Replies
4. UNIX for Dummies Questions & Answers
Hi Guys,
I m using redhat 6, I have installed root partition as non-LVM .
Is there any way i can convert it to LVM? (1 Reply)
Discussion started by: pinga123
1 Replies
5. Red Hat
I wanted to know how we can combine volumes over 2 physical drives.
# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 ... (16 Replies)
Discussion started by: ikn3
16 Replies
6. 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
7. Red Hat
Hello All,
I have a Red Hat Linux 5.9 Server installed with one hard disk & 2 Partitions created on it as follows,
/boot - Linux Partition & another is
LVM - One VG & under that 5-6 Logical volumes(var,opt,home etc).
Here my requirement is to take out 1GB of space from LVM ( Any logical... (5 Replies)
Discussion started by: gr8_usk
5 Replies
8. UNIX for Dummies Questions & Answers
Please suggest me how do I create LVM snapshots in linux.
Best regards,
Vishal (5 Replies)
Discussion started by: admin_db
5 Replies
9. UNIX for Dummies Questions & Answers
Oracle Linux 6.6
To create Physical Volumes for Volume groups (LVM) , the disk need to be partitioned to LVM type ie. 'Linux LVM' type . In fdisk , this can done by choosing 8e when prompted for partition type.
Since it is easy to script (non-interactive), I use parted command rather than... (1 Reply)
Discussion started by: John K
1 Replies
10. Red Hat
Hi All,
I have one logical volume with size as 900G and it is mounted as xfs file system.
Now I want to reduce this partition to 500G.
So I followed the below steps.
unmount the mount point /home
Reduced the volume using the command
Now I remounted the partition.
But the problem... (3 Replies)
Discussion started by: kalpeer
3 Replies
LEARN ABOUT MOJAVE
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.
--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.
-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 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 substraction is rounded downward, for
the absolute size it is rounded upward.
-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.
-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.95(2) (2012-03-06) LVREDUCE(8)