> Am 13.06.2022 um 10:21 schrieb Stuart Henderson <stu.li...@spacehopper.org>:
> 
> On 2022-06-13, Mike Fischer <fischer+o...@lavielle.com> wrote:
>> After solving a recent problem on a VM where the /usr/local was full I was 
>> left with a disklabel that had a hole of unused space in it (see below for 
>> details). I was wondering if there is a way to compact the partitions, i.e. 
>> move the partitions following the deleted one up to fill the hole, 
>> potentially leaving corresponding free space at the end.
>> 
>> I’d prefer to not have to use dd(1) on the raw device to move the data? I’d 
>> hope for something that is smart enough to adjust the disklabel after moving 
>> the bytes. Wishful thinking?
> 
> There's no good way to do this. My preference would be to attach a new
> virtual disk, partition either manually or according to current auto
> defaults for the larger disk, dump|restore and run installboot, then
> remove the old virtual disk.

Ok, thanks! I thought I missed something ;-)


> 
>> 16 partitions:
>> #                size           offset  fstype [fsize bsize   cpg]
>>  f:          5056800          8025952  4.2BSD   2048 16384 12960 # /usr
> 
> You might find this a little tight too after some updates.

# df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd0a      615M    108M    476M    18%    /
/dev/sd0k      3.7G    798M    2.7G    22%    /home
/dev/sd0d      863M    8.0K    820M     0%    /tmp
/dev/sd0f      2.3G    1.7G    555M    76%    /usr
/dev/sd0g      648M    299M    317M    48%    /usr/X11R6
/dev/sd0l      4.8G    2.2G    2.4G    48%    /usr/local
/dev/sd0j      5.2G    2.0K    4.9G     0%    /usr/obj
/dev/sd0i      1.4G    968M    402M    71%    /usr/src
/dev/sd0e      1.3G    425M    806M    35%    /var
# 

24% (555M) free seems ok for now, but thanks for the heads-up.


Mike

Reply via email to