Re: disk space issue

2022-02-16 Thread Lourens

On 2/16/22 17:26, Todd wrote:

I like ncdu when searching for what is using disk space.

ncdu -x /

https://openports.se/sysutils/ncdu

On Wed, Feb 16, 2022 at 4:32 AM Lourens  wrote:


Thank you Todd,  that is a useful app.




Re: disk space issue

2022-02-16 Thread Lourens

On 2/16/22 14:43, Raimo Niskanen wrote:


Read the man pages for du(1) the switches -x and -k and
sort(1) the switch -n.  I suspect the command you have claimed
to run will not sort correctly.

Normally only 100..100 MB is used on / so you have done something strange.


Thank you Raimo,
All sorted here now, all that remains is for me to assimilate what I 
have learnt.*



*



Re: disk space issue

2022-02-16 Thread Todd
I like ncdu when searching for what is using disk space.

ncdu -x /

https://openports.se/sysutils/ncdu

On Wed, Feb 16, 2022 at 4:32 AM Lourens  wrote:

> Hello to Everyone,
>
> Thank you for your time and expertise.
>
> This is my first OpenBSD installation**so I am an obsd greenhorn, this
> is 7.0 that has been kept up to date
> *
> *
> My / has run out of disk space and I cannot see any perculiar content in
> it and I am  a little nervous to
> mess with anything in /.
>
>
> puffy7# sysctl hw.disknames
> hw.disknames=sd0:51e8581cb33ae259,sd1:fe144bc22452a8e3
>
> puffy7# disklabel -h sd0
> # /dev/rsd0c:
>
> 16 partitions:
> #size   offset  fstype [fsize bsize   cpg]
>a: 1.0G  256  4.2BSD   2048 16384 12960 # /
>b:16.1G  2097408swap # none
>c:  3726.0G0  unused
>d: 4.0G 35862752  4.2BSD   2048 16384 12960 # /tmp
>e:35.7G 44251328  4.2BSD   2048 16384 12960 # /var
>f: 6.0G119122016  4.2BSD   2048 16384 12960 # /usr
>g: 1.0G131704928  4.2BSD   2048 16384 12960 #
> /usr/X11R6
>h:20.0G133802080  4.2BSD   2048 16384 12960 #
> /usr/local
>i: 2.0G175745120  4.2BSD   2048 16384 12960 #
> /usr/src
>j: 6.0G179939424  4.2BSD   2048 16384 12960 #
> /usr/obj
>k:   300.0G192522368  4.2BSD   4096 32768 26062 # /home
>
> puffy7# cat /etc/fstab
> 51e8581cb33ae259.b none swap sw
> 51e8581cb33ae259.a / ffs rw 1 1
> 51e8581cb33ae259.k /home ffs rw,nodev,nosuid 1 2
> 51e8581cb33ae259.d /tmp ffs rw,nodev,nosuid 1 2
> 51e8581cb33ae259.f /usr ffs rw,nodev 1 2
> 51e8581cb33ae259.g /usr/X11R6 ffs rw,nodev 1 2
> 51e8581cb33ae259.h /usr/local ffs rw,wxallowed,nodev 1 2
> 51e8581cb33ae259.j /usr/obj ffs rw,nodev,nosuid 1 2
> 51e8581cb33ae259.i /usr/src ffs rw,nodev,nosuid 1 2
> 51e8581cb33ae259.e /var ffs rw,nodev,nosuid 1 2
> fe144bc22452a8e3.c /home/lourens/mnt/t1 ffs rw,nodev,nosuid 1 2
>
> puffy7# df -h
> Filesystem SizeUsed   Avail Capacity  Mounted on
> /dev/sd0a  986M985M  -48.2M   105%/
> /dev/sd0k  295G274G6.4G98%/home
> /dev/sd0d  3.9G8.3M3.7G 0%/tmp
> /dev/sd0f  5.8G1.1G4.4G20%/usr
> /dev/sd0g  986M295M642M31%/usr/X11R6
> /dev/sd0h 19.4G6.3G   12.1G34%/usr/local
> /dev/sd0j  5.8G2.0K5.5G 0%/usr/obj
> /dev/sd0i  1.9G2.0K1.8G 0%/usr/src
> /dev/sd0e 34.6G   64.2M   32.8G 0%/var
> /dev/sd1c  902G507G350G59%/home/lourens/mnt/t1
>
> puffy7# ls -lh
> total 135564
> -rw-r--r--   1 root  wheel   578B Sep 30 22:00 .cshrc
> -rw-r--r--   1 root  wheel   468B Sep 30 22:00 .profile
> drwxr-xr-x   2 root  wheel   512B Sep 30 22:00 altroot
> drwxr-xr-x   2 root  wheel   1.0K Sep 30 22:01 bin
> -rw-r--r--   1 root  wheel  86.3K Dec 26 16:59 boot
> -rwx--   1 root  wheel  20.7M Feb 16 05:40 bsd
> -rwx--   1 root  wheel  20.7M Feb 15 06:19 bsd.booted
> -rw---   1 root  wheel   4.0M Dec 26 16:58 bsd.rd
> -rw---   1 root  wheel  20.6M Dec 26 16:58 bsd.sp
> drwxr-xr-x   6 root  wheel  19.5K Feb 16 05:39 dev
> drwxr-xr-x  43 root  wheel   2.0K Feb 16 05:40 etc
> drwxr-xr-x   3 root  wheel   512B Dec 26 16:59 home
> drwxr-xr-x   3 root  wheel   512B Feb 14 09:06 mnt
> drwx--  10 root  wheel   512B Jan 20 18:19 root
> drwxr-xr-x   2 root  wheel   1.5K Dec 26 17:15 sbin
> lrwxrwx---   1 root  wheel11B Sep 30 22:00 sys -> usr/src/sys
> drwxrwxrwt  11 root  wheel   1.0K Feb 16 09:57 tmp
> drwxr-xr-x  16 root  wheel   512B Dec 26 16:59 usr
> drwxr-xr-x  23 root  wheel   512B Sep 30 22:57 var
>
>
> Any pointers to improving my knowledge and skill will be most welcome.
> *
> *
> Awesome O/S, thank you to all involved in it.
>
> Lourens.
> **
> *
> *
>
>


Re: disk space issue

2022-02-16 Thread Lourens

On 2/16/22 13:52, Paul de Weerd wrote:

On Wed, Feb 16, 2022 at 12:34:28PM +0100, Kacper Wilgus wrote:
| Can someone please explain to me how is it possible to have negative
| available space? Wouldn't it be impossible to able to take up 105% of
| your disk capacity, and how is it that df(1) reports such when it also
| reports 985M of 986M used?

Read up on filesystems, specifically the FFS as used in BSD.  There
are some very good papers out there.  Also, read the manpages of
tunefs(8) and newfs(8) for info: http://man.openbsd.org/tunefs#m
and http://man.openbsd.org/newfs#m specifically will be enlightening.

Cheers,

Paul


Thank you Paul,
I have been looking for FFS info and I am waiting for the updated 
Absolute OpenBSD from

Michel W Lucas.

I am old enough to enjoy reading to learn.
I will download and study these.

I managed to find the self-created problem by combining suggestions  from :*
*Stuart Henderson, Lukasz Moskala, Raimo Niskanen, Jan Stary and 
resurrecting two brain cells.


I found the file created by my typo while using using dd in /dev!

Now :
puffy7# df -h
Filesystem Size    Used   Avail Capacity  Mounted on
/dev/sd0a  986M    114M    822M    12%    /

Thank you to Everyone for your patience and persistance.*
*
*
*
*

*



Re: disk space issue

2022-02-16 Thread Thim Cederlund


On 16/02-22 11:01, Lourens wrote:
> My / has run out of disk space and I cannot see any perculiar content in it
> and I am  a little nervous to
> mess with anything in /.
>

Try running the following command:

# find /dev -type f

If any files show up here besides *MAKEDEV* and the *.lock* files you
are free to remove them.


Best Regards,

Thim Cederlund



[Solved] Re: disk space issue

2022-02-16 Thread Lourens

 On 2/16/22 13:52, Paul de Weerd wrote:

On Wed, Feb 16, 2022 at 12:34:28PM +0100, Kacper Wilgus wrote:
| Can someone please explain to me how is it possible to have negative
| available space? Wouldn't it be impossible to able to take up 105% of
| your disk capacity, and how is it that df(1) reports such when it also
| reports 985M of 986M used?

Read up on filesystems, specifically the FFS as used in BSD. There
are some very good papers out there. Also, read the manpages of
tunefs(8) and newfs(8) for info: http://man.openbsd.org/tunefs#m
and http://man.openbsd.org/newfs#m specifically will be enlightening.

Cheers,

Paul


Thank you Paul,
I have been looking for FFS info and I am waiting for the updated 
Absolute OpenBSD from

Michel W Lucas.

I am old enough to enjoy reading to learn.
I will download and study these.

I managed to find the self-created problem by combining suggestions from :*
*Stuart Henderson, Lukasz Moskala, Raimo Niskanen, Jan Stary and 
resurrecting two brain cells.


I found the file created by my typo while using using dd in /dev!

Now :
puffy7# df -h
Filesystem Size    Used   Avail Capacity  Mounted on
/dev/sd0a  986M    114M    822M    12%    /

Thank you to Everyone for your patience and persistance.*
*
*
*
*

*



Re: disk space issue

2022-02-16 Thread Lourens

On 2/16/22 12:40, Raimo Niskanen wrote:

# du -kx | sort -n

should show which files occupy data.

/ Raimo Niskanen



Thank you Raimo,

Please check my logic - I understand that the error is related to space 
on '/'

and that the other partitions are merely mounted on mount points in '/'.

I see no peculiar nor large files in '/' using "du -hx | sort -n".

I do have a spare disk and am able to manually create partitions and 
hopefully transfer data across,

it does not seem to be elegant solution to my installation incompetence.

Another thought is to attempt resizing partitions?

*
*



Re: disk space issue

2022-02-16 Thread Paul de Weerd
On Wed, Feb 16, 2022 at 12:34:28PM +0100, Kacper Wilgus wrote:
| Can someone please explain to me how is it possible to have negative
| available space? Wouldn't it be impossible to able to take up 105% of
| your disk capacity, and how is it that df(1) reports such when it also
| reports 985M of 986M used?

Read up on filesystems, specifically the FFS as used in BSD.  There
are some very good papers out there.  Also, read the manpages of
tunefs(8) and newfs(8) for info: http://man.openbsd.org/tunefs#m
and http://man.openbsd.org/newfs#m specifically will be enlightening.

Cheers,

Paul

-- 
>[<++>-]<+++.>+++[<-->-]<.>+++[<+
+++>-]<.>++[<>-]<+.--.[-]
 http://www.weirdnet.nl/ 



Re: disk space issue

2022-02-16 Thread Jan Stary
On Feb 16 12:34:28, kacperwil...@disroot.org wrote:
> > Filesystem Size    Used   Avail Capacity  Mounted on
> > /dev/sd0a  986M    985M  -48.2M   105%    /
> 
> Can someone please explain to me how is it possible to have negative
> available space? Wouldn't it be impossible to able to take up 105% of
> your disk capacity, and how is it that df(1) reports such when it also
> reports 985M of 986M used?

See the -m option of newfs(8).



Re: disk space issue

2022-02-16 Thread Jan Stary
On Feb 16 11:01:17, lour...@runningwolf.co.za wrote:
> Hello to Everyone,
> 
> Thank you for your time and expertise.
> 
> This is my first OpenBSD installation**so I am an obsd greenhorn, this is
> 7.0 that has been kept up to date
> *
> *
> My / has run out of disk space and I cannot see any perculiar content in it


$ doas find -x / -size +100c

On my machine, that would be just

/bsd
/bsd.rd
/sbin/unwind
/bsd.sp
/bsd.booted
/obsd



Re: disk space issue

2022-02-16 Thread Stuart Henderson
On 2022-02-16, Lourens  wrote:
> Hello to Everyone,
>
> Thank you for your time and expertise.
>
> This is my first OpenBSD installation**so I am an obsd greenhorn, this 
> is 7.0 that has been kept up to date
> *
> *
> My / has run out of disk space and I cannot see any perculiar content in 
> it and I am  a little nervous to
> mess with anything in /.

# du -hxd1 /

Most likely, either you have put too many files in /root, or have typo'd
something and created a file in /dev


-- 
Please keep replies on the mailing list.



Re: disk space issue

2022-02-16 Thread Łukasz Moskała



Dnia 16 lutego 2022 12:25:25 CET, Lourens  napisał/a:
>On 2/16/22 12:59, Łukasz Moskała wrote:
>> Hi,
>>
>> Did you ran dd recently? If you specify non-existent output disk in 
>> dd, it'll create file in /dev, then write to it, filling up space.
>>
>> Also, try:
>>  du -shx / | sort -h
>> this should show you which directories take up most space.
>>
>
>Thank you for teaching me something new!
>
>I used dd to write /dev/zero to a USB stick,  the command did zero the 
>USB stick.
>
>the command you suggested :
>puffy7# du -shx / | sort -h
>985M    /*
>*which is similar, to me at least, to my previous
>
>puffy7# df -h
>Filesystem Size    Used   Avail Capacity  Mounted on
>/dev/sd0a  986M    985M  -48.2M   105%    /
>
>
>**
>

Oops, I made a typo in that command. I meant:
 du -shx /* | sort -h

the goal is to show disk space usage per directory in /
--
Łukasz Moskała



Re: disk space issue

2022-02-16 Thread Lourens

On 2/16/22 12:59, Łukasz Moskała wrote:

Hi,

Did you ran dd recently? If you specify non-existent output disk in 
dd, it'll create file in /dev, then write to it, filling up space.


Also, try:
 du -shx / | sort -h
this should show you which directories take up most space.



Thank you for teaching me something new!

I used dd to write /dev/zero to a USB stick,  the command did zero the 
USB stick.


the command you suggested :
puffy7# du -shx / | sort -h
985M    /*
*which is similar, to me at least, to my previous

puffy7# df -h
Filesystem Size    Used   Avail Capacity  Mounted on
/dev/sd0a  986M    985M  -48.2M   105%    /


**



Re: disk space issue

2022-02-16 Thread Łukasz Moskała

W dniu 16.02.2022 o 10:01, Lourens pisze:

Hello to Everyone,

Thank you for your time and expertise.

This is my first OpenBSD installation**so I am an obsd greenhorn, this 
is 7.0 that has been kept up to date

*
*
My / has run out of disk space and I cannot see any perculiar content in 
it and I am  a little nervous to

mess with anything in /.


puffy7# sysctl hw.disknames
hw.disknames=sd0:51e8581cb33ae259,sd1:fe144bc22452a8e3

puffy7# disklabel -h sd0
# /dev/rsd0c:

16 partitions:
#    size   offset  fstype [fsize bsize   cpg]
   a: 1.0G  256  4.2BSD   2048 16384 12960 # /
   b:    16.1G  2097408    swap # none
   c:  3726.0G    0  unused
   d: 4.0G 35862752  4.2BSD   2048 16384 12960 # /tmp
   e:    35.7G 44251328  4.2BSD   2048 16384 12960 # /var
   f: 6.0G    119122016  4.2BSD   2048 16384 12960 # /usr
   g: 1.0G    131704928  4.2BSD   2048 16384 12960 # 
/usr/X11R6
   h:    20.0G    133802080  4.2BSD   2048 16384 12960 # 
/usr/local
   i: 2.0G    175745120  4.2BSD   2048 16384 12960 # 
/usr/src
   j: 6.0G    179939424  4.2BSD   2048 16384 12960 # 
/usr/obj

   k:   300.0G    192522368  4.2BSD   4096 32768 26062 # /home

puffy7# cat /etc/fstab
51e8581cb33ae259.b none swap sw
51e8581cb33ae259.a / ffs rw 1 1
51e8581cb33ae259.k /home ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.d /tmp ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.f /usr ffs rw,nodev 1 2
51e8581cb33ae259.g /usr/X11R6 ffs rw,nodev 1 2
51e8581cb33ae259.h /usr/local ffs rw,wxallowed,nodev 1 2
51e8581cb33ae259.j /usr/obj ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.i /usr/src ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.e /var ffs rw,nodev,nosuid 1 2
fe144bc22452a8e3.c /home/lourens/mnt/t1 ffs rw,nodev,nosuid 1 2

puffy7# df -h
Filesystem Size    Used   Avail Capacity  Mounted on
/dev/sd0a  986M    985M  -48.2M   105%    /
/dev/sd0k  295G    274G    6.4G    98%    /home
/dev/sd0d  3.9G    8.3M    3.7G 0%    /tmp
/dev/sd0f  5.8G    1.1G    4.4G    20%    /usr
/dev/sd0g  986M    295M    642M    31%    /usr/X11R6
/dev/sd0h 19.4G    6.3G   12.1G    34%    /usr/local
/dev/sd0j  5.8G    2.0K    5.5G 0%    /usr/obj
/dev/sd0i  1.9G    2.0K    1.8G 0%    /usr/src
/dev/sd0e 34.6G   64.2M   32.8G 0%    /var
/dev/sd1c  902G    507G    350G    59%    /home/lourens/mnt/t1

puffy7# ls -lh
total 135564
-rw-r--r--   1 root  wheel   578B Sep 30 22:00 .cshrc
-rw-r--r--   1 root  wheel   468B Sep 30 22:00 .profile
drwxr-xr-x   2 root  wheel   512B Sep 30 22:00 altroot
drwxr-xr-x   2 root  wheel   1.0K Sep 30 22:01 bin
-rw-r--r--   1 root  wheel  86.3K Dec 26 16:59 boot
-rwx--   1 root  wheel  20.7M Feb 16 05:40 bsd
-rwx--   1 root  wheel  20.7M Feb 15 06:19 bsd.booted
-rw---   1 root  wheel   4.0M Dec 26 16:58 bsd.rd
-rw---   1 root  wheel  20.6M Dec 26 16:58 bsd.sp
drwxr-xr-x   6 root  wheel  19.5K Feb 16 05:39 dev
drwxr-xr-x  43 root  wheel   2.0K Feb 16 05:40 etc
drwxr-xr-x   3 root  wheel   512B Dec 26 16:59 home
drwxr-xr-x   3 root  wheel   512B Feb 14 09:06 mnt
drwx--  10 root  wheel   512B Jan 20 18:19 root
drwxr-xr-x   2 root  wheel   1.5K Dec 26 17:15 sbin
lrwxrwx---   1 root  wheel    11B Sep 30 22:00 sys -> usr/src/sys
drwxrwxrwt  11 root  wheel   1.0K Feb 16 09:57 tmp
drwxr-xr-x  16 root  wheel   512B Dec 26 16:59 usr
drwxr-xr-x  23 root  wheel   512B Sep 30 22:57 var


Any pointers to improving my knowledge and skill will be most welcome.
*
*
Awesome O/S, thank you to all involved in it.

Lourens.
**
*
*



Hi,

Did you ran dd recently? If you specify non-existent output disk in dd, 
it'll create file in /dev, then write to it, filling up space.


Also, try:
 du -shx / | sort -h
this should show you which directories take up most space.

--
Łukasz Moskała



disk space issue

2022-02-16 Thread Lourens

Hello to Everyone,

Thank you for your time and expertise.

This is my first OpenBSD installation**so I am an obsd greenhorn, this 
is 7.0 that has been kept up to date

*
*
My / has run out of disk space and I cannot see any perculiar content in 
it and I am  a little nervous to

mess with anything in /.


puffy7# sysctl hw.disknames
hw.disknames=sd0:51e8581cb33ae259,sd1:fe144bc22452a8e3

puffy7# disklabel -h sd0
# /dev/rsd0c:

16 partitions:
#    size   offset  fstype [fsize bsize   cpg]
  a: 1.0G  256  4.2BSD   2048 16384 12960 # /
  b:    16.1G  2097408    swap # none
  c:  3726.0G    0  unused
  d: 4.0G 35862752  4.2BSD   2048 16384 12960 # /tmp
  e:    35.7G 44251328  4.2BSD   2048 16384 12960 # /var
  f: 6.0G    119122016  4.2BSD   2048 16384 12960 # /usr
  g: 1.0G    131704928  4.2BSD   2048 16384 12960 # 
/usr/X11R6
  h:    20.0G    133802080  4.2BSD   2048 16384 12960 # 
/usr/local
  i: 2.0G    175745120  4.2BSD   2048 16384 12960 # 
/usr/src
  j: 6.0G    179939424  4.2BSD   2048 16384 12960 # 
/usr/obj

  k:   300.0G    192522368  4.2BSD   4096 32768 26062 # /home

puffy7# cat /etc/fstab
51e8581cb33ae259.b none swap sw
51e8581cb33ae259.a / ffs rw 1 1
51e8581cb33ae259.k /home ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.d /tmp ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.f /usr ffs rw,nodev 1 2
51e8581cb33ae259.g /usr/X11R6 ffs rw,nodev 1 2
51e8581cb33ae259.h /usr/local ffs rw,wxallowed,nodev 1 2
51e8581cb33ae259.j /usr/obj ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.i /usr/src ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.e /var ffs rw,nodev,nosuid 1 2
fe144bc22452a8e3.c /home/lourens/mnt/t1 ffs rw,nodev,nosuid 1 2

puffy7# df -h
Filesystem Size    Used   Avail Capacity  Mounted on
/dev/sd0a  986M    985M  -48.2M   105%    /
/dev/sd0k  295G    274G    6.4G    98%    /home
/dev/sd0d  3.9G    8.3M    3.7G 0%    /tmp
/dev/sd0f  5.8G    1.1G    4.4G    20%    /usr
/dev/sd0g  986M    295M    642M    31%    /usr/X11R6
/dev/sd0h 19.4G    6.3G   12.1G    34%    /usr/local
/dev/sd0j  5.8G    2.0K    5.5G 0%    /usr/obj
/dev/sd0i  1.9G    2.0K    1.8G 0%    /usr/src
/dev/sd0e 34.6G   64.2M   32.8G 0%    /var
/dev/sd1c  902G    507G    350G    59%    /home/lourens/mnt/t1

puffy7# ls -lh
total 135564
-rw-r--r--   1 root  wheel   578B Sep 30 22:00 .cshrc
-rw-r--r--   1 root  wheel   468B Sep 30 22:00 .profile
drwxr-xr-x   2 root  wheel   512B Sep 30 22:00 altroot
drwxr-xr-x   2 root  wheel   1.0K Sep 30 22:01 bin
-rw-r--r--   1 root  wheel  86.3K Dec 26 16:59 boot
-rwx--   1 root  wheel  20.7M Feb 16 05:40 bsd
-rwx--   1 root  wheel  20.7M Feb 15 06:19 bsd.booted
-rw---   1 root  wheel   4.0M Dec 26 16:58 bsd.rd
-rw---   1 root  wheel  20.6M Dec 26 16:58 bsd.sp
drwxr-xr-x   6 root  wheel  19.5K Feb 16 05:39 dev
drwxr-xr-x  43 root  wheel   2.0K Feb 16 05:40 etc
drwxr-xr-x   3 root  wheel   512B Dec 26 16:59 home
drwxr-xr-x   3 root  wheel   512B Feb 14 09:06 mnt
drwx--  10 root  wheel   512B Jan 20 18:19 root
drwxr-xr-x   2 root  wheel   1.5K Dec 26 17:15 sbin
lrwxrwx---   1 root  wheel    11B Sep 30 22:00 sys -> usr/src/sys
drwxrwxrwt  11 root  wheel   1.0K Feb 16 09:57 tmp
drwxr-xr-x  16 root  wheel   512B Dec 26 16:59 usr
drwxr-xr-x  23 root  wheel   512B Sep 30 22:57 var


Any pointers to improving my knowledge and skill will be most welcome.
*
*
Awesome O/S, thank you to all involved in it.

Lourens.
**
*
*