All of lore.kernel.org
 help / color / mirror / Atom feed
From: worley@alum.mit.edu (Dale R. Worley)
To: Lucio Crusca <lucio@sulweb.org>
Cc: util-linux@vger.kernel.org
Subject: Re: [BUG] losetup: support for physical devices
Date: Sun, 25 Jan 2015 22:21:09 -0500	[thread overview]
Message-ID: <87mw56jkgq.fsf@hobgoblin.ariadne.com> (raw)
In-Reply-To: <m96ard$qu8$1@ger.gmane.org> (lucio@sulweb.org)

Lucio Crusca <lucio@sulweb.org> writes:
> During a disaster recovery I found that losetup either 
>
> 1. does not support creating loop devices that target physical devices. In 
> this case I think there exists a compelling reason to support them 
> (http://serverfault.com/questions/659484) and this bug report is a wishlist 
> bug 
>
> or 
>
> 2. it does support physical devices, but it is an undocumented feature (at 
> least in the manpage) and the warning it issues is misleading beacuse it 
> makes you think it doesn't support them ("losetup: /dev/sdc2: warning: file 
> smaller than 512 bytes, the loop device maybe be useless or invisible for 
> system tools"). In this case this could be a documentation bug.
>
> I haven't tested which of the two possibilities is the real situation, but 
> I'm pretty sure you already know.

I don't recall what I've done that convinced me, but I'm *sure* that you
can do

    losetup -o [offset] {-f[--show]|loopdev} /dev/sdXXX

This is implicit throughout Linux, because any block device is also a
"file", and can be read/written as such.  (You just can't change its
size.)

What command are you executing?  What error are you seeing?

Dale

  parent reply	other threads:[~2015-01-26  3:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 17:59 [BUG] losetup: support for physical devices Lucio Crusca
2015-01-14 20:08 ` Karel Zak
2015-01-14 20:13 ` Karel Zak
2015-01-26  3:21 ` Dale R. Worley [this message]
2015-01-26  5:06   ` Peter Cordes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mw56jkgq.fsf@hobgoblin.ariadne.com \
    --to=worley@alum.mit.edu \
    --cc=lucio@sulweb.org \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.