From: Ray Morris <support@bettercgi.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Only 4MB of space on a 1GB file mounted in loopback
Date: Wed, 07 Jul 2010 08:47:12 -0500 [thread overview]
Message-ID: <1278510432.9312.14@raydesk1.bettercgi.com> (raw)
In-Reply-To: <AANLkTilPQsBnVh_bSQE9CsTcswDX89_H8_Ea-5SWcBaW@mail.gmail.com> (from bh@udev.org on Wed Jul 7 08:32:49 2010)
> but I end up with a file of 4MB, do you have any idea what went wrong?
You end up with a logical volume of 4 MB. Let's look at where you
created that logical volume:
> lvcreate -i1 -l 1 -n testvol testgroup
"-l 1" sets the size as 1 logical extent, which is 4MB by default.
Note that if you are using version 1 of LVM, or using
version 1 style metadata with LVM2, a 4MB extent size limits
the size of logical volumes you can create to 255GB (256GB?).
--
Ray Morris
support@bettercgi.com
Strongbox - The next generation in site security:
http://www.bettercgi.com/strongbox/
Throttlebox - Intelligent Bandwidth Control
http://www.bettercgi.com/throttlebox/
Strongbox / Throttlebox affiliate program:
http://www.bettercgi.com/affiliates/user/register.php
On 07/07/2010 08:32:49 AM, Benjamin Henrion wrote:
> Hi,
>
> I have setup some LVM volume to test on a loopback file of 1GB, but I
> end up with a file of 4MB, do you have any idea what went wrong?:
>
> ===========================================================
> root@buzek /home/zoobab [22]# dd if=/dev/zero of=1G.img bs=1G count=1
> 1+0 records in
> 1+0 records out
> 1073741824 bytes (1.1 GB) copied, 13.6855 s, 78.5 MB/s
> root@buzek /home/zoobab [23]# losetup -f
> /dev/loop5
> root@buzek /home/zoobab [24]# losetup /dev/loop5 1G.img
> root@buzek /home/zoobab [25]# pvcreate /dev/loop5
> Physical volume "/dev/loop5" successfully created
> root@buzek /home/zoobab [26]# vgcreate testgroup /dev/loop5
> Volume group "testgroup" successfully created
> root@buzek /home/zoobab [27]# lvcreate -i1 -l 1 -n testvol testgroup
> Redundant stripes argument: default is 1
> Logical volume "testvol" created
> root@buzek /home/zoobab [28]# mkfs.ext3 /dev/testgroup/testvol
> mke2fs 1.41.9 (22-Aug-2009)
> Filesystem label=
> OS type: Linux
> Block size=1024 (log=0)
> Fragment size=1024 (log=0)
> 1024 inodes, 4096 blocks
> 204 blocks (4.98%) reserved for the super user
> First data block=1
> Maximum filesystem blocks=4194304
> 1 block group
> 8192 blocks per group, 8192 fragments per group
> 1024 inodes per group
> Writing inode tables: done
> Creating journal (1024 blocks): done
> Writing superblocks and filesystem accounting information: done
> This filesystem will be automatically checked every 31 mounts or
> 180 days, whichever comes first. Use tune2fs -c or -i to override.
> root@buzek /home/zoobab [29]# mount /dev/testgroup/testvol /mnt
> root@buzek /home/zoobab [30]# cd /mnt
> root@buzek /mnt [31]# df -lha
> Filesystem Size Used Avail Use% Mounted on
> /dev/sda1 57G 46G 7.7G 86% /
> proc 0 0 0 - /proc
> none 0 0 0 - /sys
> none 0 0 0 - /sys/fs/fuse/connections
> none 0 0 0 - /sys/kernel/debug
> none 0 0 0 - /sys/kernel/security
> udev 1.4G 260K 1.4G 1% /dev
> none 0 0 0 - /dev/pts
> none 1.4G 900K 1.4G 1% /dev/shm
> none 1.4G 124K 1.4G 1% /var/run
> none 1.4G 0 1.4G 0% /var/lock
> none 1.4G 0 1.4G 0% /lib/init/rw
> binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc
> gvfs-fuse-daemon 0.0K 0.0K 0.0K - /home/zoobab/.gvfs
> /dev/mapper/testgroup-testvol
> 3.9M 1.1M 2.7M 29% /mnt
> root@buzek /mnt [32]#
> ===========================================================
>
> --
> Benjamin Henrion <bhenrion@ffii.org>
> FFII Brussels - +32-484-566109 - +32-2-4148403
> "In July 2005, after several failed attempts to legalise software
> patents in Europe, the patent establishment changed its strategy.
> Instead of explicitly seeking to sanction the patentability of
> software, they are now seeking to create a central European patent
> court, which would establish and enforce patentability rules in their
> favor, without any possibility of correction by competing courts or
> democratically elected legislators."
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>
next prev parent reply other threads:[~2010-07-07 13:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-07 13:32 [linux-lvm] Only 4MB of space on a 1GB file mounted in loopback Benjamin Henrion
2010-07-07 13:47 ` Ray Morris [this message]
2010-07-07 14:21 ` Milan Broz
2010-07-07 13:57 ` Milan Broz
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=1278510432.9312.14@raydesk1.bettercgi.com \
--to=support@bettercgi.com \
--cc=linux-lvm@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).