Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Device-mapper Development (http://www.linux-archive.org/device-mapper-development/)
-   -   dmsetup load not working? (http://www.linux-archive.org/device-mapper-development/15270-dmsetup-load-not-working.html)

Bob Bell 12-08-2007 03:24 PM

dmsetup load not working?
 
I'm using a SLES10 SP1 x86_64 system, and I'm been using dmsetup
intensively for the first time. From what I can tell, `dmsetup load`
just doesn't seem to work; it doesn't seem to have any effect.


Below is the simplest case I could think to come up with to illustrate
this issue. Could anyone help me here? Am I doing something wrong?


brick14b:~ # dd if=/dev/zero of=loopfile bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 0.269968 seconds, 388 MB/s
brick14b:~ # losetup /dev/loop1 loopfile
brick14b:~ # dmsetup create loop --table "0 $(blockdev --getsize /dev/loop1) linear /dev/loop1 0"
brick14b:~ # dmsetup create loop2 --notable
brick14b:~ # dmsetup table loop
0 204800 linear 7:1 0
brick14b:~ # dmsetup table loop2

brick14b:~ # dmsetup table loop | dmsetup load loop2
brick14b:~ # echo $?
0
brick14b:~ # dmsetup table loop2

brick14b:~ # dmsetup info loop2
Name: loop2
State: ACTIVE
Tables present: INACTIVE
Open count: 0
Event number: 0
Major, minor: 253, 11
Number of targets: 0

brick14b:~ #


--
Bob Bell

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Milan Broz 12-08-2007 04:53 PM

dmsetup load not working?
 
Bob Bell wrote:
> I'm using a SLES10 SP1 x86_64 system, and I'm been using dmsetup
> intensively for the first time. From what I can tell, `dmsetup load`
> just doesn't seem to work; it doesn't seem to have any effect.
>
> Below is the simplest case I could think to come up with to illustrate
> this issue. Could anyone help me here? Am I doing something wrong?
...
> brick14b:~ # dmsetup create loop2 --notable
> brick14b:~ # dmsetup table loop
> 0 204800 linear 7:1 0
> brick14b:~ # dmsetup table loop2
>
> brick14b:~ # dmsetup table loop | dmsetup load loop2
> brick14b:~ # echo $?
> 0

There can be two tables for DM device, active and inactive.

Active (live) table is used for operation, inactive is used
in preparation for table change.

"Inactive" table is activated during device resume (if you need to
change table, suspend device and resume device is needed to switch
inactive table to live state).

> brick14b:~ # dmsetup table loop2

loop2 was created with --notable, so there is no live table but only inactive.
You need to add "dmsetup resume loop2" here.
(Because device has no table, suspend is not required.)

See "man dmsetup" too. Anyway, be very careful using this low level commands,
better use some volume management system on top of device mapper.

>
> brick14b:~ # dmsetup info loop2
> Name: loop2
> State: ACTIVE
> Tables present: INACTIVE
^^ this is problem, no live table, just inactive here.

> Open count: 0
> Event number: 0
> Major, minor: 253, 11
> Number of targets: 0

Milan
--
mbroz@redhat.com

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Bob Bell 12-08-2007 05:07 PM

dmsetup load not working?
 
On Sat, Dec 08, 2007 at 06:53:59PM +0100, Milan Broz wrote:

There can be two tables for DM device, active and inactive.

Active (live) table is used for operation, inactive is used
in preparation for table change.

"Inactive" table is activated during device resume (if you need to
change table, suspend device and resume device is needed to switch
inactive table to live state).


I missed that these were two separate slots, and that resume was the
trigger to use the inactive table. It makes a lot of sense now. That's
for taking the time to explain it. I should be all set now.

--
Bob Bell

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


All times are GMT. The time now is 09:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.