I am setting up a redhat ec2 instance and by default the software I am using (called qradar) created the following volumes on the two 500g ebs storage devices attached to the instance:
$ lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
storetmp rootrhel -wi-ao---- 20.00g
varlog rootrhel -wi-ao---- <20.00g
store storerhel -wi-ao---- <348.80g
transient storerhel -wi-ao---- <87.20g
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda2 500G 1.4G 499G 1% /
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 16G 17M 16G 1% /run
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/mapper/storerhel-store 349G 33M 349G 1% /store
/dev/mapper/storerhel-transient 88G 33M 88G 1% /transient
/dev/mapper/rootrhel-storetmp 20G 33M 20G 1% /storetmp
/dev/mapper/rootrhel-varlog 20G 35M 20G 1% /var/log
tmpfs 3.2G 0 3.2G 0% /run/user/1000
I need my storetmp to be 100g. How can I move 80g of storage from store to storetmp?
It also seems that I may need to shift some space from xvdb3 to xvdb2:
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 500G 0 disk
├─xvda1 202:1 0 1M 0 part
└─xvda2 202:2 0 500G 0 part /
xvdb 202:16 0 500G 0 disk
├─xvdb1 202:17 0 24G 0 part [SWAP]
├─xvdb2 202:18 0 40G 0 part
│ ├─rootrhel-varlog 253:2 0 20G 0 lvm /var/log
│ └─rootrhel-storetmp 253:3 0 20G 0 lvm /storetmp
└─xvdb3 202:19 0 436G 0 part
├─storerhel-store 253:0 0 348.8G 0 lvm /store
└─storerhel-transient 253:1 0 87.2G 0 lvm /transient
Note that the directories are currently being used by the software running on the box and are not empty, so deleting them is out of the question, I need this to be done on-the-fly:
$ ls -l /dev/mapper/storerhel-transient
lrwxrwxrwx 1 root root 7 Aug 10 16:00 /dev/mapper/storerhel-transient -> ../dm-3
$ ls -l /dev/mapper/rootrhel-varlog
lrwxrwxrwx 1 root root 7 Aug 10 16:00 /dev/mapper/rootrhel-varlog -> ../dm-0
$ ls -l /dev/mapper/storerhel-store
lrwxrwxrwx 1 root root 7 Aug 17 04:10 /dev/mapper/storerhel-store -> ../dm-2