r/linux_programming • • Dec 27 '23

How can I have my storage in another server?

7 Upvotes

Guys I'm tired of dealing with the storage every time something comes up with my site, and it's becoming costly to have more SSD drives added to the server

I need more space and I don't want to go through hell every time I need more space , or worse... when I need to change my site server,

Plus it's starting to become ridiculously expensive to add more SSDs ( currently 7TB worth of data, expecting around 800GB more data every month )

I saw a lot of ppl mentions things like cephFS, Lvm, NAS BUT almost every video I found about this is talking about building storage server remotely in (Home, office, etc...)

What I'm interested in is finding how to apply any of these to a server I make solely for storage purposes, and have my main server unshackled from storage headache *server here refers to a rented online server*

Here's info related to my question:

- Storage data type?

Mainly images- Is writing speed important?

No

- Is reading speed important?

Super important!

- What's the data mainly used for?

To be only viewed by the site users, nothing else, no modifying by users, no nothing

-How frequently you need to modify the data?

Almost never, sometimes (very rarely) I need to delete some files and replace them with others, that's it

- What's the budget?

I'm currently paying $10.00 monthly for every 1TB (SSD) , which means I'll have to pay $120 monthly for my next upgrade...not to mention being tied to specific hosts due to storage constraints which makes me currently pays around $250 monthly which is a heck of a lot for the amount of value actually provided...

Just having the storage in another server alone will cut my server costs to 50%So what I'm interested in is... can deploying the methods mentioned above ( cephFS, Lvm, NAS) reduce the cost per TB as well?


r/linux_programming • • Dec 06 '23

Should I use references to the udev context and device using libudev?

7 Upvotes

Hi there! Can someone help me in the understanding of the libudev library? My question about using udev_ref and udev_device_ref in the example below: should I use them?

#include <stdio.h>
#include <libudev.h>

struct udev *udev;
struct udev_device *udev_device;

int main (void) {
    // Get a libudev context
    udev = udev_new();

    // Make a reference to the libudev context
    udev = udev_ref(udev);

    // Get a udev device
    udev_device = udev_device_new_from_syspath(
        udev,
        "/sys/class/power_supply/BAT0"
    );

    // Make a reference to the udev device
    udev_device = udev_device_ref(udev_device);

    // Get a udev device sysname
    const char *sysname = udev_device_get_sysname(udev_device);

    printf("udev sysname: %s\n", sysname);

    // Drop references
    udev_device_unref(udev_device);
    udev_unref(udev);

    return 0;
}

Actually I don't understand for which cases there are references, because we already have suitable objects from the udev_new and udev_device_new_from_syspath.


r/linux_programming • • Oct 20 '23

What is a lightweight Linux distribution that is capable of handling all development tools for installation as a v VM?

7 Upvotes

Hello, everyone,

I would like to set up a Linux distribution as a development virtual machine (VM). Currently, I am using Ubuntu 22.04, which takes up 20 gigabytes of space. After installing only the command-line development tools and Docker, I've noticed that the VM's size keeps increasing. I primarily use it for C++, Go, and JavaScript development.

My question is, which lightweight Linux distribution should I use that can accommodate and support all common command-line interface (CLI) development tools? I'm using VirtualBox on Windows
Thanks


r/linux_programming • • Aug 02 '23

Oops! XFS maintainer Darrick J. Wong had enough and bid adieu

Thumbnail lore.kernel.org
7 Upvotes

r/linux_programming • • May 23 '23

GNU Binutils Prepares For Intel FRED/LKGS

Thumbnail
phoronix.com
7 Upvotes

r/linux_programming • • May 20 '23

Debugging a FUSE deadlock in the Linux kernel

Thumbnail netflixtechblog.com
7 Upvotes

r/linux_programming • • Apr 16 '23

Unwinding the stack the hard way

Thumbnail lesenechal.fr
7 Upvotes

r/linux_programming • • Mar 18 '23

Linux Plumbers Conference 2023 ....November 13th, 14th and 15th at Richmond, VA

Thumbnail
lpc.events
7 Upvotes

r/linux_programming • • Mar 16 '23

What's the shortest thread sleep time that's possible on Linux?

7 Upvotes

How short can sleep durations be? 100 micro seconds? And how are really short sleeps executed?


r/linux_programming • • Feb 27 '23

GOTOphobia considered harmful (in C)

Thumbnail blog.joren.ga
7 Upvotes

r/linux_programming • • Jan 09 '23

Cannot get -l flags to be added with Makefile.am and autotools

7 Upvotes

work hat humorous telephone ring gold offend lock knee clumsy

This post was mass deleted and anonymized with Redact


r/linux_programming • • Aug 18 '22

Feeling conflicted

7 Upvotes

Hello fellow linux users, today I come to you with a personal issue. I really like the idea of making my projects open source and I know many of you like that too I mean that's one of the main selling points of going to linux but I feel as if there's some major downsides along with my embarrassing and messy code


r/linux_programming • • May 24 '22

loadwebViewEventHack

7 Upvotes

Found this in the files of a preinstalled weather app called Express Weather. Is this a normal command?


r/linux_programming • • May 20 '22

How can I solve this issue?

7 Upvotes

Whenever I try to run an appimage file (I don't know if that's the technical term. I'm kind of new here) I get this error when running with sudo but I can't run it without it. Here is what I get (I'm trying to install Unity)

./UnityHub.AppImage: 1: �: not found

./UnityHub.AppImage: 2: }�P7pys?H��_f��h: not found

./UnityHub.AppImage: 1: �b�@@: not found

./UnityHub.AppImage: 1: ELFAI: not found

./UnityHub.AppImage: 19: Syntax error: Unterminated quoted string

If I did anoything wrong posting this, let me know. Like I said, I'm new here so I don't quite know what I'm doing


r/linux_programming • • Dec 28 '21

Create Mouse Cursor using Xlib and Qt

7 Upvotes

I have been trying to figure out exactly how to create a mouse cursor for my home-made window manager ,ace with Xlib and Qt but everything I’ve found on the internet is explaining how to change an already created cursor. Am I just misinterpreting what the resources are saying? Does it also work for creating the mouse cursor?


r/linux_programming • • Dec 28 '21

Mass file renaming .mp3 .aiff and .flac files?

7 Upvotes

Hey guys, I was wondering if there was a program that was already made that would grab the ID3 info and rename the file as: Artist - Song (remix if applicable) - release number?

If not, how hard would it be to write something like this?


r/linux_programming • • Dec 23 '21

Qt Application Deployed to Raspberry Pi

7 Upvotes

I was wondering how one might deploy a Qt application made on their PC to a Raspberry Pi. I’ve found a lot of tutorials showing how to install Qt Creator on the Raspberry Pi but none on how to cross compile to the Raspberry Pi.


r/linux_programming • • Oct 05 '21

A nood to Linux. Do you memorize codes/scripts?

7 Upvotes

I am just getting into Linux. I have plaid around with Windows computer hardware for years but don't even have experience with windows commands or networking. Now that I have started to get into Linux, I was wondering if any veterans, or anyone that deals with command lines, has to, or does, remember all their commands for setting up a new computer. Are you doing it all by memory or, do you use a reference of some kind when typing (or copy&pasting) all those codes?

I get that the more you do it, the more will stick but, can you really do a complete Linux server install by memory, or do you have a doc saved somewhere as your "cheat card"?


r/linux_programming • • Oct 04 '21

Simple script to solve a deadlock?

7 Upvotes

I'm new to Linux and I have to do a simple script that uses the OS resources to solve a deadlock but I don't know where to find a book or video specifically about this, if you can recommend any to me it would be awesome.


r/linux_programming • • Oct 02 '21

Script to rename files in a directory? (pattern match)

7 Upvotes

Hi Everyone!

I have a directory with a ton of files and I need to find all of the ones that have a pattern that looks like the one below:

first part-second part.extension

And rename them to look like:

first part - second part.extension

Some of the files already have files named like:

first part - second part.extension

I would like to ignore those but honestly, I don't think it will matter much if they are also renamed to make them look like:

first part  -  second part.extension

I sure remember learning how to do this in a class .... 20 years ago when I still had hair.... but for the life of me I can't remember how to do it. Something to do with shell parameter expansion but I can't figure out the syntax. I would really appreciate a little help. Thank you!


r/linux_programming • • Aug 31 '21

xclock & on linux/unix shell

7 Upvotes

When I type this command into a shell I get a clock that pops up on my system, and a number also pops up. Does anyone know what the number is?


r/linux_programming • • Aug 22 '21

FLTK and X11

7 Upvotes

I want to create a window manager and have heard that Xlib is a common toolkit used for this sort of thing but I’m wondering if it’s possible to use FLTK instead.


r/linux_programming • • Aug 19 '21

GTK DE Development

7 Upvotes

I was wondering if it were possible to use GTK to create a desktop environment.


r/linux_programming • • Jul 11 '21

I'm trying to make a torrent downloading system, and need to have a script download a file off a website (basically scraping and finding a specific point)

7 Upvotes

The system is basically me sending a movie name somehow, and it downloading the movie on to an FTP

Anyone know of a script of some kind that can do that?

I'm kind of a beginner so this might be a dumb question