Resize partitions?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Resize partitions?

Niels Kobschaetzki
Hi,

I am running currently constantly into the problem that I do not have enough space left for installing packages and today even upgrading a snapshot failed because I had not enough space left.
Is there a way to resize partitions? I guess probably not because there is no volume manager, right?
I used originally the suggested layout by the installer. Any idea what could fill up the space on /? The partition is only 1GB in size and if I see it correctly only the base-system is installed there. Did base grew with the latest snapshots?

Niels
Reply | Threaded
Open this post in threaded view
|

Re: Resize partitions?

Niels Kobschaetzki
On 17/10/03 13:48, Niels Kobschaetzki wrote:
>Hi,
>
>I am running currently constantly into the problem that I do not have enough space left for installing packages and today even upgrading a snapshot failed because I had not enough space left.
>Is there a way to resize partitions? I guess probably not because there is no volume manager, right?
>I used originally the suggested layout by the installer. Any idea what could fill up the space on /? The partition is only 1GB in size and if I see it correctly only the base-system is installed there. Did base grew with the latest snapshots?

I found the problem. It sat in front of the keyboard m)
At some point I created apparently by accident a huge file in /dev and
that ate up all the space in /
One problem solved. Now to my other space-problems where resizing would
be a solution but maybe I just need to tidy up more.

--
Schöne Grüße

Niels

Reply | Threaded
Open this post in threaded view
|

Re: Resize partitions?

Otto Moerbeek
On Tue, Oct 03, 2017 at 04:10:11PM +0200, Niels Kobschaetzki wrote:

> On 17/10/03 13:48, Niels Kobschaetzki wrote:
> > Hi,
> >
> > I am running currently constantly into the problem that I do not have enough space left for installing packages and today even upgrading a snapshot failed because I had not enough space left.
> > Is there a way to resize partitions? I guess probably not because there is no volume manager, right?
> > I used originally the suggested layout by the installer. Any idea what could fill up the space on /? The partition is only 1GB in size and if I see it correctly only the base-system is installed there. Did base grew with the latest snapshots?
>
> I found the problem. It sat in front of the keyboard m)
> At some point I created apparently by accident a huge file in /dev and
> that ate up all the space in /
> One problem solved. Now to my other space-problems where resizing would
> be a solution but maybe I just need to tidy up more.
>
> --
> Schöne Grüße
>
> Niels

http://www.openbsd.org/faq/faq14.html#GrowPartition has some hints,
but that method only works for partitions that have free space next to
them.  Sometimes you have to move another partition first to create an
empty partition.  Sometimes you are lucky and /tmp is next to the
partion you wat to grow, so you can avoid some juggling. But this is
all pretty risky, mistakes are easily made since this is all hand
work. Often it is jiust easier to backup /etc and /home and other
local stuff and reinstall.

        -Otto

Reply | Threaded
Open this post in threaded view
|

Re: Resize partitions?

Nick Holland
In reply to this post by Niels Kobschaetzki
On 10/03/17 10:10, Niels Kobschaetzki wrote:

> On 17/10/03 13:48, Niels Kobschaetzki wrote:
>> Hi,
>>
>> I am running currently constantly into the problem that I do not
>> have enough space left for installing packages and today even
>> upgrading a snapshot failed because I had not enough space left. Is
>> there a way to resize partitions? I guess probably not because
>> there is no volume manager, right? I used originally the suggested
>> layout by the installer. Any idea what could fill up the space on
>> /? The partition is only 1GB in size and if I see it correctly only
>> the base-system is installed there. Did base grew with the latest
>> snapshots?
>
> I found the problem. It sat in front of the keyboard m) At some point
> I created apparently by accident a huge file in /dev and that ate up
> all the space in / One problem solved. Now to my other space-problems
> where resizing would be a solution but maybe I just need to tidy up
> more.

and that's one reason we tell you to partition the heck out of your system.

Best/worst story I heard along those lines was someone who typoed their
backup script, and instead of writing to tape, wrote to a FILE in /dev.
Unfortunately, they used one big partition, so there was plenty of space
for this file...but of course, if the bad thing happened, the tape was
blank.

If you fill a 100M root partition, you clean up junk you left laying
around.  If you fill a 1G root partition, something went horribly wrong,
and you find and fix the problem.  Enlarging is NOT the answer there.

Disks are stupid big these days.  You can't get too small a disk for
many applications.  Leave most of your disk unpartitioned, and you can
go back and "enlarge" anything you want at a later time (well...'cept
for root.  and 1G is a HUGE root partition).  Just create a new
partition, copy everything from the old to the new, change fstab, reboot.

Nick.

Reply | Threaded
Open this post in threaded view
|

Re: Resize partitions?

Niels Kobschaetzki
On 17/10/04 01:48, Nick Holland wrote:

>On 10/03/17 10:10, Niels Kobschaetzki wrote:
>> On 17/10/03 13:48, Niels Kobschaetzki wrote:
>>> Hi,
>>>
>>> I am running currently constantly into the problem that I do not
>>> have enough space left for installing packages and today even
>>> upgrading a snapshot failed because I had not enough space left. Is
>>> there a way to resize partitions? I guess probably not because
>>> there is no volume manager, right? I used originally the suggested
>>> layout by the installer. Any idea what could fill up the space on
>>> /? The partition is only 1GB in size and if I see it correctly only
>>> the base-system is installed there. Did base grew with the latest
>>> snapshots?
>>
>> I found the problem. It sat in front of the keyboard m) At some point
>> I created apparently by accident a huge file in /dev and that ate up
>> all the space in / One problem solved. Now to my other space-problems
>> where resizing would be a solution but maybe I just need to tidy up
>> more.
>
>and that's one reason we tell you to partition the heck out of your system.
>
>Best/worst story I heard along those lines was someone who typoed their
>backup script, and instead of writing to tape, wrote to a FILE in /dev.
>Unfortunately, they used one big partition, so there was plenty of space
>for this file...but of course, if the bad thing happened, the tape was
>blank.
>
>If you fill a 100M root partition, you clean up junk you left laying
>around.  If you fill a 1G root partition, something went horribly wrong,
>and you find and fix the problem.  Enlarging is NOT the answer there.
>
>Disks are stupid big these days.  You can't get too small a disk for
>many applications.  Leave most of your disk unpartitioned, and you can
>go back and "enlarge" anything you want at a later time (well...'cept
>for root.  and 1G is a HUGE root partition).  Just create a new
>partition, copy everything from the old to the new, change fstab, reboot.

The problem for me with lots of partitions is usually that I have the
"wrong" sizes. Right now I have 1.7G free in /usr/local but 105G in
/home. I am pretty sure that home won't grow that fast that it will fill
up. But /usr/local will with installing programs. And it is at least for
me a hassle to look regularly through my installed programs and decide
what I still need and what not. Especially with some libraries. And I
don't know OpenBSD enough to know how "dangerous" it is to use
"pkg_delete -a". I used similar functions with linux-distributions and
they wanted to remove a tool like git because nothing depended on it.
Btw. I like the approach of dnf of Fedora which will not only uninstall
a package but also all its dependencies that aren't used by other
packages. Anyway, I am only a mediocre fan of tons of partitions and
have a lot of bad experiences in the past with bad estimations what
needs to be which size. I have here for example the partition for
/usr/obj. It is nearly 6G in size, 2K are used according to df and from
what I am reading in the man-page of hier, I need it only when I want to
build OpenBSD by myself. /var is 18.5G in size but only 67.5M are used.
/ is 1G in size; I would have expected to need more.

It seems that I could resize problem-free but I can do this only after I
learned more about OpenBSD and how it uses its file-system. And then I
need to re-install and create the partitions by myself instead of using
the suggestions made by the installer. I guess I'd prefer a small / and
small /usr/X11R6 created by the installer and then something for the
rest. But that would probably mean moving /home into /usr/home and I
don't know what to do about /var.
Well, my family goes to vacation soon and I am home alone; maybe I have
then the time to reinstall (if I am not sorting all the lego-bricks of
the kids into a new sorting system…but that's another story).

Niels

Reply | Threaded
Open this post in threaded view
|

Re: Resize partitions?

Alexander Hall


On October 4, 2017 6:58:52 PM GMT+02:00, Niels Kobschaetzki <[hidden email]> wrote:
 
> /.../ And I
>don't know OpenBSD enough to know how "dangerous" it is to use
>"pkg_delete -a". I used similar functions with linux-distributions and
>they wanted to remove a tool like git because nothing depended on it.

It will here too but only if you didn't explicitly install said package. You can also mark already installed packages as "explicitly installed" using the fine pkg_* tools.

$ pkg_delete -n -a

will probably give you a nice hint, too.

>Btw. I like the approach of dnf of Fedora which will not only uninstall
>a package but also all its dependencies that aren't used by other
>packages.

Thus, an implicit "pkg_delete -a" with no questions asked?

/Alexander

Reply | Threaded
Open this post in threaded view
|

Re: Resize partitions?

Niels Kobschaetzki
On 17/10/04 23:21, Alexander Hall wrote:

>
>
>On October 4, 2017 6:58:52 PM GMT+02:00, Niels Kobschaetzki <[hidden email]> wrote:
>
>> /.../ And I
>>don't know OpenBSD enough to know how "dangerous" it is to use
>>"pkg_delete -a". I used similar functions with linux-distributions and
>>they wanted to remove a tool like git because nothing depended on it.
>
>It will here too but only if you didn't explicitly install said package. You can also mark already installed packages as "explicitly installed" using the fine pkg_* tools.
>
>$ pkg_delete -n -a
>
>will probably give you a nice hint, too.
>
>>Btw. I like the approach of dnf of Fedora which will not only uninstall
>>a package but also all its dependencies that aren't used by other
>>packages.
>
>Thus, an implicit "pkg_delete -a" with no questions asked?

Yes. Since Fedora is very user-centric I guess it fits the use-case
since users probably usually want to delete "everything" when they
uninstall a piece of software and not just the package.

For me "pkg_delete -a <package-name>" always does nothing. Thus I
thought it just doesn't work with a package name and I am misreading the
man page but apparently it should.

Niels