All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heinz J . Mauelshagen" <mauelshagen@sistina.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Vol management problems over loopback mounted files
Date: Fri May 16 06:09:02 2003	[thread overview]
Message-ID: <20030516130104.C24422@sistina.com> (raw)
In-Reply-To: <2EDAF6DC7CE9D4118D4C00508BAED31508DFED5D@icex3.cc.ic.ac.uk>; from mark.neil@imperial.ac.uk on Wed, May 14, 2003 at 11:06:39AM +0100

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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

      reply	other threads:[~2003-05-16  6:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20030516130104.C24422@sistina.com \
    --to=mauelshagen@sistina.com \
    --cc=linux-lvm@sistina.com \
    /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.