Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 28 |
Nodes: | 6 (0 / 6) |
Uptime: | 51:58:55 |
Calls: | 422 |
Files: | 1,025 |
Messages: | 90,573 |
2. Or if you want to compile it locally, you can consider 'mount --bind' to a new directory on any other local fs, which has a large enough partition for this job. Or you if you run out of fs space altogether, or RAM isn't enough and therefore you can't use tmpfs for /var/tmp/portage and/or it swaps continuously, you can configure and load zram, and/or set a lower number of jobs in /etc/portage/package.env for rust to allow it to fit within available fs and RAM. Sure, it will take for ever to emerge on say a PC with 4G of RAM,
but if you *must* emerge it locally you should be able to get there.
3. You can even use NFS and mount a fs over the network for this purpose, but this is rather more complicated than the above options and I expect it will be
slow.
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.
Thank goodness
that is on a LVM. I have room left on that old drive so I wanted to
just extend and then resize the ext4 file system, like I've done in the
past I might add. I dug out my little cheat sheet and sure enough,
lvextend -L <size to add> < lv name> and then resize file system.
Simple enough. Should be, but it's not. This is some info, keep in
mind, this is my old rig, not my new one.
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 / #
I checked other info on how to do this with searches. All report the
same thing. Use lvextend to add to the size and then resize the file
system. It also says to use resize2fs to do it.
Michael wrote:[snip ...]
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.
Well, I still like to compile my own, that way I can use my own USE[snip ...]
flags and such.
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
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 <== That's the path
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????
Michael wrote:
On Sunday, 11 May 2025 14:10:48 British Summer Time Dale wrote:
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 <== That's the
path
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 / #
Hmm ... the fine manual of resize2fs command states upfront:
"The resize2fs program will resize ext2, ext3, or ext4 file systems. It can be used to enlarge or shrink an unmounted file system located on device. If the file system is mounted, it can be used to expand the
size of the mounted file system, assuming the kernel and the file system supports on- line resizing."
So you should not need to unmount it - but I wonder if the LVM layer introduces some complexity here. :-/
Well, on this system, I've done this a few times without any problems.
Just add some space with lvextend, resize file system and done. It
doesn't seem to be working today tho. Yesterday either. LOL
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????
Since /var/ is in use by the OS and you keep getting warnings about it being busy, I think you'll have to reboot with a LiveUSB to finish this
job with var unmounted.
Well crap. I checked once ages ago to see if I could do anything with
LVM and the commands did list things. I guess LVM works on those but I
can't recall what I was booting. Given it was a while ago, likely systemrescue thingy. That doesn't use Gentoo anymore so not sure on if
that would work or not. I may have a old copy around here somewhere.
Could put it on that Ventoy thingy. See if that works.
I was hoping to avoid that. :/ I thought maybe I was missing something
or something changed that I couldn't find, yet.
Thanks for the help. We tried.
Dale
:-) :-)
P. S. I have some 500GB drives in a box somewhere. Could move the OS
over to that and have even more room. I could do like I did on my new
rig, make everything big enough that I'd need to worry about the rig
blowing smoke before running out of room. ROFL
Michael wrote:
I'm not the best person to advise on LVM, I just shared what I know, but I haven't used LVM in anger for a few years now. Hopefully someone with
more
hands on experience will chime in.
Since the lv command worked, I don't think this is a LVM problem. That
part of the growth is there. It seems to be resize2fs that has the
problem. I just wonder, if I could do a file system check, would it
work then? Thing is, it to wants it unmounted. It makes me wonder if
there is something that needs to be fixed, even if it is minor and not a actual data problem, but it isn't just saying the file system needs to
be fixed first. When I did my searches, most people had a part in the
output about a bad super block or that a super block wasn't found. Mine doesn't have that tho. I'm not sure what difference that makes.
I'll try to boot some media and do it I guess. Just not today.
Dale
:-) :-)
open: Device or resource busy while opening /dev/OS/var
Hmm ... the fine manual of resize2fs command states upfront:
"The resize2fs program will resize ext2, ext3, or ext4 file systems. It can
be used to enlarge or shrink an unmounted file system located on device. If the file system is mounted, it can be used to expand the size of the mounted file system, assuming the kernel and the file system supports on- line resizing."
So you should not need to unmount it - but I wonder if the LVM layer introduces some complexity here. :-/
Am I going to have to boot other media and resize this thing????Since /var/ is in use by the OS and you keep getting warnings about it being
busy, I think you'll have to reboot with a LiveUSB to finish this job with var
unmounted.
Well crap. I checked once ages ago to see if I could do anything with
LVM and the commands did list things. I guess LVM works on those but I can't recall what I was booting. Given it was a while ago, likely systemrescue thingy. That doesn't use Gentoo anymore so not sure on if
that would work or not.
I may have a old copy around here somewhere.
Could put it on that Ventoy thingy. See if that works.
I was hoping to avoid that. :/ I thought maybe I was missing something
or something changed that I couldn't find, yet.