Sponsored Content
Full Discussion: LVM resize
Operating Systems Linux Red Hat LVM resize Post 302954359 by rbatte1 on Monday 7th of September 2015 08:19:08 AM
Old 09-07-2015
I would always use the -r flag on lvreduce and get the filesystem reduction AND logical volume reduction done in one step. I'm not familiar with vfat, so it might not apply. You would at least need to specify the type though as RudiC says.

Using the -r flag does the whole process, i.e. unmounts, reduces FS & LV and re-mounts, so:-
Code:
# umout /lvm (mount point)
# e2fsck -f /dev/vgname/lvname
# resize2fs /dev/vgname/lvname 100M (Say from 200M)
# lvreduce -L 100M /dev/vgname/lvname

becomes just:-
Code:
# lvreduce -t vfat -L 100M -r /dev/vgname/lvname


I hope that this helps,
Robin
This User Gave Thanks to rbatte1 For This Post:
 

10 More Discussions You Might Find Interesting

1. AIX

resize fs

Hello everyone I need to resize a filesystem /home I want to add 200mb and I have space on the disk with lsvg rootvg command I check this but I cant because has a mirror. Do you know some way that I can do this. Thanks in advance (1 Reply)
Discussion started by: lo-lp-kl
1 Replies

2. UNIX for Advanced & Expert Users

resize filesystems

Dear All We have HP9000 rp7400 Server running with hp-ux 11i. Our Disk storage has two volume groups and are allocated as follows: 1. /#vgdisplay -v --- Volume groups --- VG Name /dev/vg00 VG Write Access read/write VG Status available... (1 Reply)
Discussion started by: mhbd
1 Replies

3. Filesystems, Disks and Memory

how to resize a file

hello every body. in a little bit of a jam here.if you all happen to know how to resize the tmp file in my linux system. I use a sabayon 3.5 on a x86 machine. itried to make a dvd image copy but the system gives me a error message telling me the temporary folder used to make images is too small.... (3 Replies)
Discussion started by: dvas83
3 Replies

4. HP-UX

How to reduce LVM to create another LVM

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. Shell Programming and Scripting

resize

Hello, I created a script that runs perfectly on 2 different account but I it will not run in 2 others (HP-UX). I noticed that the problem is caused by the resize command in the .profile of the problematic accounts. Since it is a prod server, I dont want to remove it witout knowing what it is... (4 Replies)
Discussion started by: drbiloukos
4 Replies

6. UNIX for Dummies Questions & Answers

How to convert non LVM root partition to LVM?

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

7. HP-UX

Resize volume

Dear All, We have HP Unix 11.31. We have two VG, VG01 and VG02. In VG01 there are three mount point each of 100gb size. There is no data on below mount point /soft/01 /soft/02 /soft/03Is it possible to resize each of these mount point to 50 GB. So 150 GB will free and release from... (2 Replies)
Discussion started by: bhattnirav
2 Replies

8. Shell Programming and Scripting

resize images

Is there a script or extension that I can look into that will re-size an allotment of images to a given size?? Id like to take images of a certain size and resize them but Im dont remember an install option that can do it if installed in ubuntu but I, also unsure in what code I will have to learn.... (2 Replies)
Discussion started by: graphicsman
2 Replies

9. AIX

Resize Lun

Good afternoon! Help with a solution I have AIX 7.1 works through vios I expanded Lun that it is necessary to make that aix saw this change and to expand the section lvm Sorry for my English (1 Reply)
Discussion started by: iformats
1 Replies

10. Solaris

Resize rpool

Hi, I have rpool about 500G. So i want to use 210G from rpool and assign mount point as /database. I seek in google and couldn't found it. Does anyone know how to achieve it? Thanks. (2 Replies)
Discussion started by: mzainal
2 Replies
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] [-f|--force] [-h|--help] {-l|--extents [-]LogicalExtentsNumber| -L|--size [-]LogicalVolume- Size[kKmMgGtT]} [-v|--verbose] LogicalVolumePath 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 the (eg) filesystem on the volume is resized running lvreduce so that the extents that are to be removed are not in use. If the filesystem is ext2 then you can use the e2fsadm(8) command to both resize the filesystem and the logical volume together. Shrinking snapshot logical volumes (see lvcreate(8) for information to create snapshots) is supported as well. OPTIONS -A, --autobackup y/n Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ). Default is yes. -d, --debug Enables additional debugging output (if compiled with DEBUG). -f, --force Force size reduction without any question. -h, --help Print a usage message on standard output and exit successfully. -l, --extents [-]LogicalExtentsNumber 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 will be taken as an absolute size. -L, --size [-]LogicalVolumeSize[kKmMgGtT] Reduce or set the logical volume size in units of megabyte by default. A size suffix of k for kilobyte, m for megabyte, g for giga- byte or t for terabyte is optional. With the - sign the value will be subtracted from the logical volume's actual size and without it the will be taken as an absolute size. -v, --verbose Gives verbose runtime information about lvreduce's activities. Example "lvreduce -l -3 /dev/vg00/lvol1" reduces the size of logical volume lvol1 in volume group vg00 by 3 logical extents. DIAGNOSTICS
lvreduce returns an exit code of 0 for success and > 0 for error: 1 no logical volume name on command line 2 invalid logical volume name 3 logical volume is not active 4 logical volume doesn't exist 5 error reading VGDA 6 error getting index of logical volume 7 new size of logical volume not smaller than old one 8 error setting VGDA up for reduce 9 error reducing logical volume in kernel 10 error writing VGDA to physical volume(s) 11 error getting index for read/write statistic transfer 12 error getting status of logical volume from kernel 13 error setting up copy on write exception table 95 driver/module not in kernel 96 invalid I/O protocol version 97 error locking logical volume manager 98 invalid lvmtab (run vgscan(8)) 99 invalid command line ENVIRONMENT VARIABLES
LVM_AUTOBACKUP If this variable is set to "no" then the automatic backup of VG metadata is turned off. LVM_VG_MAX_BACKUPS This variable determins the backup history depth of kept VGDA copy files in /etc/lvmconf. It can be set to a positive number between 0 and 999. The higher this number is the more steps are you able to backup with vgcfgrestore(8) from the changes you make to your volume groups. LVM_VG_NAME The default Volume Group Name to use. Setting this variable enables you to enter just the Logical Volume Name rather than its com- plete path. See also lvm(8), lvcreate(8), lvextend(8), lvchange(8), e2fsadm(8) AUTHOR
Heinz Mauelshagen <Linux-LVM@Sistina.com> Heinz Mauelshagen LVM TOOLS LVREDUCE(8)
All times are GMT -4. The time now is 10:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy