Giter Site home page Giter Site logo

go-losetup's People

Contributors

freddierice avatar krisdiano avatar tych0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-losetup's Issues

tag new release?

hey!
it'd be great to tag a new release with the latest commits at some point :-)

unable to mount partition after losetup

Thanks for the great package!

I use the example program to attach one device, but seems like unable to mount it. Can you help with it?

# losetup
NAME       SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE                DIO LOG-SEC
/dev/loop0         0      0         0  0 /tmp/deploy/newimage.img   0     512

# fdisk -l
Disk /dev/loop0: 4.9 GiB, 5242880000 bytes, 10240000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9f0032d8

Device       Boot   Start      End Sectors  Size Id Type
/dev/loop0p1 *       2048  2099199 2097152    1G 83 Linux
/dev/loop0p2      2099200  3123199 1024000  500M 82 Linux swap / Solaris
/dev/loop0p3      3123200 10239999 7116800  3.4G 83 Linux

# mount /dev/loop0p1 ./tt/
mount: /tmp/deploy/tt: special device /dev/loop0p1 does not exist.

Try again on -EAGAIN from SetInfo64 syscall

See https://lkml.org/lkml/2021/6/15/185, w/ the upstream util-linux maintainer agreeing to do likewise for the command-line losetup tool.

This error can also happen while changing the block size.

It's not unreasonable to make this the caller's job (so they can make decisions about number of retries, delays between them, etc); but it's probably worth documenting the need for the caller to check for the case if that's the chosen behavior.

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.