1

I am running out of space on a particular filesystem. I know this with the following command df -H

$ sudo df -H
Filesystem               Size  Used Avail Use% Mounted on
udev                     4.1G   13k  4.1G   1% /dev
tmpfs                    807M   73M  734M  10% /run
/dev/nvme0n1p1           106G   34G   68G  33% /
none                     4.1k     0  4.1k   0% /sys/fs/cgroup
none                     5.3M     0  5.3M   0% /run/lock
none                     4.1G     0  4.1G   0% /run/shm
none                     105M     0  105M   0% /run/user
/dev/mapper/vg1-log      106G   97G  3.3G  97% /mnt/logs
/dev/mapper/vg1-data     732G  615G   81G  89% /mnt/data
/dev/mapper/vg1-backups  317G  317G     0 100% /mnt/backups

My EC2 has the following

Root device
/dev/sda1 - EBS ID vol-0fe5#########3b0
Block devices
/dev/sda1
/dev/sdb - EBS ID vol-0631########7560

How do I map which volume I should increase the size of ?

I ran the following commands to get any kind of mapping between the EBS ID and the /dev/device but did not find any

$ ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 May 28 14:17 control
lrwxrwxrwx 1 root root       7 Jun  9 18:09 vg1-backups -> ../dm-1
lrwxrwxrwx 1 root root       7 Jun  9 18:09 vg1-data -> ../dm-2
lrwxrwxrwx 1 root root       7 Jun  9 18:09 vg1-log -> ../dm-0
lrwxrwxrwx 1 root root       7 Jun  9 18:09 vg1-swap -> ../dm-3

Please share a simple process for me to map them. But I have tried more commands sudo dmsetup ls --tree, sudo df -H,

$ sudo lsblk -o KNAME,TYPE,SIZE,MODEL
KNAME     TYPE   SIZE MODEL
nvme0n1   disk   100G Amazon Elastic Block Store
nvme0n1p1 part   100G
nvme1n1   disk   1.2T Amazon Elastic Block Store
dm-0      lvm    100G
dm-1      lvm    300G
dm-2      lvm    692G
dm-3      lvm      8G

All point to nvme0n1.

0

I'm guessing you are trying to figure out which "physical" disk is the one holding your LVM array.

If you run

pvs

this should let you know which physical disk is being used for LVM.

After that you need to extending the volume group and the logical volume. For example:

lvextend -l +10G /dev/mapper/you_volume
  • pvs does not help, returns sudo pvs PV VG Fmt Attr PSize PFree /dev/nvme1n1 vg1 lvm2 a-- 1.07t 0 – Siddharth Jun 10 at 3:04
  • Thankyou for your prompt response, this is a tough problem since there is no easy way to find out. Your answer helped me realise that nothing installed on the system was going to help. – Siddharth Jun 10 at 3:22
0

I found my answer in this link

I was unable to install (ubuntu 18, production box) so I downloaded the sources and built it from here. I ran the following commands

make
sudo make install

For my specific issue I ran this command

sudo nvme id-ctrl -v /dev/nvme1n1 > nvme1n1Log

The result was

NVME Identify Controller:
vid       : 0x1d0f
ssvid     : 0x1d0f
sn        : vol063$$$$$$$$$$60
mn        : Amazon Elastic Block Store

The sn above gives the exact volume id for the dev

EDIT

sudo lsblk 
NAME                 MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT 
nvme0n1              259:0    0   100G  0 disk 
└─nvme0n1p1          259:1    0   100G  0 part / 
nvme1n1              259:2    0   1.2T  0 disk 
├─vg1-log (dm-0)     252:0    0   100G  0 lvm  /mnt/logs 
├─vg1-backups (dm-1) 252:1    0   300G  0 lvm  /mnt/backups 
├─vg1-data (dm-2)    252:2    0   692G  0 lvm  /mnt/data 
└─vg1-swap (dm-3)    252:3    0     8G  0 lvm  [SWAP]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.