New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant map external HDD #28

Open
gidoBOSSftw5731 opened this Issue Aug 7, 2018 · 24 comments

Comments

Projects
None yet
2 participants
@gidoBOSSftw5731

gidoBOSSftw5731 commented Aug 7, 2018

So I got your program to run, and I have a drive I want to speed up, but I keep on getting a error:

gido5731@gido-desk ~ % sudo rapiddisk --cache-map rd0 /dev/sdh1 wt
rapiddisk 5.2
Copyright 2011 - 2018 Petros Koutoupis

device-mapper: reload ioctl on rc-wt_sdh1  failed: Invalid argument
Command failed
Error. Unable to create map. Please verify all input values are correct.

and I dont know why.

root@gido-desk ~ # rapiddisk --list
rapiddisk 5.2
Copyright 2011 - 2018 Petros Koutoupis

List of RapidDisk device(s):

 RapidDisk Device 1: rd0	Size (KB): 16777216

List of RapidDisk-Cache mapping(s):

  None
@pkoutoupis

This comment has been minimized.

Show comment
Hide comment
@pkoutoupis

pkoutoupis Aug 7, 2018

Owner

It will not work on an already mounted device. Is this the case? Please verify with the df or mount command. You would first need to umount /dev/sdh1 and then map the device and then remount the newly registered /dev/mapper/

Owner

pkoutoupis commented Aug 7, 2018

It will not work on an already mounted device. Is this the case? Please verify with the df or mount command. You would first need to umount /dev/sdh1 and then map the device and then remount the newly registered /dev/mapper/

@pkoutoupis pkoutoupis self-assigned this Aug 7, 2018

@pkoutoupis pkoutoupis added the question label Aug 7, 2018

@gidoBOSSftw5731

This comment has been minimized.

Show comment
Hide comment
@gidoBOSSftw5731

gidoBOSSftw5731 Aug 7, 2018

I definitely unmounted it before doing work on it, if I hadnt I would know from the following error:

root@gido-desk ~ # sudo rapiddisk --cache-map rd0 /dev/sdh1 wt
rapiddisk 5.2
Copyright 2011 - 2018 Petros Koutoupis

/dev/sdh1 is currently mounted. Please "umount" and retry.

gidoBOSSftw5731 commented Aug 7, 2018

I definitely unmounted it before doing work on it, if I hadnt I would know from the following error:

root@gido-desk ~ # sudo rapiddisk --cache-map rd0 /dev/sdh1 wt
rapiddisk 5.2
Copyright 2011 - 2018 Petros Koutoupis

/dev/sdh1 is currently mounted. Please "umount" and retry.
@pkoutoupis

This comment has been minimized.

Show comment
Hide comment
@pkoutoupis

pkoutoupis Aug 7, 2018

Owner

You are right. Anyway, what does the syslog show? The device mapper module should be printing something during the time the programs exits.

Owner

pkoutoupis commented Aug 7, 2018

You are right. Anyway, what does the syslog show? The device mapper module should be printing something during the time the programs exits.

@pkoutoupis

This comment has been minimized.

Show comment
Hide comment
@pkoutoupis

pkoutoupis Aug 7, 2018

Owner

Also, what kernel are you using (uname -a)?

Owner

pkoutoupis commented Aug 7, 2018

Also, what kernel are you using (uname -a)?

@gidoBOSSftw5731

This comment has been minimized.

Show comment
Hide comment
@gidoBOSSftw5731

gidoBOSSftw5731 Aug 7, 2018

uname:

Linux gido-desk 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

syslog:

gido5731@gido-desk ~ % cat /var/log/syslog |grep rapidd
Aug  7 14:33:58 gido-desk kernel: [947634.348158] rapiddisk: Attached rd0 of 17179869184 bytes in size.
Aug  7 14:36:43 gido-desk kernel: [947799.846964] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:37:32 gido-desk kernel: [947848.370873] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:37:50 gido-desk kernel: [947867.050961] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:37:53 gido-desk kernel: [947869.187229] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:38:22 gido-desk kernel: [947898.338956] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:38:32 gido-desk kernel: [947908.576784] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:40:44 gido-desk kernel: [948040.785980] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:42:01 gido-desk kernel: [948117.588922] rapiddisk: Detached rd0.
Aug  7 14:42:14 gido-desk kernel: [948130.126605] rapiddisk: Attached rd0 of 17179869184 bytes in size.
Aug  7 14:44:44 gido-desk kernel: [948280.527969] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:53:12 gido-desk kernel: [948788.792929] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:57:00 gido-desk kernel: [949016.818869] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:57:02 gido-desk kernel: [949018.650873] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 15:13:54 gido-desk kernel: [950030.631883] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
gido5731@gido-desk ~ % cat /var/log/syslog |grep ioctl 
Aug  7 14:36:43 gido-desk kernel: [947799.846966] device-mapper: ioctl: error adding target to table
Aug  7 14:37:32 gido-desk kernel: [947848.370875] device-mapper: ioctl: error adding target to table
Aug  7 14:37:50 gido-desk kernel: [947867.050963] device-mapper: ioctl: error adding target to table
Aug  7 14:37:53 gido-desk kernel: [947869.187231] device-mapper: ioctl: error adding target to table
Aug  7 14:38:22 gido-desk kernel: [947898.338958] device-mapper: ioctl: error adding target to table
Aug  7 14:38:32 gido-desk kernel: [947908.576787] device-mapper: ioctl: error adding target to table
Aug  7 14:40:44 gido-desk kernel: [948040.785982] device-mapper: ioctl: error adding target to table
Aug  7 14:44:44 gido-desk kernel: [948280.527971] device-mapper: ioctl: error adding target to table
Aug  7 14:53:12 gido-desk kernel: [948788.792932] device-mapper: ioctl: error adding target to table
Aug  7 14:57:00 gido-desk kernel: [949016.818871] device-mapper: ioctl: error adding target to table
Aug  7 14:57:02 gido-desk kernel: [949018.650875] device-mapper: ioctl: error adding target to table
Aug  7 15:13:54 gido-desk kernel: [950030.631886] device-mapper: ioctl: error adding target to table

full syslog: https://imagen.click/i/773c31

gidoBOSSftw5731 commented Aug 7, 2018

uname:

Linux gido-desk 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

syslog:

gido5731@gido-desk ~ % cat /var/log/syslog |grep rapidd
Aug  7 14:33:58 gido-desk kernel: [947634.348158] rapiddisk: Attached rd0 of 17179869184 bytes in size.
Aug  7 14:36:43 gido-desk kernel: [947799.846964] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:37:32 gido-desk kernel: [947848.370873] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:37:50 gido-desk kernel: [947867.050961] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:37:53 gido-desk kernel: [947869.187229] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:38:22 gido-desk kernel: [947898.338956] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:38:32 gido-desk kernel: [947908.576784] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:40:44 gido-desk kernel: [948040.785980] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:42:01 gido-desk kernel: [948117.588922] rapiddisk: Detached rd0.
Aug  7 14:42:14 gido-desk kernel: [948130.126605] rapiddisk: Attached rd0 of 17179869184 bytes in size.
Aug  7 14:44:44 gido-desk kernel: [948280.527969] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:53:12 gido-desk kernel: [948788.792929] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:57:00 gido-desk kernel: [949016.818869] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 14:57:02 gido-desk kernel: [949018.650873] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
Aug  7 15:13:54 gido-desk kernel: [950030.631883] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
gido5731@gido-desk ~ % cat /var/log/syslog |grep ioctl 
Aug  7 14:36:43 gido-desk kernel: [947799.846966] device-mapper: ioctl: error adding target to table
Aug  7 14:37:32 gido-desk kernel: [947848.370875] device-mapper: ioctl: error adding target to table
Aug  7 14:37:50 gido-desk kernel: [947867.050963] device-mapper: ioctl: error adding target to table
Aug  7 14:37:53 gido-desk kernel: [947869.187231] device-mapper: ioctl: error adding target to table
Aug  7 14:38:22 gido-desk kernel: [947898.338958] device-mapper: ioctl: error adding target to table
Aug  7 14:38:32 gido-desk kernel: [947908.576787] device-mapper: ioctl: error adding target to table
Aug  7 14:40:44 gido-desk kernel: [948040.785982] device-mapper: ioctl: error adding target to table
Aug  7 14:44:44 gido-desk kernel: [948280.527971] device-mapper: ioctl: error adding target to table
Aug  7 14:53:12 gido-desk kernel: [948788.792932] device-mapper: ioctl: error adding target to table
Aug  7 14:57:00 gido-desk kernel: [949016.818871] device-mapper: ioctl: error adding target to table
Aug  7 14:57:02 gido-desk kernel: [949018.650875] device-mapper: ioctl: error adding target to table
Aug  7 15:13:54 gido-desk kernel: [950030.631886] device-mapper: ioctl: error adding target to table

full syslog: https://imagen.click/i/773c31

@pkoutoupis

This comment has been minimized.

Show comment
Hide comment
@pkoutoupis

pkoutoupis Aug 7, 2018

Owner

FYI, I am using the exact same kernel on the exact same Ubuntu on my local machine.

The above rapiddisk-cache errors shows up when the module is unable to locate or access the disk device. Code in question:


    if (rc_get_dev(ti, argv[0], &dmc->disk_dev,
        dmc->disk_devname, ti->len)) {
            ti->error = "rapiddisk-cache: Disk device lookup failed";
            goto construct_fail1;
    }

Anyway, when you umount /dev/sdh1, is it still listed in /proc/partitions?

Owner

pkoutoupis commented Aug 7, 2018

FYI, I am using the exact same kernel on the exact same Ubuntu on my local machine.

The above rapiddisk-cache errors shows up when the module is unable to locate or access the disk device. Code in question:


    if (rc_get_dev(ti, argv[0], &dmc->disk_dev,
        dmc->disk_devname, ti->len)) {
            ti->error = "rapiddisk-cache: Disk device lookup failed";
            goto construct_fail1;
    }

Anyway, when you umount /dev/sdh1, is it still listed in /proc/partitions?

@gidoBOSSftw5731

This comment has been minimized.

Show comment
Hide comment
@gidoBOSSftw5731

gidoBOSSftw5731 Aug 7, 2018

Yes, even after a partprobe.

gidoBOSSftw5731 commented Aug 7, 2018

Yes, even after a partprobe.

@pkoutoupis

This comment has been minimized.

Show comment
Hide comment
@pkoutoupis

pkoutoupis Aug 9, 2018

Owner

If you give me until later this afternoon, I can provide you with a debug driver to load and run the same test on. It will be written to dump more messages in the syslog.

Owner

pkoutoupis commented Aug 9, 2018

If you give me until later this afternoon, I can provide you with a debug driver to load and run the same test on. It will be written to dump more messages in the syslog.

@gidoBOSSftw5731

This comment has been minimized.

Show comment
Hide comment
@gidoBOSSftw5731

gidoBOSSftw5731 Aug 9, 2018

Ok, I wont be able to be there for 2 weeks due to vacation but I can prob remote into it.

gidoBOSSftw5731 commented Aug 9, 2018

Ok, I wont be able to be there for 2 weeks due to vacation but I can prob remote into it.

@pkoutoupis

This comment has been minimized.

Show comment
Hide comment
@pkoutoupis

pkoutoupis Aug 9, 2018

Owner

Try this one out and post the output of syslog or dmesg when trying to map the cache to the external drive.
rapiddisk-cache.zip
You can validate that your are using this driver by doing a modinfo. It should show 5.2-test-1

Owner

pkoutoupis commented Aug 9, 2018

Try this one out and post the output of syslog or dmesg when trying to map the cache to the external drive.
rapiddisk-cache.zip
You can validate that your are using this driver by doing a modinfo. It should show 5.2-test-1

@gidoBOSSftw5731

This comment has been minimized.

Show comment
Hide comment
@gidoBOSSftw5731

gidoBOSSftw5731 Aug 27, 2018

Sorry for my delay, I had PC problems while I was away, How should I go about installing this?

gidoBOSSftw5731 commented Aug 27, 2018

Sorry for my delay, I had PC problems while I was away, How should I go about installing this?

@pkoutoupis

This comment has been minimized.

Show comment
Hide comment
@pkoutoupis

pkoutoupis Aug 27, 2018

Owner

No worries. The easiest way may be to cd into the module directory and cp or mv the original rapiddisk-cache.c file to something like rapiddisk-cache.c.orig and then take the file from the ZIP and cp or mv into the module directory. Then run make. Make sure you rmmod the older rapiddisk-cache and insmod (not modprobe) the newly compiled rapiddisk-cache.ko.

Share the output in either dmesg or from the syslog in and around the cache mapping.

Owner

pkoutoupis commented Aug 27, 2018

No worries. The easiest way may be to cd into the module directory and cp or mv the original rapiddisk-cache.c file to something like rapiddisk-cache.c.orig and then take the file from the ZIP and cp or mv into the module directory. Then run make. Make sure you rmmod the older rapiddisk-cache and insmod (not modprobe) the newly compiled rapiddisk-cache.ko.

Share the output in either dmesg or from the syslog in and around the cache mapping.

@gidoBOSSftw5731

This comment has been minimized.

Show comment
Hide comment
@gidoBOSSftw5731

gidoBOSSftw5731 Aug 27, 2018

Same error when I tried to add the disk, heres the dmesg and syslog
Full Syslog: https://imagen.click/i/a76f64 (rapiddisk happened around Aug 27 14:25:49)
Full Dmesg: https://imagen.click/i/576a1a

gido5731@gido-desk ~/rapiddisk
 % cat /var/log/syslog |grep rapidd
Aug 27 14:20:58 gido-desk kernel: [236283.593523] rapiddisk_cache: version magic '4.15.0-29-generic SMP mod_unload ' should be '4.15.0-32-generic SMP mod_unload '
Aug 27 14:25:49 gido-desk kernel: [236574.509288] rapiddisk: Attached rd0 of 0 bytes in size.
Aug 27 14:25:57 gido-desk kernel: [236582.510303] rapiddisk: Detached rd0.
Aug 27 14:27:41 gido-desk kernel: [236686.682615] rapiddisk: Attached rd0 of 8589934592 bytes in size.
Aug 27 14:42:07 gido-desk kernel: [237552.583321] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
gido5731@gido-desk ~/rapiddisk
 % cat /var/log/syslog |grep ioctl
Aug 27 14:42:07 gido-desk kernel: [237552.583321] device-mapper: ioctl: error adding target to table
gido5731@gido-desk ~/rapiddisk

Theres a chance I did something wrong, if so please comment on it.

gidoBOSSftw5731 commented Aug 27, 2018

Same error when I tried to add the disk, heres the dmesg and syslog
Full Syslog: https://imagen.click/i/a76f64 (rapiddisk happened around Aug 27 14:25:49)
Full Dmesg: https://imagen.click/i/576a1a

gido5731@gido-desk ~/rapiddisk
 % cat /var/log/syslog |grep rapidd
Aug 27 14:20:58 gido-desk kernel: [236283.593523] rapiddisk_cache: version magic '4.15.0-29-generic SMP mod_unload ' should be '4.15.0-32-generic SMP mod_unload '
Aug 27 14:25:49 gido-desk kernel: [236574.509288] rapiddisk: Attached rd0 of 0 bytes in size.
Aug 27 14:25:57 gido-desk kernel: [236582.510303] rapiddisk: Detached rd0.
Aug 27 14:27:41 gido-desk kernel: [236686.682615] rapiddisk: Attached rd0 of 8589934592 bytes in size.
Aug 27 14:42:07 gido-desk kernel: [237552.583321] device-mapper: table: 253:0: rapiddisk-cache: rapiddisk-cache: Disk device lookup failed
gido5731@gido-desk ~/rapiddisk
 % cat /var/log/syslog |grep ioctl
Aug 27 14:42:07 gido-desk kernel: [237552.583321] device-mapper: ioctl: error adding target to table
gido5731@gido-desk ~/rapiddisk

Theres a chance I did something wrong, if so please comment on it.

@pkoutoupis

This comment has been minimized.

Show comment
Hide comment
@pkoutoupis

pkoutoupis Aug 27, 2018

Owner

For some reason I am unable to access the full syslog or dmesg. Can you verify that they are accessible on your end?

Owner

pkoutoupis commented Aug 27, 2018

For some reason I am unable to access the full syslog or dmesg. Can you verify that they are accessible on your end?

@gidoBOSSftw5731

This comment has been minimized.

Show comment
Hide comment
@gidoBOSSftw5731

gidoBOSSftw5731 Aug 27, 2018

Theyre both accessible to me, but theyre here too.

576a1a.txt
a76f64.txt

gidoBOSSftw5731 commented Aug 27, 2018

Theyre both accessible to me, but theyre here too.

576a1a.txt
a76f64.txt

@pkoutoupis

This comment has been minimized.

Show comment
Hide comment
@pkoutoupis

pkoutoupis Aug 27, 2018

Owner

One of the lines that I added was this:

Aug 27 14:42:07 gido-desk kernel: [237552.583320] Path: /dev/sdh1. rc: -16

The rapiddisk-cache.c (during a mapping sequence of events eventually calls this device mapper routine: dm_get_device() which fails and returns with an error code 16. This maps to the following:

#define EBUSY 16 /* Device or resource busy */

Can we double check to make sure that the volume sdh1 is not mounted? Ubuntu is weird sometimes in that it will automount a volume which does not properly show as mounted under df for mount. Also, your syslog seems to show a log of activity coming from systemd to the drive before and after your rapiddisk exercise.

Owner

pkoutoupis commented Aug 27, 2018

One of the lines that I added was this:

Aug 27 14:42:07 gido-desk kernel: [237552.583320] Path: /dev/sdh1. rc: -16

The rapiddisk-cache.c (during a mapping sequence of events eventually calls this device mapper routine: dm_get_device() which fails and returns with an error code 16. This maps to the following:

#define EBUSY 16 /* Device or resource busy */

Can we double check to make sure that the volume sdh1 is not mounted? Ubuntu is weird sometimes in that it will automount a volume which does not properly show as mounted under df for mount. Also, your syslog seems to show a log of activity coming from systemd to the drive before and after your rapiddisk exercise.

@gidoBOSSftw5731

This comment has been minimized.

Show comment
Hide comment
@gidoBOSSftw5731

gidoBOSSftw5731 Aug 27, 2018

The log was taken a few minutes after the test, I did a lsof +f -- /dev/sdh1, killed all of the related PID's, did a umount /dev/sdh1, tested it, then remounted it, I'm not sure how else I could accomplish this.

gidoBOSSftw5731 commented Aug 27, 2018

The log was taken a few minutes after the test, I did a lsof +f -- /dev/sdh1, killed all of the related PID's, did a umount /dev/sdh1, tested it, then remounted it, I'm not sure how else I could accomplish this.

@pkoutoupis

This comment has been minimized.

Show comment
Hide comment
@pkoutoupis

pkoutoupis Aug 28, 2018

Owner

Let me go back and rerun one more local test with an external USB drive (partition and formatted with Ext4) on Ubuntu 18.04. I will keep you posted.

Owner

pkoutoupis commented Aug 28, 2018

Let me go back and rerun one more local test with an external USB drive (partition and formatted with Ext4) on Ubuntu 18.04. I will keep you posted.

@gidoBOSSftw5731

This comment has been minimized.

Show comment
Hide comment
@gidoBOSSftw5731

gidoBOSSftw5731 Aug 29, 2018

If you want a slightly more close-to-mine setup, load up a file on it (like move your .local to it or open a txt on it,) fuser -k all of it, then umount it.

gidoBOSSftw5731 commented Aug 29, 2018

If you want a slightly more close-to-mine setup, load up a file on it (like move your .local to it or open a txt on it,) fuser -k all of it, then umount it.

@pkoutoupis

This comment has been minimized.

Show comment
Hide comment
@pkoutoupis

pkoutoupis Sep 1, 2018

Owner

I am sorry. I cannot reproduce. I am on the exact same kernel with the exact same Ubuntu. I attach an external Ext4 formatted block device which immediately gets automounted. Per your instructions. I even moved my .local and opened many text files on it which I immediately killed with the fuser -k to the mount point. This was followed by a umount.

No issues mapping/unmapping the removable block device at both the parent node and partition names. I wish I understood what is blocking your environment or what is claiming the USB volume and returning a -EBUSY to device mapper.

Just to make sure that nothing else shady is going on, can you retry but with a local loopback device?

Owner

pkoutoupis commented Sep 1, 2018

I am sorry. I cannot reproduce. I am on the exact same kernel with the exact same Ubuntu. I attach an external Ext4 formatted block device which immediately gets automounted. Per your instructions. I even moved my .local and opened many text files on it which I immediately killed with the fuser -k to the mount point. This was followed by a umount.

No issues mapping/unmapping the removable block device at both the parent node and partition names. I wish I understood what is blocking your environment or what is claiming the USB volume and returning a -EBUSY to device mapper.

Just to make sure that nothing else shady is going on, can you retry but with a local loopback device?

@gidoBOSSftw5731

This comment has been minimized.

Show comment
Hide comment
@gidoBOSSftw5731

gidoBOSSftw5731 Sep 1, 2018

gidoBOSSftw5731 commented Sep 1, 2018

@pkoutoupis

This comment has been minimized.

Show comment
Hide comment
@pkoutoupis

pkoutoupis Sep 2, 2018

Owner

Create a file of whatever size you choose (I chose 512M):

$ dd if=/dev/zero of=/tmp/tmp.dat bs=1M count=512

Create a loopback device:

$ sudo losetup /dev/loop3 /tmp/tmp.dat

Verify the existence of that loopback device:

$ cat /proc/partitions |grep loop3
7 3 524288 loop3

Use that loopback device as the block device to enable the map to (/dev/loop3). It will be the size of the file created with dd (above).

When done and everything is unmapped, destroy the loopback device:

$ sudo losetup -d /dev/loop3

Owner

pkoutoupis commented Sep 2, 2018

Create a file of whatever size you choose (I chose 512M):

$ dd if=/dev/zero of=/tmp/tmp.dat bs=1M count=512

Create a loopback device:

$ sudo losetup /dev/loop3 /tmp/tmp.dat

Verify the existence of that loopback device:

$ cat /proc/partitions |grep loop3
7 3 524288 loop3

Use that loopback device as the block device to enable the map to (/dev/loop3). It will be the size of the file created with dd (above).

When done and everything is unmapped, destroy the loopback device:

$ sudo losetup -d /dev/loop3

@gidoBOSSftw5731

This comment has been minimized.

Show comment
Hide comment
@gidoBOSSftw5731

gidoBOSSftw5731 Sep 2, 2018

gidoBOSSftw5731 commented Sep 2, 2018

@pkoutoupis

This comment has been minimized.

Show comment
Hide comment
@pkoutoupis

pkoutoupis Sep 2, 2018

Owner

So this proves that the modules work on your system but something is preventing us from attaching the USB drive. My next step would probably be (if you do not mind) to upload the output of your lsof at the time of failure. Maybe we are overlooking one detail.

Owner

pkoutoupis commented Sep 2, 2018

So this proves that the modules work on your system but something is preventing us from attaching the USB drive. My next step would probably be (if you do not mind) to upload the output of your lsof at the time of failure. Maybe we are overlooking one detail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment