* [linux-lvm] Only 4MB of space on a 1GB file mounted in loopback
@ 2010-07-07 13:32 Benjamin Henrion
2010-07-07 13:47 ` Ray Morris
2010-07-07 13:57 ` Milan Broz
0 siblings, 2 replies; 4+ messages in thread
From: Benjamin Henrion @ 2010-07-07 13:32 UTC (permalink / raw)
To: linux-lvm
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."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] Only 4MB of space on a 1GB file mounted in loopback
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
2010-07-07 14:21 ` Milan Broz
2010-07-07 13:57 ` Milan Broz
1 sibling, 1 reply; 4+ messages in thread
From: Ray Morris @ 2010-07-07 13:47 UTC (permalink / raw)
To: LVM general discussion and development
> 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/
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] Only 4MB of space on a 1GB file mounted in loopback
2010-07-07 13:47 ` Ray Morris
@ 2010-07-07 14:21 ` Milan Broz
0 siblings, 0 replies; 4+ messages in thread
From: Milan Broz @ 2010-07-07 14:21 UTC (permalink / raw)
To: LVM general discussion and development
On 07/07/2010 03:47 PM, Ray Morris wrote:
> 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?).
just note - please never use version 1 metadata format for new LVM2 config,
you will avoid problems in future, limits is one of them:-)
The only situation where this is really needed is compatibility
with lvm1 (2.4 kernel - RHEL3 for example).
(and after upgrade you can always use vgconvert to upgrade to LVM2 text
metadata format)
Milan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] Only 4MB of space on a 1GB file mounted in loopback
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
@ 2010-07-07 13:57 ` Milan Broz
1 sibling, 0 replies; 4+ messages in thread
From: Milan Broz @ 2010-07-07 13:57 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Benjamin Henrion
On 07/07/2010 03:32 PM, 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 [27]# lvcreate -i1 -l 1 -n testvol testgroup
lvcreate -l 1 -> create LV of 1 extent size == 4MB
you want -l 100%FREE ? or -L 1G ?
and -i makes no sense, you cannot create stripe on one PV, -i1 is default
Milan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-07 14:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2010-07-07 14:21 ` Milan Broz
2010-07-07 13:57 ` Milan Broz
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).