10-01-2019
Hi,
On Centos 6.10 and RHEL 6.10 in the lvreduce there is also the -r, --resizefs switch. This would allow things to be done in a single command line.
Please note if the system is swapping/paging the command will possibly take along time.
It should also be noted that reducing the swap can be done to an absolute value or by a specific amount, please read the man page and if possible test to ensure you get the expected result.
Regards
Gull04
10 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
Had a issue recently where DB admins did:
mv listener.log listener.log.old
gzip listener.log.old
Where file listener.log is continually being written to by an oracle process.
Anyway, according to the DB admins they successfully created the
listener.log.old.gz
file (i.e. all went okay).... (4 Replies)
Discussion started by: apra143
4 Replies
2. Red Hat
Hi,
I have red hat enterprise 4. I would like to add more space on my lvm from the first partition that is not lvm type.
Here's the config
# fdisk -l
Disk /dev/sda: 73.4 GB, 73406611456 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes... (6 Replies)
Discussion started by: itik
6 Replies
3. UNIX for Advanced & Expert Users
I want to backup my partitions by shrinking it my issue is like
I want to create a new disk copy from only the used blocks I my current image.
How would I redirect the output of resize2fs to new disk and dd the current
partition so that I can boot my new image without issues and also without... (3 Replies)
Discussion started by: amol28kulkarni
3 Replies
4. Linux
Hi,
i have done a blunder here, i increased the swap space on Xen5.6 server machine using below steps :-
1056 dd if=/dev/zero of=/root/myswapfile bs=1M count=1024
1057 ls -l /root/myswapfile
1058 chmod 600 /root/myswapfile
1059 mkswap /root/myswapfile
1060 swapon /root/myswapfile
... (1 Reply)
Discussion started by: apm
1 Replies
5. 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
6. Linux
Hi all,
Fedora 17, 64bit
Ubuntu 12.04 desktop 64bit
HD 160G
I installed Ubuntu 12.04 on the HD first taking up the whole disc. Later I added/installed Fedora 17 selecting the "Shrink" option and save the bootloader on /dev/sda1 to make them dualboot. Installation is successful with... (0 Replies)
Discussion started by: satimis
0 Replies
7. UNIX for Advanced & Expert Users
My root file system is of type LVM. i wanna shrink it but unable to do so.
When i give the below command:
resize2fs /dev/mapper/VolGroup00-VolLog00 10000M
it messages that online shrink can't can't be done as the logical volume is mounted on /. i switched to single user mode by giving command:... (2 Replies)
Discussion started by: ravisingh
2 Replies
8. Red Hat
Hi,
I need a suggesstion i have 2 disk if i installed OS / root partition by making Lvm in one disk and data in other disk also with the lvm, means 2 different lvms.
Is making LVM partition for OS disk will the performacne will be good?
Can i make 2 different lvm one is for OS and other for... (1 Reply)
Discussion started by: Rahulne25
1 Replies
9. 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
10. UNIX for Beginners Questions & Answers
Hello everyone,
I am having an issue here with CentOS release 6.6 (Final) that shows all of the space used up, but I can't tell where the space went.
Seemingly I am using up 100%, according to
df -h
Filesystem Size Used Avail Use% Mounted on... (27 Replies)
Discussion started by: DannyBoyCentOS
27 Replies
LEARN ABOUT REDHAT
parted
PARTED(8) GNU Parted Manual PARTED(8)
NAME
GNU Parted - a partition manipulation program
SYNOPSIS
parted [options] [device [command [options...]...]]
DESCRIPTION
This manual page documents briefly the parted command. Complete documentation is distributed with the package in GNU Info format; see
below.
parted is a disk partitioning and partition resizing program. It allows you to create, destroy, resize, move and copy ext2, ext3, linux-
swap, FAT and FAT32 partitions. This is useful for creating space for new operating systems, reorganising disk usage, and copying data to
new hard disks.
OPTIONS
-h, --help
displays a help message.
-i, --interactive
where necessary, prompts for user intervention.
-s, --script
never prompts for user intervention.
-v, --version
displays the version.
COMMANDS
[device]
The block device to partition.
[command [options]]
Specifies a command to parted. If no command is given, parted will give you a command prompt. Commands are:
check partition
does a simple check on partition.
cp [source-device] source dest
copies the source partition's filesystem on source-device (or the current device if no other device was specified) to the
dest partition on the current device.
help [command]
prints general help, or help on command if specified.
mkfs partition fs-type
make a filesystem fs-type on partition. fs-type can be one of "FAT", "ext2" or "linux-swap".
mklabel label-type
Creates a new disklabel (partition table) of label-type. label-type should be one of "bsd", "gpt", "loop", "mac", "mips",
"msdos", "pc98" or "sun".
mkpart part-type [fs-type] start end
make a part-type partition with filesystem fs-type (if specified), beginning at start and ending at end (in megabytes).
part-type should be one of "primary", "logical" or "extended"
mkpartfs part-type fs-type start end
make a part-type partition with filesystem fs-type beginning at start and ending at end (in megabytes)
move partition start end
move partition to start at start and end at end. Note: move never changes the minor number
name partition name
set the name of partition to name. This option works only on Mac and PC98 disklabels. The name can be placed in quotes, if
necessary
print displays the partition table
quit exits parted
resize partition start end
resize the filesystem on partition to start at start and end at end megabytes
rm partition
deletes partition
select device
choose device as the current device to edit. device should usually be a Linux hard disk device, but it can be a partition,
software raid device or a LVM logical volume if that is necessary
set partition flag state
change the state of the flag on partition to state. Flags supported are: "boot", "root", "swap", "hidden", "raid", "lvm" and
"lba". state should be either "on" or "off"
REPORTING BUGS
Report bugs to <bug-parted@gnu.org>
SEE ALSO
fdisk(8), mkfs(8), The parted program is documented fully in the GNU partitioning software manual available via the Info system.
AUTHOR
This manual page was written by Timshel Knoll <timshel@debian.org>, for the Debian GNU/Linux system (but may be used by others).
parted 18 Mar, 2002 PARTED(8)