Michael wrote:
> On Sunday, 11 May 2025 13:21:34 British Summer Time Dale wrote:
>> Michael wrote:
>>> On Sunday, 11 May 2025 06:41:46 British Summer Time Dale wrote:
>>>> Howdy,
>>>>
>>>> I'm updating my old rig.  Well, I'm trying to.  I kept running out of
>>>> space while compiling rust.  I need to make /var larger.
>>> There are some alternatives to this, especially for rust:
>>>
>>> 1. First of all not compile it locally.  You could use rust-bin, or you
>>> could use the gentoo binhost package if your USE flags are default, or
>>> compile it on another PC of yours which has enough space, using
>>> appropriate C, CPU and USE flags and then bring it over to this PC to
>>> emerge it as a binary.
> [snip ...]
>
>> Well, I still like to compile my own, that way I can use my own USE
>> flags and such. 
> [snip ...]
>
>>>> root@fireball / # pvs
>>>>
>>>>   PV         VG     Fmt  Attr PSize    PFree
>>>>   /dev/sda7  OS     lvm2 a--  <124.46g 5.39g
>>>>
>>>> root@fireball / # vgs
>>>>
>>>>   VG     #PV #LV #SN Attr   VSize    VFree
>>>>   OS       1   3   0 wz--n- <124.46g 5.39g
>>>>
>>>> root@fireball / # lvs
>>>>
>>>>   LV      VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log
>>>>
>>>> Cpy%Sync Convert
>>>>
>>>>   swap    OS     -wi-ao----
>>>>
>>>> 12.00g
>>>>
>>>>   usr     OS     -wi-ao----
>>>>
>>>> 39.06g
>>>>
>>>>   var     OS     -wi-ao----
>>>>
>>>> 68.00g
>>>>
>>>> root@fireball / # resize2fs /dev/mapper/OS-var
>>>> resize2fs 1.47.2 (1-Jan-2025)
>>>> open: Device or resource busy while opening /dev/mapper/OS-var
>>>> root@fireball / #
>>> Err ... what is this 'OS-var'?
>> I named it OS-var when I set up LVM.  That way I know it is OS related
>> and is the /var directory.  I named /usr OS-usr too.  :-D 
> Try:
>
> lvdisplay
> vgdisplay
> pvdisplay
>
> Your lvs output shows VG named "OS" and the LV named as "var".
>
> As I understand this, subdirectories of /dev/mapper/ would be VGs.  The /dev/
> VG/LV nomenclature should be used to perform a resize on the LV.
>
> Try 'lvscan' to see what path to use for the resize command.
>

I usually go in the other direction, pv first, vg and then lv.  I listed
them in the order you posted them tho.  I removed unrelated things like
/home and a spare drive that I don't think has anything on it now. 



root@fireball / # lvdisplay   
 --- Logical volume ---
  LV Path                /dev/OS/var
  LV Name                var
  VG Name                OS
  LV UUID                Vqlsc3-jYak-HHAy-AkZg-02hH-1RNK-RQ4vRA
  LV Write Access        read/write
  LV Creation host, time ,
  LV Status              available
  # open                 1
  LV Size                68.00 GiB
  Current LE             17408
  Segments               5
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:4
 
root@fireball / # vgdisplay

  --- Volume group ---
  VG Name               OS
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  22
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <124.46 GiB
  PE Size               4.00 MiB
  Total PE              31861
  Alloc PE / Size       30480 / 119.06 GiB
  Free  PE / Size       1381 / 5.39 GiB
  VG UUID               gefYst-CTE9-B4Hp-wy53-WBxr-J7Li-h8c90V
  
root@fireball / # pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda7
  VG Name               OS
  PV Size               124.46 GiB / not usable 3.80 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              31861
  Free PE               1381
  Allocated PE          30480
  PV UUID               rQs0i9-1LRP-0X2Y-p2WV-wptb-Xebe-wOmmjx
  
root@fireball / #


I do like this command better.  :-D  I gotta see what this does for
encrypted stuff.  o_O 


root@fireball / # lvscan
  ACTIVE            '/dev/home/home-lv' [<7.28 TiB] inherit
  ACTIVE            '/dev/backup/backup' [698.63 GiB] inherit
  ACTIVE            '/dev/OS/usr' [39.06 GiB] inherit
  ACTIVE            '/dev/OS/var' [68.00 GiB] inherit
  ACTIVE            '/dev/OS/swap' [12.00 GiB] inherit
root@fireball / # resize2fs /dev/OS/var
resize2fs 1.47.2 (1-Jan-2025)
open: Device or resource busy while opening /dev/OS/var
root@fireball / #


I think all those link to the same device node, usually dm-<some number>
tho.  Still, I tried it anyway.  Worst thing, same excuse for not
resizing the darn thing.  :/ 

Am I going to have to boot other media and resize this thing???? 

Dale

:-)  :-) 

Reply via email to