[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: add disk to LVM



On 2021-06-27 11:43, David wrote:
On Sun, 27 Jun 2021 at 19:00, mick crane <mick.crane@gmail.com> wrote:

hello,
Please bear in mind that I don't know what I'm doing.
It looks like when I installed debian on this PC I requested a LVM.
I'd forgotten about that.

root@pumpkin:~# df -h
Filesystem                    Size  Used Avail Use% Mounted on
udev                          7.8G     0  7.8G   0% /dev
tmpfs                         1.6G  1.5M  1.6G   1% /run
/dev/mapper/pumpkin--vg-root   28G  8.4G   18G  33% /
tmpfs                         7.8G   36M  7.8G   1% /dev/shm
tmpfs                         5.0M  4.0K  5.0M   1% /run/lock
/dev/sda1                     236M  155M   69M  70% /boot
/dev/mapper/pumpkin--vg-home  176G   18G  150G  11% /home
tmpfs                         1.6G   60K  1.6G   1% /run/user/1000
/dev/sdb1                     1.8T   62G  1.7T   4%
/media/mick/a8a2440a-0739-48b3-aa85-29715dbf817d

Hi, the 'df' command shows information about the filesystems
it recognises. But only filesystems. So there's a lot of missing
information, that might be relevant to your question once we
understand exactly what it is. I'll attempt to answer anyway ...

Have a look at the output of 'lsblk -f' to get a comprehensive
display of how all your block devices are being used.

Also it would be helpful to understand your complete LVM
configuration, to see the output of 'vgs', 'pvs' and 'lvs' commands.

If your goal is to be able move the /dev/sdb drive between
different machines, the easiest way is that it should not be used by
LVM at all. That just means it should not participate in any
LVM configuration.

If that is the situation (and hopefully it is what you have, which
the additional information will confirm), then you can simply make
a mountpoint inside any of your other /dev filesystems above, and
use that mountpoint to mount any filesystem that is on /dev/sdb.
Such a mountpoint could be mentioned in /etc/fstab to provide
mount configuration including automounting if that is what you
want.

Ok, I'm pretty sure all this was made with the Debian installer. Not sure what was the point of my selecting LVM with such a small SSD disk. Do people normally extend the volume group over different disks ?

root@pumpkin:~# lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sda
├─sda1 ext2 1.0 0a3fac2b-e17e-4be0-8cde-c1d2a3edbc2c 68.6M 66% /boot
├─sda2
└─sda5 LVM2_member LVM2 001       xXXSc7-0LNU-hUfb-yqO1-N0Dy-qcDU-GWuDoP
  ├─pumpkin--vg-root
│ ext4 1.0 92a64093-72bc-4a7b-b239-0d9d1cb20679 17.6G 31% /
  ├─pumpkin--vg-swap_1
│ swap 1 143694de-2be6-4de8-8731-809a61c0d503 [SWAP]
  └─pumpkin--vg-home
ext4 1.0 bc21377b-ea12-448c-9dde-0789aee937cd 149.4G 10% /home
sdb
└─sdb1 ext4 1.0 a8a2440a-0739-48b3-aa85-29715dbf817d 1.6T 3% /media/mick/a8a2440a-0739-48b3-aa85-29
sr0

root@pumpkin:~# vgs
  VG         #PV #LV #SN Attr   VSize    VFree
  pumpkin-vg   1   3   0 wz--n- <223.33g    0

root@pumpkin:~# pvs
  PV         VG         Fmt  Attr PSize    PFree
  /dev/sda5  pumpkin-vg lvm2 a--  <223.33g    0

root@pumpkin:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
  home   pumpkin-vg -wi-ao---- 179.43g
  root   pumpkin-vg -wi-ao---- <27.94g
  swap_1 pumpkin-vg -wi-ao---- <15.96g

cheers
mick

--
Key ID    4BFEBB31


Reply to: