Re: root partition full; /dev taking up all the space?

2015-02-14 Thread Jason Hunt
On Fri, Feb 13, 2015 at 11:46 PM, Martin Brandenburg <
mar...@martinbrandenburg.com> wrote:

> My guess is you typoed a dd command and ended up creating some huge file
> in there.
>
>
That's exactly what happened; I recall dd'ing an image to a USB stick and
using /dev/rsd2 instead of /dev/rsd2c.  And sure enough that was the
culprit.

Problem solved.  Thanks!



Re: root partition full; /dev taking up all the space?

2015-02-13 Thread Ted Unangst
Jason Hunt wrote:
> In the midst of setting up my laptop (fresh install of 5.6), I found I was
> out of space on root::
> 
> # df -h
> Filesystem SizeUsed   Avail Capacity  Mounted on
> /dev/sd1a 1005M   1004M  -49.2M   105%/
> /dev/sd1k 49.2G1.4G   45.3G 3%/home
> /dev/sd1d  3.9G138K3.7G 0%/tmp
> /dev/sd1f  2.0G917M995M48%/usr
> /dev/sd1g 1005M191M764M20%/usr/X11R6
> /dev/sd1h  9.8G   1015M8.4G11%/usr/local
> /dev/sd1j  2.0G2.0K1.9G 0%/usr/obj
> /dev/sd1i  2.0G2.0K1.9G 0%/usr/src
> /dev/sd1e 11.2G9.2M   10.6G 0%/var
> 
> The culprit: looks to be /dev:
> 
> # du -sh /dev
> 938M/dev
> 
> But I don't understand why /dev would be using so much space?  Nothing
> looks out of place in /dev, but there sure is a lot of files (more than I
> expected):
> 
> # ls -l /dev | wc -l
> 1173

ls -lS | head



Re: root partition full; /dev taking up all the space?

2015-02-13 Thread dan
On Fri, 13 Feb 2015 23:28:21 -0500 Jason Hunt  wrote:
> In the midst of setting up my laptop (fresh install of 5.6), I found I was
> out of space on root::
> 
> # df -h
> Filesystem SizeUsed   Avail Capacity  Mounted on
> /dev/sd1a 1005M   1004M  -49.2M   105%/
> /dev/sd1k 49.2G1.4G   45.3G 3%/home
> /dev/sd1d  3.9G138K3.7G 0%/tmp
> /dev/sd1f  2.0G917M995M48%/usr
> /dev/sd1g 1005M191M764M20%/usr/X11R6
> /dev/sd1h  9.8G   1015M8.4G11%/usr/local
> /dev/sd1j  2.0G2.0K1.9G 0%/usr/obj
> /dev/sd1i  2.0G2.0K1.9G 0%/usr/src
> /dev/sd1e 11.2G9.2M   10.6G 0%/var
> 
> The culprit: looks to be /dev:
> 
> # du -sh /dev
> 938M/dev
> 
> But I don't understand why /dev would be using so much space?  Nothing
> looks out of place in /dev, but there sure is a lot of files (more than I
> expected):
> 
> # ls -l /dev | wc -l
> 1173

nothing odd about that. just for starters, each disk has 16 files (one for
each partition), and double that with raw devices (so 32 files per disk).
ide disks alone [0..7] use 256 files.

> 
> I don't have another OpenBSD system in front of me at the moment for
> comparison; is this normal?  I never thought I would need more than 1GB for
> root?  I guess I need to make a new root partition (2GB this time?) and
> migrate to that?
> 

that certainly does not seem right. /dev should be almost zero (its not much
more than inodes.)

this is from my -current:

$ du -sh /dev
38.0K   /dev
$ ls -l /dev | wc -l
1429

to see what is bigger than it should be, try:

$ du -sh /dev/* | grep -v ^0
12.0K   /dev/MAKEDEV
2.0K/dev/fd

and since almost everything in /dev is either a block or char device:

$ ls -l /dev/|grep -v ^[cb]
total 28
-r-xr-xr-x  1 root  wheel11424 Jan 28 14:22 MAKEDEV
lrwxr-xr-x  1 root  wheel6 Oct 24 23:02 audio -> audio0
lrwxr-xr-x  1 root  wheel9 Oct 24 23:02 audioctl -> audioctl0
dr-xr-xr-x  2 root  wheel 1024 Oct 24 23:02 fd
srw-rw-rw-  1 root  wheel0 Jan 28 07:19 log
lrwxr-xr-x  1 root  wheel6 Oct 24 23:02 mixer -> mixer0
lrwxr-xr-x  1 root  wheel4 Oct 24 23:02 pci -> pci0
lrwxr-xr-x  1 root  wheel6 Oct 24 23:02 radio -> radio0
lrwxr-xr-x  1 root  wheel6 Oct 24 23:02 sound -> sound0
lrwxr-xr-x  1 root  wheel6 Oct 24 23:02 video -> video0



Re: root partition full; /dev taking up all the space?

2015-02-13 Thread Christopher Barry
On Fri, 13 Feb 2015 23:28:21 -0500
Jason Hunt  wrote:

>In the midst of setting up my laptop (fresh install of 5.6), I found I
>was out of space on root::
>
># df -h
>Filesystem SizeUsed   Avail Capacity  Mounted on
>/dev/sd1a 1005M   1004M  -49.2M   105%/
>/dev/sd1k 49.2G1.4G   45.3G 3%/home
>/dev/sd1d  3.9G138K3.7G 0%/tmp
>/dev/sd1f  2.0G917M995M48%/usr
>/dev/sd1g 1005M191M764M20%/usr/X11R6
>/dev/sd1h  9.8G   1015M8.4G11%/usr/local
>/dev/sd1j  2.0G2.0K1.9G 0%/usr/obj
>/dev/sd1i  2.0G2.0K1.9G 0%/usr/src
>/dev/sd1e 11.2G9.2M   10.6G 0%/var
>
>The culprit: looks to be /dev:
>
># du -sh /dev
>938M/dev
>
>But I don't understand why /dev would be using so much space?  Nothing
>looks out of place in /dev, but there sure is a lot of files (more
>than I expected):
>
># ls -l /dev | wc -l
>1173
>
>I don't have another OpenBSD system in front of me at the moment for
>comparison; is this normal?  I never thought I would need more than
>1GB for root?  I guess I need to make a new root partition (2GB this
>time?) and migrate to that?
>
>OpenBSD 5.6 (GENERIC.MP) #333: Fri Aug  8 00:20:21 MDT 2014
>dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>real mem = 3959619584 (3776MB)
>avail mem = 3845431296 (3667MB)
>mpath0 at root
>scsibus0 at mpath0: 256 targets
>mainbus0 at root
>bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdae9c000 (67 entries)
>bios0: vendor LENOVO version "GCET98WW (2.58 )" date 03/12/2014
>bios0: LENOVO 3434CT0
>acpi0 at bios0: rev 2
>acpi0: sleep states S0 S3 S4 S5
>acpi0: tables DSDT FACP SLIC TCPA SSDT SSDT SSDT HPET APIC MCFG ECDT
>FPDT AS F! UEFI UEFI POAT SSDT SSDT DMAR UEFI DBG2
>acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP3(S4) XHCI(S3)
>EHC1(S3) EHC2(S3) HDEF(S4)
>acpitimer0 at acpi0: 3579545 Hz, 24 bits
>acpihpet0 at acpi0: 14318179 Hz
>acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
>cpu0 at mainbus0: apid 0 (boot processor)
>cpu0: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz, 2594.58 MHz
>cpu0:
>FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE3
>6,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS
>-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,D
>EADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
>cpu0: 256KB 64b/line 8-way L2 cache cpu0: smt 0, core 0, package 0
>mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
>cpu0: apic clock running at 99MHz
>cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
>cpu1 at mainbus0: apid 1 (application processor)
>cpu1: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz, 2594.11 MHz
>cpu1:
>FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE3
>6,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS
>-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,D
>EADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
>cpu1: 256KB 64b/line 8-way L2 cache cpu1: smt 1, core 0, package 0
>cpu2 at mainbus0: apid 2 (application processor)
>cpu2: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz, 2594.11 MHz
>cpu2:
>FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE3
>6,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS
>-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,D
>EADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
>cpu2: 256KB 64b/line 8-way L2 cache cpu2: smt 0, core 1, package 0
>cpu3 at mainbus0: apid 3 (application processor)
>cpu3: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz, 2594.11 MHz
>cpu3:
>FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE3
>6,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS
>-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,D
>EADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
>cpu3: 256KB 64b/line 8-way L2 cache cpu3: smt 1, core 1, package 0
>ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
>acpimcfg0 at acpi0 addr 0xf800, bus 0-63
>acpiec0 at acpi0
>acpiprt0 at acpi0: bus 0 (PCI0)
>acpiprt1 at acpi0: bus -1 (PEG_)
>acpiprt2 at acpi0: bus 2 (EXP1)
>acpiprt3 at acpi0: bus 3 (EXP2)
>acpiprt4 at acpi0: bus 4 (EXP3)
>acpicpu0 at acpi0: C2, C1, PSS
>acpicpu1 at acpi0: C2, C1, PSS
>acpicpu2 at acpi0: C2, C1, PSS
>acpicpu3 at acpi0: C2, C1, PSS
>acpipwrres0 at acpi0: PUBS, resource for XHCI, EHC1, EHC2
>acpitz0 at acpi0: critical temperature is 103 degC
>acpibtn0 at acpi0: LID_
>acpibtn1 at acpi0: SLPB
>acpibat0 at acpi0: BAT0 model "45N1079" serial 28341 type LION oem
>"LGC" acpibat1 at acpi0: BAT1 not present
>acpiac0 at acpi0: AC unit online
>acpithinkpad0 at acpi0
>acpidock0 at acpi0: GDCK not docked (0)
>cpu0: Enhanced SpeedStep 2594 MHz: speeds: 2601, 2600, 2500, 

Re: root partition full; /dev taking up all the space?

2015-02-13 Thread Christopher Barry
On Fri, 13 Feb 2015 23:28:21 -0500
Jason Hunt  wrote:

>In the midst of setting up my laptop (fresh install of 5.6), I found I
>was out of space on root::
>
># df -h
>Filesystem SizeUsed   Avail Capacity  Mounted on
>/dev/sd1a 1005M   1004M  -49.2M   105%/
>/dev/sd1k 49.2G1.4G   45.3G 3%/home
>/dev/sd1d  3.9G138K3.7G 0%/tmp
>/dev/sd1f  2.0G917M995M48%/usr
>/dev/sd1g 1005M191M764M20%/usr/X11R6
>/dev/sd1h  9.8G   1015M8.4G11%/usr/local
>/dev/sd1j  2.0G2.0K1.9G 0%/usr/obj
>/dev/sd1i  2.0G2.0K1.9G 0%/usr/src
>/dev/sd1e 11.2G9.2M   10.6G 0%/var
>
>The culprit: looks to be /dev:
>
># du -sh /dev
>938M/dev
>
>But I don't understand why /dev would be using so much space?  Nothing
>looks out of place in /dev, but there sure is a lot of files (more
>than I expected):
>
># ls -l /dev | wc -l
>1173
>
>I don't have another OpenBSD system in front of me at the moment for
>comparison; is this normal?  I never thought I would need more than
>1GB for root?  I guess I need to make a new root partition (2GB this
>time?) and migrate to that?
>
>OpenBSD 5.6 (GENERIC.MP) #333: Fri Aug  8 00:20:21 MDT 2014
>dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>real mem = 3959619584 (3776MB)
>avail mem = 3845431296 (3667MB)
>mpath0 at root
>scsibus0 at mpath0: 256 targets
>mainbus0 at root
>bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdae9c000 (67 entries)
>bios0: vendor LENOVO version "GCET98WW (2.58 )" date 03/12/2014
>bios0: LENOVO 3434CT0
>acpi0 at bios0: rev 2
>acpi0: sleep states S0 S3 S4 S5
>acpi0: tables DSDT FACP SLIC TCPA SSDT SSDT SSDT HPET APIC MCFG ECDT
>FPDT AS F! UEFI UEFI POAT SSDT SSDT DMAR UEFI DBG2
>acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP3(S4) XHCI(S3)
>EHC1(S3) EHC2(S3) HDEF(S4)
>acpitimer0 at acpi0: 3579545 Hz, 24 bits
>acpihpet0 at acpi0: 14318179 Hz
>acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
>cpu0 at mainbus0: apid 0 (boot processor)
>cpu0: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz, 2594.58 MHz
>cpu0:
>FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE3
>6,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS
>-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,D
>EADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
>cpu0: 256KB 64b/line 8-way L2 cache cpu0: smt 0, core 0, package 0
>mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
>cpu0: apic clock running at 99MHz
>cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
>cpu1 at mainbus0: apid 1 (application processor)
>cpu1: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz, 2594.11 MHz
>cpu1:
>FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE3
>6,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS
>-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,D
>EADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
>cpu1: 256KB 64b/line 8-way L2 cache cpu1: smt 1, core 0, package 0
>cpu2 at mainbus0: apid 2 (application processor)
>cpu2: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz, 2594.11 MHz
>cpu2:
>FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE3
>6,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS
>-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,D
>EADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
>cpu2: 256KB 64b/line 8-way L2 cache cpu2: smt 0, core 1, package 0
>cpu3 at mainbus0: apid 3 (application processor)
>cpu3: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz, 2594.11 MHz
>cpu3:
>FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE3
>6,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS
>-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,D
>EADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
>cpu3: 256KB 64b/line 8-way L2 cache cpu3: smt 1, core 1, package 0
>ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
>acpimcfg0 at acpi0 addr 0xf800, bus 0-63
>acpiec0 at acpi0
>acpiprt0 at acpi0: bus 0 (PCI0)
>acpiprt1 at acpi0: bus -1 (PEG_)
>acpiprt2 at acpi0: bus 2 (EXP1)
>acpiprt3 at acpi0: bus 3 (EXP2)
>acpiprt4 at acpi0: bus 4 (EXP3)
>acpicpu0 at acpi0: C2, C1, PSS
>acpicpu1 at acpi0: C2, C1, PSS
>acpicpu2 at acpi0: C2, C1, PSS
>acpicpu3 at acpi0: C2, C1, PSS
>acpipwrres0 at acpi0: PUBS, resource for XHCI, EHC1, EHC2
>acpitz0 at acpi0: critical temperature is 103 degC
>acpibtn0 at acpi0: LID_
>acpibtn1 at acpi0: SLPB
>acpibat0 at acpi0: BAT0 model "45N1079" serial 28341 type LION oem
>"LGC" acpibat1 at acpi0: BAT1 not present
>acpiac0 at acpi0: AC unit online
>acpithinkpad0 at acpi0
>acpidock0 at acpi0: GDCK not docked (0)
>cpu0: Enhanced SpeedStep 2594 MHz: speeds: 2601, 2600, 2500, 

Re: root partition full; /dev taking up all the space?

2015-02-13 Thread Martin Brandenburg
> From owner-misc+m146...@openbsd.org  Sat Feb 14 04:44:09 2015
> Date: Fri, 13 Feb 2015 23:28:21 -0500
> Subject: root partition full; /dev taking up all the space?
> From: Jason Hunt 
> To: misc@openbsd.org
> List-ID: 
>
> In the midst of setting up my laptop (fresh install of 5.6), I found I was
> out of space on root::
>
> # df -h
> Filesystem SizeUsed   Avail Capacity  Mounted on
> /dev/sd1a 1005M   1004M  -49.2M   105%/
> /dev/sd1k 49.2G1.4G   45.3G 3%/home
> /dev/sd1d  3.9G138K3.7G 0%/tmp
> /dev/sd1f  2.0G917M995M48%/usr
> /dev/sd1g 1005M191M764M20%/usr/X11R6
> /dev/sd1h  9.8G   1015M8.4G11%/usr/local
> /dev/sd1j  2.0G2.0K1.9G 0%/usr/obj
> /dev/sd1i  2.0G2.0K1.9G 0%/usr/src
> /dev/sd1e 11.2G9.2M   10.6G 0%/var
>
> The culprit: looks to be /dev:
>
> # du -sh /dev
> 938M/dev

That's way too much.

$ du -sh /dev
34.0K   /dev

My guess is you typoed a dd command and ended up creating some huge file
in there.

ls -l /dev | grep '^[^cb]' will show you the non-devices. There's a
few non-devices that are supposed to be there, but my guess is that
you'll see the culprit quickly.

-- Martin