Displaying 12 results from an estimated 12 matches for "loopdev".
2010 Jul 08
0
Bug#588406: xen-utils-common: /etc/xen/scripts/block not driving helper scripts; XEN_SCRIPT_DIR not properly set
...opback_helper() {
local next_devnum=0
local busy_devnum
while read busy_devnum; do
if [ "$next_devnum" != "$busy_devnum" ]; then
break
fi
let next_devnum=$next_devnum+1
done
echo "/dev/loop${next_devnum}"
}
find_free_loopback_dev() {
local loopdev
loopdev=$(losetup -a | sed -e 's+^/dev/loop++' -e 's/:.*//' | find_free_loopback_helper)
if [ -n "$loopdev" ] && [ -b "$loopdev" ]; then
echo "$loopdev"
fi
}
check_sharing()
{
local dev="$1"
local mode="$2"
lo...
2018 Aug 20
1
[PATCH nbdkit] tests: Add a root only test of the file plugin with
In libguestfs we have a few tests that require root privileges and
they are skipped by default (normally you should not build or test as
root), but you can do this to run them:
sudo make check-root
In nbdkit I wanted to check that the file plugin works with block
devices (this is not tested), and the only way I can sensibly think to
do this is using a loopback device and root. This commit
2009 Aug 23
0
Bug#503044: xen-utils-common: should make the loopback device default to supporting more nodes
...o maybe this problem is better solved by teaching /etc/xen/scripts/block
to mknod a new loop device if it can?t find one free. Untested patch:
--- xen-common/tools/hotplug/Linux/block
+++ xen-common/tools/hotplug/Linux/block
@@ -329,6 +329,13 @@
fi
done
+ if [ "$loopdev" = '' ]
+ then
+ loopdev=$(seq -f '/dev/loop%.f' 0 1048575 | \
+ grep -Fxv -m1 -f <(echo /dev/loop* | tr ' ' '\n')) && \
+ mknod "$loopdev" b 7 "${loopdev#/dev/loop}"
+ fi
+...
2012 Apr 02
3
booting a dos floppy from a disk image over pxe
Hello,
I'm trying to boot a dos floppy stored on a disk image which is initially
loaded over pxe using memdisk.
I've created the disk image as follows:
dd if=/dev/zero of=$IMGLOCATION/$IMGNAME bs=$(( 1024 * 1024 )) count=20
LOOPDEV=$(losetup --show -f $IMGLOCATION/$IMGNAME)
MAJOR_MINOR=$(ls -l $LOOPDEV|awk '{print $5$6}'|sed 's/,/:/')
DMSIZE=$(( $(ls -l $IMGLOCATION/$IMGNAME|awk '{print $5}') / 512 ))
echo 0 $DMSIZE linear $MAJOR_MINOR 0|dmsetup create hdz
fdisk /dev/mapper/hdz<<EOT
n
p
1
t
6
a...
2005 Dec 21
1
/dev/loopX not released when domU terminates ?
Hello all,
I have some DomU''s with root and swap images
on files under Xen 3.0.0
Investigating some cases of boot failure of domUs,
I stumbled upon the fact that when a domU is shutdown
via xm shutdown, not all of its images are released
from their /dev/loopX - devices.
That is,
for i in /dev/loop*; do losetup $i; done
still shows output for that image.
It seems to me that the
2005 Jan 20
2
lomount: handy for file-backed VBDs
Hey all,
This utility (from Qemu) might be useful to anyone who has multiple partitions
on a file-backed VBD and wants occasionally to mount them in dom0.
http://www.dad-answers.com/qemu/utilities/QEMU-HD-Mounter/lomount/
You can tell it what partition to mount out of the file and it sorts out the
offsets, etc. by parsing the partition table. This allows you to get around
the loop
2010 Oct 24
4
Determine if a given fs is a btrfs fs
Hi,
I''ve some btrfs fs which are encrypted with loopaes.
I decrypt them in a script during bootup. Now I want to determine if the decrypted fs
is a btrfs fs. If not I missspelled the password and I can handle that error in my
script.
Thanks for any help!
Felix
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to
2018 Sep 07
0
[PATCH nbdkit 3/6] file: Make the file= parameter into a magic config key.
...have to wait a short time for the pid file to appear.
for i in `seq 1 10`; do
diff --git a/tests/test-file-block.c b/tests/test-file-block.c
index f053242..e2ea068 100644
--- a/tests/test-file-block.c
+++ b/tests/test-file-block.c
@@ -124,9 +124,8 @@ main (int argc, char *argv[])
atexit (detach_loopdev);
/* Start nbdkit. */
- snprintf (buf, sizeof buf, "file=%s", loopdev);
if (test_start_nbdkit ("-D", "file.zero=1",
- "file", buf, NULL) == -1)
+ "file", loopdev, NULL) == -1)
exit (EXIT_...
2018 Sep 08
0
[PATCH nbdkit v2 3/6] file: Make the file= parameter into a magic config key.
...have to wait a short time for the pid file to appear.
for i in `seq 1 10`; do
diff --git a/tests/test-file-block.c b/tests/test-file-block.c
index f053242..e2ea068 100644
--- a/tests/test-file-block.c
+++ b/tests/test-file-block.c
@@ -124,9 +124,8 @@ main (int argc, char *argv[])
atexit (detach_loopdev);
/* Start nbdkit. */
- snprintf (buf, sizeof buf, "file=%s", loopdev);
if (test_start_nbdkit ("-D", "file.zero=1",
- "file", buf, NULL) == -1)
+ "file", loopdev, NULL) == -1)
exit (EXIT_...
2018 Sep 07
7
[PATCH nbdkit 0/6] plugins: Implement magic config key.
Remove the need to use file= (and in future other) parameters for many
plugins. eg. Using the file plugin becomes:
nbdkit file disk.img
Rich.
2018 Sep 08
8
[PATCH nbdkit v2 0/6] plugins: Implement magic config key.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-September/msg00024.html
v2:
- As discussed in the patch review, tighten up the characters
permitted in keys.
- Update documentation to note that relative paths can be made
safe by prefixing with ./ and absolute paths do not need any
extra steps.
- I pushed patch 1/6 from the v1 series since it was just a trivial
2018 Sep 10
7
[PATCH nbdkit v3 0/6] plugins: Implement magic config key.
v1: https://www.redhat.com/archives/libguestfs/2018-September/msg00024.html
v2: https://www.redhat.com/archives/libguestfs/2018-September/msg00034.html
v3:
- Fixed is_config_key zero length test.
- Fixed is_config_key so it uses strspn and is not O(n^2).
- Changed >= 1.7 to >= 1.8 in the documentation.
Rich.