Giter Club home page Giter Club logo

Comments (4)

Drewsif avatar Drewsif commented on July 30, 2024

If the path is on another hard drive then it will read from the one the write it to the other. For example pishrink.sh /home/me/saved.img /mnt/external/shrunk.img will copy it and do the work on the other drive. It does copy the entire file then work on it, but there is not a good way to avoid that sadly.

Does that answer your question?

from pishrink.

heikoh81 avatar heikoh81 commented on July 30, 2024

Thanks for your answer, but my question remains open.

I understand the original syntax (which I tried, of course).
But as you describe, the file ist copied first, than worked on.
The copy-process is ok, but the working process not, as it needs a lot simulataneous read/write operations, thus putting the target drive under a lot of stress.
In regards to hard drive life, it would be much better if one drive only reads and the other only writes...
But if the linux tools used in your script need to work on the file directly, than there probably is no way around this.

(Ramdisk is (not yet) an option, as I'm using 16GB SD-Cards in my Raspis and even on my main PC I only have 16 GB RAM...)

from pishrink.

framps avatar framps commented on July 30, 2024

The primary tool used by pishrink is resize2fs. This tool resizes a filesystem in place but there is no way to separate reads and writes on different devices with this tool. In fact it's possible to write a tool which does exactly what you want. But I don't know of this kind of tool.

Your idea to use a ramdisk sounds to be an alternate way to shrink a filesystem in memory.

But frankly: If you use a ssd or plain old disk - I don't see any stress issue. There is indeed some stress issue with a SD card so whenever you have to resize an image use some kind of disk instead of sd card and you're fine.

from pishrink.

heikoh81 avatar heikoh81 commented on July 30, 2024

Ok, I understand and it is ok then.

from pishrink.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.