All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Vol management problems over loopback mounted files
@ 2003-05-14  5:06 Neil, Mark
  2003-05-16  6:09 ` Heinz J . Mauelshagen
  0 siblings, 1 reply; 2+ messages in thread
From: Neil, Mark @ 2003-05-14  5:06 UTC (permalink / raw)
  To: 'linux-lvm@sistina.com'

Dear All,

I am trying to set up a volume managed file system over ordinary files using
the loopback devices.  However whatever I try seems to work until I try and
actually use any logical volumes as file systems.  Otherwise the volume
management system is completely happy with what I have done according to the
various display utilities 

What am I doing wrong?  

As a simple example of this problem see below (all on a Redhat 9.0 system,
Kernel 2.4.20-9 - also fails in the same way on a Redhat 8 system with a
2.4.18 kernel)

[root@dex root]# dd if=/dev/zero of=/tmp/diskfile0 bs=512M count=1
1+0 records in
1+0 records out
[root@dex root]# dd if=/dev/zero of=/tmp/diskfile1 bs=512M count=1
1+0 records in
1+0 records out
[root@dex root]# dd if=/dev/zero of=/tmp/diskfile2 bs=512M count=1
1+0 records in
1+0 records out
[root@dex root]# losetup /dev/loop0 /tmp/diskfile0
[root@dex root]# losetup /dev/loop1 /tmp/diskfile1
[root@dex root]# losetup /dev/loop2 /tmp/diskfile2
[root@dex root]# pvcreate /dev/loop[0-2]
pvcreate -- physical volume "/dev/loop0" successfully created
pvcreate -- physical volume "/dev/loop1" successfully created
pvcreate -- physical volume "/dev/loop2" successfully created

[root@dex root]# vgcreate test_vg /dev/loop[0-2]
vgcreate -- INFO: using default physical extent size 4 MB
vgcreate -- INFO: maximum logical volume size is 255.99 Gigabyte
vgcreate -- doing automatic backup of volume group "test_vg"
vgcreate -- volume group "test_vg" successfully created and activated

[root@dex root]# lvcreate -L768M -n test_lv test_vg
lvcreate -- doing automatic backup of "test_vg"
lvcreate -- logical volume "/dev/test_vg/test_lv" successfully created

[root@dex root]# mke2fs /dev/test_vg/test_lv
mke2fs 1.32 (09-Nov-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
98304 inodes, 196608 blocks
9830 blocks (5.00%) reserved for the super user
First data block=0
6 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@dex root]# mkdir /mnt/tmp
[root@dex root]# mount /dev/test_vg/test_lv /mnt/tmp
mount: you must specify the filesystem type
[root@dex root]# mount -t ext2 /dev/test_vg/test_lv /mnt/tmp
mount: wrong fs type, bad option, bad superblock on /dev/test_vg/test_lv,
       or too many mounted file systems
[root@dex root]# e2fsck /dev/test_vg/test_lv
e2fsck 1.32 (09-Nov-2002)
Couldn't find ext2 superblock, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open
/dev/test_vg/test_lv

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

[root@dex root]#

Cheers

Mark Neil
Imperial College
London 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-lvm] Vol management problems over loopback mounted files
  2003-05-14  5:06 [linux-lvm] Vol management problems over loopback mounted files Neil, Mark
@ 2003-05-16  6:09 ` Heinz J . Mauelshagen
  0 siblings, 0 replies; 2+ messages in thread
From: Heinz J . Mauelshagen @ 2003-05-16  6:09 UTC (permalink / raw)
  To: linux-lvm

On Wed, May 14, 2003 at 11:06:39AM +0100, Neil, Mark wrote:
> Dear All,
> 
> I am trying to set up a volume managed file system over ordinary files using
> the loopback devices.  However whatever I try seems to work until I try and
> actually use any logical volumes as file systems.  Otherwise the volume
> management system is completely happy with what I have done according to the
> various display utilities 
> 
> What am I doing wrong?  

Likely the LVM version shipped with RedHat (1.0.3 ?).
Try 1.0.7. Works fine with loop devices here.

Regards,
Heinz    -- The LVM Guy --

> 
> As a simple example of this problem see below (all on a Redhat 9.0 system,
> Kernel 2.4.20-9 - also fails in the same way on a Redhat 8 system with a
> 2.4.18 kernel)
> 
> [root@dex root]# dd if=/dev/zero of=/tmp/diskfile0 bs=512M count=1
> 1+0 records in
> 1+0 records out
> [root@dex root]# dd if=/dev/zero of=/tmp/diskfile1 bs=512M count=1
> 1+0 records in
> 1+0 records out
> [root@dex root]# dd if=/dev/zero of=/tmp/diskfile2 bs=512M count=1
> 1+0 records in
> 1+0 records out
> [root@dex root]# losetup /dev/loop0 /tmp/diskfile0
> [root@dex root]# losetup /dev/loop1 /tmp/diskfile1
> [root@dex root]# losetup /dev/loop2 /tmp/diskfile2
> [root@dex root]# pvcreate /dev/loop[0-2]
> pvcreate -- physical volume "/dev/loop0" successfully created
> pvcreate -- physical volume "/dev/loop1" successfully created
> pvcreate -- physical volume "/dev/loop2" successfully created
> 
> [root@dex root]# vgcreate test_vg /dev/loop[0-2]
> vgcreate -- INFO: using default physical extent size 4 MB
> vgcreate -- INFO: maximum logical volume size is 255.99 Gigabyte
> vgcreate -- doing automatic backup of volume group "test_vg"
> vgcreate -- volume group "test_vg" successfully created and activated
> 
> [root@dex root]# lvcreate -L768M -n test_lv test_vg
> lvcreate -- doing automatic backup of "test_vg"
> lvcreate -- logical volume "/dev/test_vg/test_lv" successfully created
> 
> [root@dex root]# mke2fs /dev/test_vg/test_lv
> mke2fs 1.32 (09-Nov-2002)
> Filesystem label=
> OS type: Linux
> Block size=4096 (log=2)
> Fragment size=4096 (log=2)
> 98304 inodes, 196608 blocks
> 9830 blocks (5.00%) reserved for the super user
> First data block=0
> 6 block groups
> 32768 blocks per group, 32768 fragments per group
> 16384 inodes per group
> Superblock backups stored on blocks:
>         32768, 98304, 163840
> 
> Writing inode tables: done
> Writing superblocks and filesystem accounting information: done
> 
> This filesystem will be automatically checked every 33 mounts or
> 180 days, whichever comes first.  Use tune2fs -c or -i to override.
> [root@dex root]# mkdir /mnt/tmp
> [root@dex root]# mount /dev/test_vg/test_lv /mnt/tmp
> mount: you must specify the filesystem type
> [root@dex root]# mount -t ext2 /dev/test_vg/test_lv /mnt/tmp
> mount: wrong fs type, bad option, bad superblock on /dev/test_vg/test_lv,
>        or too many mounted file systems
> [root@dex root]# e2fsck /dev/test_vg/test_lv
> e2fsck 1.32 (09-Nov-2002)
> Couldn't find ext2 superblock, trying backup blocks...
> e2fsck: Bad magic number in super-block while trying to open
> /dev/test_vg/test_lv
> 
> The superblock could not be read or does not describe a correct ext2
> filesystem.  If the device is valid and it really contains an ext2
> filesystem (and not swap or ufs or something else), then the superblock
> is corrupt, and you might try running e2fsck with an alternate superblock:
>     e2fsck -b 8193 <device>
> 
> [root@dex root]#
> 
> Cheers
> 
> Mark Neil
> Imperial College
> London 
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-16  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-14  5:06 [linux-lvm] Vol management problems over loopback mounted files Neil, Mark
2003-05-16  6:09 ` Heinz J . Mauelshagen

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.