Re: [gentoo-user] Nvidia-drivers fails to patch

2023-04-20 Thread Dale
Morgan Wesström wrote:
> On 2023-04-21 00:36, Dale wrote:
>> /var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/temp/environment:
>> line 1291:
>> /var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files/nvidia-drivers-470.141.03-clang15.patch:
>>
>> No such file or directory
>>
>> Any thoughts?  Ideas?
>>
>
> I couldn't reproduce the error here. One thing that comes to mind is
> that your system might have an error in its repository configuration.
> /var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files is a
> symlink and should point to your main repository, normally
> /var/db/repos/gentoo/x11-drivers/nvidia-drivers/files. When the emerge
> fails, can you check what that symlink actually points to and if this
> is where your repository is stored? What is the output of emerge
> --info? (Repository info is in that output).
>
> /Morgan
>
>

I cleared the tmp files to give it a fresh start.  It still failed.  The
directory and files it complains about being missing, they are.  I went
to the ebuild to see what patches are supposed to be installed.  This is
the part of the ebuild. 


PATCHES=(
    "${FILESDIR}"/nvidia-drivers-470.141.03-clang15.patch
    "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
    "${FILESDIR}"/nvidia-settings-390.144-desktop.patch
    "${FILESDIR}"/nvidia-settings-390.144-no-gtk2.patch
    "${FILESDIR}"/nvidia-settings-390.144-raw-ldflags.patch
)


As you can see, it wants to apply patches from several versions so while
odd, I guess it really does it that way.  I suspect given the age of the
drivers that the patches no longer exist or something.  I'd think it
would report it couldn't download the files but maybe not.  I may be
running out of luck here.  Odd thing is, it compiled a while back. 

I tried to google and find the patch, no luck.  No idea where it comes
from.  May run emerge -ef nvidia-drivers and see if it works. 

Also, I switch to the current kernel, it failed in the same way.  It
isn't just the new kernel, it seems to be any of them.  I wonder how
hard it is to switch to that other driver.  From the wiki page, it looks
like a big deal. 

Dale

:-)  ;-)



Re: [gentoo-user] Nvidia-drivers fails to patch

2023-04-20 Thread Morgan Wesström

On 2023-04-21 00:36, Dale wrote:

/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/temp/environment:
line 1291:
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files/nvidia-drivers-470.141.03-clang15.patch:
No such file or directory

Any thoughts?  Ideas?



I couldn't reproduce the error here. One thing that comes to mind is that your 
system might have an error in its repository configuration. 
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files is a symlink and 
should point to your main repository, normally 
/var/db/repos/gentoo/x11-drivers/nvidia-drivers/files. When the emerge fails, 
can you check what that symlink actually points to and if this is where your 
repository is stored? What is the output of emerge --info? (Repository info is 
in that output).

/Morgan



Re: [gentoo-user] Nvidia-drivers fails to patch

2023-04-20 Thread Mark Knecht
On Thu, Apr 20, 2023 at 3:36 PM Dale  wrote:

>  *   patch -p1  failed with
>
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files/nvidia-drivers-470.141.03-clang15.patch


You know I don't run Gentoo, right?

That looks weird to me - building 470.182.03 but patching it with
470.141.03.
Just looks weird...

I think the other day someone - maybe Thelma? - had a problem
where there was something left over in some 'patch' directory.
Possibly you have something like that going on?

You know I don't run Gentoo, right? ;-)

Cheers,
Mark


Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on

2023-04-20 Thread Wol

On 20/04/2023 05:23, Dale wrote:

Some 1,100 directories, not sure if directories use inodes or not.


"Everything is a file".

A directory is just a data file with a certain structure that maps names 
to inodes.


It might still be there somewhere - I can't imagine it's been deleted, 
just forgotten - but I believe some editors (emacs probably) would let 
you open that file, so you could rename files by editing the line that 
defined them, you could unlink a file by deleting the line, etc etc.


Obviously a very dangerous mode, but Unix was always happy about handing 
out powerful footguns willy nilly.


Cheers,
Wol



[gentoo-user] Nvidia-drivers fails to patch

2023-04-20 Thread Dale
Howdy,

I tried a while back to upgrade my kernel but nvidia didn't like it. 
Given I can do this a piece at a time, I thought I'd try again.  Kernel
compiled fine and when nvidia complained about missing options, I fixed
those and recompiled the kernel.  I finally got it happy as far as
missing kernel options goes.  Then it fails with this error. 


* Package:    x11-drivers/nvidia-drivers-470.182.03:0/470
 * Repository: mine
 * USE:    X abi_x86_64 amd64 driver elibc_glibc kernel_linux tools
userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Determining the location of the kernel source code
 * Found kernel source directory:
 * /usr/src/linux
 * Found sources for kernel version:
 * 6.1.23-gentoo
 * Checking for suitable kernel configuration options ...
 [ ok ]
>>> Unpacking source...
>>> Unpacking NVIDIA-Linux-x86_64-470.182.03.run to
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/work
>>> Unpacking nvidia-installer-470.182.03.tar.bz2 to
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/work
>>> Unpacking nvidia-modprobe-470.182.03.tar.bz2 to
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/work
>>> Unpacking nvidia-persistenced-470.182.03.tar.bz2 to
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/work
>>> Unpacking nvidia-settings-470.182.03.tar.bz2 to
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/work
>>> Unpacking nvidia-xconfig-470.182.03.tar.bz2 to
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/work
>>> Source unpacked in
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/work
>>> Preparing source in
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/work ...
 * Applying nvidia-drivers-470.141.03-clang15.patch ...
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/temp/environment:
line 1291:
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files/nvidia-drivers-470.141.03-clang15.patch:
No such file or directory
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/temp/environment:
line 1294:
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files/nvidia-drivers-470.141.03-clang15.patch:
No such file or directory
 [ !! ]
 * ERROR: x11-drivers/nvidia-drivers-470.182.03::mine failed (prepare
phase):
 *   patch -p1  failed with
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files/nvidia-drivers-470.141.03-clang15.patch
 *
 * Call stack:
 *   ebuild.sh, line  136:  Called src_prepare
 * environment, line 3731:  Called default
 *  phase-functions.sh, line  872:  Called default_src_prepare
 *  phase-functions.sh, line  948:  Called __eapi8_src_prepare
 * environment, line  468:  Called eapply '--'
'/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files/nvidia-drivers-470.141.03-clang15.patch'
'/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files/nvidia-modprobe-390.141-uvm-perms.patch'
'/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files/nvidia-settings-390.144-desktop.patch'
'/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files/nvidia-settings-390.144-no-gtk2.patch'
'/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files/nvidia-settings-390.144-raw-ldflags.patch'
 * environment, line 1359:  Called _eapply_patch
'/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files/nvidia-drivers-470.141.03-clang15.patch'
 * environment, line 1297:  Called __helpers_die 'patch -p1 
failed with
/var/tmp/portage/x11-drivers/nvidia-drivers-470.182.03/files/nvidia-drivers-470.141.03-clang15.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *  die "$@"
 *


According to the nvidia website, I'm using the correct version.  Thing
is, it's old.  I may have to get a newer video card.  If I can correct
this error tho and it work when I reboot, it would be great.  I don't
think that driver version is in the tree anymore.  It shows it is in my
local overlay.  Given the next version of driver doesn't work with this
card, I may be stuck with current kernel version or buying a newer
card.  Do I need to switch to a different driver?  Novau or something? 

Any thoughts?  Ideas? 

Thanks. 

Dale

:-)  :-) 



Re: [gentoo-user] Can I safely switch (no)multilib profile???

2023-04-20 Thread Dr Rainer Woitok
Netfab,

On Tuesday, 2023-04-18 19:23:08 +0200, you wrote:

> ...
> Please post your emerge --info.

$ emerge --info
Portage 3.0.44 (python 3.10.10-final-0, default/linux/amd64/17.1/desktop, 
gcc-12, glibc-2.36-r7, 6.1.19-gentoo x86_64)
=
System uname: 
Linux-6.1.19-gentoo-x86_64-Intel-R-_Core-TM-_i3-6100H_CPU_@_2.70GHz-with-glibc2.36
KiB Mem:16275880 total,  12626132 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Tue, 18 Apr 2023 16:02:07 +
Head commit of repository gentoo: 680055829bf8a22bce902578a081df426bfbf1b1

sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.39 p5) 2.39.0
app-misc/pax-utils:1.3.5::gentoo
app-shells/bash:   5.1_p16-r2::gentoo
dev-java/java-config:  2.3.1::gentoo
dev-lang/perl: 5.36.0-r2::gentoo
dev-lang/python:   3.10.10_p3::gentoo, 3.11.2_p2::gentoo
dev-lang/rust-bin: 1.66.1-r1::gentoo
dev-util/cmake:3.25.3::gentoo
dev-util/meson:1.0.1::gentoo
sys-apps/baselayout:   2.13-r1::gentoo
sys-apps/openrc:   0.46::gentoo
sys-apps/sandbox:  2.29::gentoo
sys-devel/autoconf:2.71-r5::gentoo
sys-devel/automake:1.16.5::gentoo
sys-devel/binutils:2.39-r4::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc: 12.2.1_p20230121-r1::gentoo
sys-devel/gcc-config:  2.10::gentoo
sys-devel/libtool: 2.4.7-r1::gentoo
sys-devel/make:4.3::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:2.36-r7::gentoo
Repositories:

gentoo
location: /var/db/repos/gentoo
sync-type: git
sync-uri: https://github.com/gentoo-mirror/gentoo
priority: -1000
volatile: True
sync-git-verify-commit-signature: yes

gnu-elpa
location: /var/lib/layman/gnu-elpa
sync-type: laymansync
sync-uri: gs-elpa gnu-elpa
masters: gentoo
priority: 50
volatile: True

melpa
location: /var/lib/layman/melpa
sync-type: laymansync
sync-uri: gs-elpa melpa
masters: gnu-elpa gentoo
priority: 50
volatile: True

melpa-stable
location: /var/lib/layman/melpa-stable
sync-type: laymansync
sync-uri: gs-elpa melpa-stable
masters: gnu-elpa gentoo
priority: 50
volatile: True

local
location: /var/lib/Local-Overlay
masters: gentoo
priority: 1000
volatile: True

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-fno-diagnostics-color -march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config 
/usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d 
/etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild 
/etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d 
/etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-fno-diagnostics-color -march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--ask --ask-enter-invalid --autounmask=n --color=n 
--nospinner --quiet --quiet-build --quiet-fail --verbose-conflicts"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 
GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT 
XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_DIRS XDG_CONFIG_HOME XDG_CURRENT_DESKTOP 
XDG_DATA_DIRS XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME XFILESEARCHPATH 
XSESSION XUSERFILESEARCHPATH"
FCFLAGS="-fno-diagnostics-color -march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs 
buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles 
ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch 
pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox 
sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch 
userpriv usersandbox usersync xattr"
FFLAGS="-fno-diagnostics-color -march=native -O2 -pipe"
GENTOO_MIRRORS="https://ftp.fau.de/gentoo;
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j5 -l4.8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times 
--omit-dir-times --compress --force --whole-file --delete --stats 
--human-readable --timeout=180 --exclude=/distfiles --exclude=/local 
--exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/usr/bin/sh"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli 
crypt cups dbus djvu dri dts dvd dvdr elogind encode exif fftw flac fortran 
gdbm gif gnutls gpm gtk gui iconv icu ipv6 jbig jpeg jpeg2k lcms libglvnd 
libnotify libtirpc lzma mad mng modemmanager mp3 mp4 mpeg mtp multilib ncurses 
networkmanager nptl ogg openexr opengl openmp pam pango pcre pdf png policykit 
postscript ppds pulseaudio qt5 readline sdl seccomp sound spell 

[gentoo-user] Re: Finally got a SSD drive to put my OS on

2023-04-20 Thread Nikos Chantziaras

On 20/04/2023 13:59, Dale wrote:

In place of "find -type..." say "find / -type..."


Ahhh, that worked.  I also realized I need to leave off the ' at the
beginning and end.  I thought I left those out.  I copy and paste a
lot.  lol


Btw, if you only want to do this for the root filesystem and exclude all 
other mounted filesystems, also use the -xdev option:


  find / -xdev -type ...




Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on

2023-04-20 Thread Frank Steinmetzger
Am Thu, Apr 20, 2023 at 04:29:59AM -0500 schrieb Dale:

> >> I wonder.  Is there a way to find out the smallest size file in a
> >> directory or sub directory, largest files, then maybe a average file
> >> size???
> > The 20 smallest:
> > `find -type f -print0 | xargs -0 stat -c '%s %n' | sort -n | head -n 20`
> >
> > The 20 largest: either use tail instead of head or reverse sorting with -r.
> > You can also first pipe the output of stat into a file so you can sort and 
> > analyse the list more efficiently, including calculating averages.
> 
> When I first run this while in / itself, it occurred to me that it
> doesn't specify what directory.  I thought maybe changing to the
> directory I want it to look at would work but get this: 

Yeah, either cd into the directory first, or pass it to find. But it’s like 
tar: I can never remember in which order I need to feed stuff to find. One 
relevant addition could be -xdev, to have find halt at file system 
boundaries. So:

find /path/to/dir -xdev -type f -! -type l …

> root@fireball /home/dale/Desktop/Crypt # `find -type f -print0 | xargs
> -0 stat -c '%s %n' | sort -n | head -n 20`
> -bash: 2: command not found
> root@fireball /home/dale/Desktop/Crypt #

I used the `` in the mail text as a kind of hint: “everything between is a 
command”. So when you paste that into the terminal, it is executed, and the 
result of it is substituted. Meaning: the command’s output is taken as the 
new input and executed. And since the first word of the output was “2”, you 
get that error message. Sorry about the confusion.

> >> I thought about du but given the number of files I have here,
> >> it would be a really HUGE list of files.  Could take hours or more too. 
> > I use a “cache” of text files with file listings of all my external drives. 
> > This allows me to glance over my entire data storage without having to plug 
> > in any drive. It uses tree underneath to get the list:
> >
> > `tree -afx -DFins --dirsfirst --du --timefmt "%Y-%m-%d %T"`
> >
> > This gives me a list of all directories and files, with their full path, 
> > date and size information and accumulated directory size in a concise 
> > format. Add -pug to also include permissions.
> >
> 
> Save this for later use.  ;-)

I built a wrapper script around it, to which I pass the directory I want to 
read (usually the root of a removable media). The script creates a new text 
file, with the current date and the dircetory in its name, and compresses it 
at the end. This allows me to diff those files in vim and see what changed 
over time. It also updates a symlink to the current version for quick access 
via bash alias.

-- 
Grüße | Greetings | Qapla’
Please do not share anything from, with or about me on any social network.

...llaw eht no rorrim ,rorriM


signature.asc
Description: PGP signature


Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on

2023-04-20 Thread Dale
Peter Humphrey wrote:
> On Thursday, 20 April 2023 10:29:59 BST Dale wrote:
>> Frank Steinmetzger wrote:
>>> Am Wed, Apr 19, 2023 at 06:32:45PM -0500 schrieb Dale:
 Frank Steinmetzger wrote:
> <<>>
>
> When formatting file systems, I usually lower the number of inodes from
> the
> default value to gain storage space. The default is one inode per 16 kB
> of
> FS size, which gives you 60 million inodes per TB. In practice, even one
> million per TB would be overkill in a use case like Dale’s media
> storage.¹
> Removing 59 million inodes × 256 bytes ≈ 15 GB of net space for each TB,
> not counting extra control metadata and ext4 redundancies.
 If I ever rearrange my
 drives again and can change the file system, I may reduce the inodes at
 least on the ones I only have large files on.  Still tho, given I use
 LVM and all, maybe that isn't a great idea.  As I add drives with LVM, I
 assume it increases the inodes as well.
>>> I remember from yesterday that the manpage says that inodes are added
>>> according to the bytes-per-inode value.
>>>
 I wonder.  Is there a way to find out the smallest size file in a
 directory or sub directory, largest files, then maybe a average file
 size???
>>> The 20 smallest:
>>> `find -type f -print0 | xargs -0 stat -c '%s %n' | sort -n | head -n 20`
>>>
>>> The 20 largest: either use tail instead of head or reverse sorting with
>>> -r.
>>> You can also first pipe the output of stat into a file so you can sort and
>>> analyse the list more efficiently, including calculating averages.
>> When I first run this while in / itself, it occurred to me that it
>> doesn't specify what directory.  I thought maybe changing to the
>> directory I want it to look at would work but get this: 
>>
>>
>> root@fireball /home/dale/Desktop/Crypt # `find -type f -print0 | xargs
>> -0 stat -c '%s %n' | sort -n | head -n 20`
>> -bash: 2: command not found
>> root@fireball /home/dale/Desktop/Crypt #
>>
>>
>> It works if I'm in the / directory but not when I'm cd'd to the
>> directory I want to know about.  I don't see a spot to change it.  Ideas.
> In place of "find -type..." say "find / -type..."
>


Ahhh, that worked.  I also realized I need to leave off the ' at the
beginning and end.  I thought I left those out.  I copy and paste a
lot.  lol 

It only took a couple dozen files to start getting up to some size. 
Most of the few small files are text files with little notes about a
video.  For example, if building something I will create a text file
that lists what is needed to build what is in the video.  Other than a
few of those, file size reaches a few 100MBs pretty quick.  So, the
number of small files is pretty small.  That is good to know. 

Thanks for the command.  I never was good with xargs, sed and such.  It
took me a while to get used to grep.  ROFL 

Dale

:-)  :-) 



Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on

2023-04-20 Thread Peter Humphrey
On Thursday, 20 April 2023 10:29:59 BST Dale wrote:
> Frank Steinmetzger wrote:
> > Am Wed, Apr 19, 2023 at 06:32:45PM -0500 schrieb Dale:
> >> Frank Steinmetzger wrote:
> >>> <<>>
> >>> 
> >>> When formatting file systems, I usually lower the number of inodes from
> >>> the
> >>> default value to gain storage space. The default is one inode per 16 kB
> >>> of
> >>> FS size, which gives you 60 million inodes per TB. In practice, even one
> >>> million per TB would be overkill in a use case like Dale’s media
> >>> storage.¹
> >>> Removing 59 million inodes × 256 bytes ≈ 15 GB of net space for each TB,
> >>> not counting extra control metadata and ext4 redundancies.
> >> 
> >> If I ever rearrange my
> >> drives again and can change the file system, I may reduce the inodes at
> >> least on the ones I only have large files on.  Still tho, given I use
> >> LVM and all, maybe that isn't a great idea.  As I add drives with LVM, I
> >> assume it increases the inodes as well.
> > 
> > I remember from yesterday that the manpage says that inodes are added
> > according to the bytes-per-inode value.
> > 
> >> I wonder.  Is there a way to find out the smallest size file in a
> >> directory or sub directory, largest files, then maybe a average file
> >> size???
> > 
> > The 20 smallest:
> > `find -type f -print0 | xargs -0 stat -c '%s %n' | sort -n | head -n 20`
> > 
> > The 20 largest: either use tail instead of head or reverse sorting with
> > -r.
> > You can also first pipe the output of stat into a file so you can sort and
> > analyse the list more efficiently, including calculating averages.
> 
> When I first run this while in / itself, it occurred to me that it
> doesn't specify what directory.  I thought maybe changing to the
> directory I want it to look at would work but get this: 
> 
> 
> root@fireball /home/dale/Desktop/Crypt # `find -type f -print0 | xargs
> -0 stat -c '%s %n' | sort -n | head -n 20`
> -bash: 2: command not found
> root@fireball /home/dale/Desktop/Crypt #
> 
> 
> It works if I'm in the / directory but not when I'm cd'd to the
> directory I want to know about.  I don't see a spot to change it.  Ideas.

In place of "find -type..." say "find / -type..."

-- 
Regards,
Peter.






Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on

2023-04-20 Thread Dale
Peter Humphrey wrote:
> On Wednesday, 19 April 2023 18:59:26 BST Dale wrote:
>> Peter Humphrey wrote:
>>> On Wednesday, 19 April 2023 09:00:33 BST Nikos Chantziaras wrote:
 With my HDD:
# smartctl -x /dev/sda | grep -i 'sector size'
Sector Sizes: 512 bytes logical, 4096 bytes physical
>>> Or, with an NVMe drive:
>>>
>>> # smartctl -x /dev/nvme1n1 | grep -A2 'Supported LBA Sizes'
>>> Supported LBA Sizes (NSID 0x1)
>>> Id Fmt  Data  Metadt  Rel_Perf
>>>
>>>  0 + 512   0 0
>>>  
>>> :)
>> When I run that command, sdd is my SDD drive, ironic I know.  Anyway, it
>> doesn't show block sizes.  It returns nothing.
> I did say it was for an NVMe drive, Dale. If your drive was one of those, the 
> kernel would have named it /dev/nvme0n1 or similar.
>

Well, I was hoping it would work on all SDD type drives.  ;-) 

Dale

:-)  :-)



Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on

2023-04-20 Thread Dale
eric wrote:
> On 4/19/23 21:23, Dale wrote:
>> Mark Knecht wrote:
>>>
>>> > I wonder.  Is there a way to find out the smallest size file in a
>>> directory or sub directory, largest files, then maybe a average file
>>> size???  I thought about du but given the number of files I have
>>> here, it would be a really HUGE list of files. Could take hours or
>>> more too.  This is what KDE properties shows.
>>>
>>> I'm sure there are more accurate ways but
>>>
>>> sudo ls -R / | wc
>>>
>>> give you the number of lines returned from the ls command. It's not
>>> perfect as there are blank lines in the ls but it's a start.
>>>
>>> My desktop machine has about 2.2M files.
>>>
>>> Again, there are going to be folks who can tell you how to remove
>>> blank lines and other cruft but it's a start.
>>>
>>> Only takes a minute to run on my Ryzen 9 5950X. YMMV.
>>>
>>
>> I did a right click on the directory in Dolphin and selected
>> properties.  It told me there is a little over 55,000 files.  Some
>> 1,100 directories, not sure if directories use inodes or not.
>> Basically, there is a little over 56,000 somethings on that file
>> system.  I was curious what the smallest file is and the largest. No
>> idea how to find that really.  Even du separates by directory not
>> individual files regardless of directory.  At least the way I use it
>> anyway.
>>
>> If I ever have to move things around again, I'll likely start a
>> thread just for figuring out the setting for inodes.  I'll likely
>> know more about the number of files too.
>>
>> Dale
>>
>> :-)  :-)
>
> If you do not mind using graphical solutions, Filelight can help you
> easily visualize where your largest directories and files are residing.
>
> https://packages.gentoo.org/packages/kde-apps/filelight
>
>> Visualise disk usage with interactive map of concentric, segmented rings 
>
> Eric
>
> .
>

There used to be a KDE app that worked a bit like this.  I liked it but
I think it died.  I haven't seen it in ages, not long after the switch
from KDE3 to KDE4 I think.  Given the volume of files and the size of
the data, I wish I could zoom in sometimes.  Those little ones disappear. 

Thanks for that info. Nifty. 

Dale

:-)  :-) 



Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on

2023-04-20 Thread Peter Humphrey
On Wednesday, 19 April 2023 18:59:26 BST Dale wrote:
> Peter Humphrey wrote:
> > On Wednesday, 19 April 2023 09:00:33 BST Nikos Chantziaras wrote:
> >> With my HDD:
> >># smartctl -x /dev/sda | grep -i 'sector size'
> >>Sector Sizes: 512 bytes logical, 4096 bytes physical
> > 
> > Or, with an NVMe drive:
> > 
> > # smartctl -x /dev/nvme1n1 | grep -A2 'Supported LBA Sizes'
> > Supported LBA Sizes (NSID 0x1)
> > Id Fmt  Data  Metadt  Rel_Perf
> > 
> >  0 + 512   0 0
> >  
> > :)
> 
> When I run that command, sdd is my SDD drive, ironic I know.  Anyway, it
> doesn't show block sizes.  It returns nothing.

I did say it was for an NVMe drive, Dale. If your drive was one of those, the 
kernel would have named it /dev/nvme0n1 or similar.

-- 
Regards,
Peter.






Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on

2023-04-20 Thread Dale
Frank Steinmetzger wrote:
> Am Wed, Apr 19, 2023 at 06:32:45PM -0500 schrieb Dale:
>> Frank Steinmetzger wrote:
>>> <<>>
>>>
>>> When formatting file systems, I usually lower the number of inodes from the 
>>> default value to gain storage space. The default is one inode per 16 kB of 
>>> FS size, which gives you 60 million inodes per TB. In practice, even one 
>>> million per TB would be overkill in a use case like Dale’s media storage.¹ 
>>> Removing 59 million inodes × 256 bytes ≈ 15 GB of net space for each TB, 
>>> not 
>>> counting extra control metadata and ext4 redundancies.
>> If I ever rearrange my
>> drives again and can change the file system, I may reduce the inodes at
>> least on the ones I only have large files on.  Still tho, given I use
>> LVM and all, maybe that isn't a great idea.  As I add drives with LVM, I
>> assume it increases the inodes as well.
> I remember from yesterday that the manpage says that inodes are added 
> according to the bytes-per-inode value.
>
>> I wonder.  Is there a way to find out the smallest size file in a
>> directory or sub directory, largest files, then maybe a average file
>> size???
> The 20 smallest:
> `find -type f -print0 | xargs -0 stat -c '%s %n' | sort -n | head -n 20`
>
> The 20 largest: either use tail instead of head or reverse sorting with -r.
> You can also first pipe the output of stat into a file so you can sort and 
> analyse the list more efficiently, including calculating averages.

When I first run this while in / itself, it occurred to me that it
doesn't specify what directory.  I thought maybe changing to the
directory I want it to look at would work but get this: 


root@fireball /home/dale/Desktop/Crypt # `find -type f -print0 | xargs
-0 stat -c '%s %n' | sort -n | head -n 20`
-bash: 2: command not found
root@fireball /home/dale/Desktop/Crypt #


It works if I'm in the / directory but not when I'm cd'd to the
directory I want to know about.  I don't see a spot to change it.  Ideas.

>> I thought about du but given the number of files I have here,
>> it would be a really HUGE list of files.  Could take hours or more too. 
> I use a “cache” of text files with file listings of all my external drives. 
> This allows me to glance over my entire data storage without having to plug 
> in any drive. It uses tree underneath to get the list:
>
> `tree -afx -DFins --dirsfirst --du --timefmt "%Y-%m-%d %T"`
>
> This gives me a list of all directories and files, with their full path, 
> date and size information and accumulated directory size in a concise 
> format. Add -pug to also include permissions.
>

Save this for later use.  ;-)

Dale

:-)  :-) 



Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on

2023-04-20 Thread Frank Steinmetzger
Am Wed, Apr 19, 2023 at 06:09:15PM -0700 schrieb Mark Knecht:
> > I wonder.  Is there a way to find out the smallest size file in a
> directory or sub directory, largest files, then maybe a average file
> size???  I thought about du but given the number of files I have here, it
> would be a really HUGE list of files.  Could take hours or more too.  This
> is what KDE properties shows.
> 
> I'm sure there are more accurate ways but
> 
> sudo ls -R / | wc

Number of directories (not accounting for symlinks):
find -type d | wc -l

Number of files (not accounting for symlinks):
find -type f | wc -l

> give you the number of lines returned from the ls command. It's not perfect
> as there are blank lines in the ls but it's a start.
> 
> My desktop machine has about 2.2M files.
> 
> Again, there are going to be folks who can tell you how to remove blank
> lines and other cruft but it's a start.

Or not produce them in the first place. ;-)

> Only takes a minute to run on my Ryzen 9 5950X. YMMV.

It’s not a question of the processor, but of the storage device. And if your 
cache, because the second run will probably not use the device at all.

-- 
Grüße | Greetings | Qapla’
Please do not share anything from, with or about me on any social network.

Bosses are like timpani: the more hollow they are, the louder they sound.


signature.asc
Description: PGP signature


Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on

2023-04-20 Thread Frank Steinmetzger
Am Wed, Apr 19, 2023 at 06:32:45PM -0500 schrieb Dale:
> Frank Steinmetzger wrote:
> > <<>>
> >
> > When formatting file systems, I usually lower the number of inodes from the 
> > default value to gain storage space. The default is one inode per 16 kB of 
> > FS size, which gives you 60 million inodes per TB. In practice, even one 
> > million per TB would be overkill in a use case like Dale’s media storage.¹ 
> > Removing 59 million inodes × 256 bytes ≈ 15 GB of net space for each TB, 
> > not 
> > counting extra control metadata and ext4 redundancies.
> 
> If I ever rearrange my
> drives again and can change the file system, I may reduce the inodes at
> least on the ones I only have large files on.  Still tho, given I use
> LVM and all, maybe that isn't a great idea.  As I add drives with LVM, I
> assume it increases the inodes as well.

I remember from yesterday that the manpage says that inodes are added 
according to the bytes-per-inode value.

> I wonder.  Is there a way to find out the smallest size file in a
> directory or sub directory, largest files, then maybe a average file
> size???

The 20 smallest:
`find -type f -print0 | xargs -0 stat -c '%s %n' | sort -n | head -n 20`

The 20 largest: either use tail instead of head or reverse sorting with -r.
You can also first pipe the output of stat into a file so you can sort and 
analyse the list more efficiently, including calculating averages.

> I thought about du but given the number of files I have here,
> it would be a really HUGE list of files.  Could take hours or more too. 

I use a “cache” of text files with file listings of all my external drives. 
This allows me to glance over my entire data storage without having to plug 
in any drive. It uses tree underneath to get the list:

`tree -afx -DFins --dirsfirst --du --timefmt "%Y-%m-%d %T"`

This gives me a list of all directories and files, with their full path, 
date and size information and accumulated directory size in a concise 
format. Add -pug to also include permissions.

-- 
Grüße | Greetings | Qapla’
Please do not share anything from, with or about me on any social network.

Computers are the most congenial product of human laziness to-date.


signature.asc
Description: PGP signature