Bug 128984

Summary: lvm2 + snapshots size limitation
Product: [openSUSE] SUSE LINUX 10.0 Reporter: robert spitzenpfeil <rs.opensuse>
Component: KernelAssignee: Lars Marowsky-Bree <lmb>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: 32bit   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description robert spitzenpfeil 2005-10-18 11:19:49 UTC
greetings.

There seems to be a bug within the LVM2 snapshot routine of suse 9.3 pro.

I simply cannot reliably create snapshots of a size greater than 100MB, which
used to be possible with 9.2.

Using a size of about 500MB as a test, every other creation of a snapshot fails
resulting in the creation of an ordinary logical volume of that size.


the output of 'lvcreate' in case of a failure is this:

lvcreate --verbose --size 550m --snapshot /dev/vg00/data
Setting chunksize to 16 sectors.
Finding volume group "vg00"
Rounding up size to full physical extent 552.00 MB
Creating logical volume lvol0
Archiving volume group "vg00" metadata.
Creating volume group backup "/etc/lvm/backup/vg00"
Found volume group "vg00"
Loading vg00-lvol0
Zeroing start of logical volume "lvol0"
Found volume group "vg00"
LV vg00/lvol0 in use: not removing
Couldn't deactivate new snapshot.

lvs
LV VG Attr LSize Origin Snap% Move Copy%
data vg00 -wi-a- 1.00G
lvol0 vg00 -wi-a- 552.00M


this bug basically kills timeconsistent backup procedures.
Comment 1 Chris L Mason 2005-10-18 13:39:42 UTC
Your command above tells LVM to create a snapshot of /dev/vg00/data with a size 550m.  Since you didn't supply a name for the snapshot, lvm defaulted to lvol0, but the creation failed when it found lvol0 already existed.

Try this instead:

lvcreate --size 550m -n snap1 --snapshot /dev/vg00/data

-n snap1 tells lvm to name the snapshot snap1.  Use a name not already used by an existing lv.
Comment 2 robert spitzenpfeil 2005-10-18 14:35:35 UTC
ah! clever man ;-) been there, done that.

the creation of that snapshot with / or without the --name option does work in 50% of the cases. and /dev/vg00/data is the ONLY logical volume on my system before snapshot creation.

btw. in the beginning I was always trying to create a named snapshot called 'snap', which initially caused the problem. THEN I switched to letting 'lvcreate' asign the snapshot name automatically - which did not help as well.
then I started to mess with chunk-size and snapshot-size a bit.

as of now the status is this:

small snapshots smaller 100MB will always be created no matter if named by me or lvcreate (given that the name is actually 'free' to asign).

the larger the snapshot the more often the creation fails as described before.
Comment 3 Lars Marowsky-Bree 2005-10-20 19:20:05 UTC
You filed the bug against SL10.0, but the version and the comment indicate that you actually used 9.3. What's correct? And can you reproduce on SL10.0?

Thanks -
Comment 4 robert spitzenpfeil 2005-10-20 23:52:42 UTC
that's right. the bug is within 9.3

the reason for me filing it with 10.0 is that there was no option for 9.3

whether it's reproducible within 10.0 .... can't tell yet.
I'm not going to wrek my server just to test. probably will take a spare hdd for that, and that's not going to happen before this weekend.

Comment 5 robert spitzenpfeil 2005-10-21 12:07:32 UTC
I've checked the lvm2 snapshot size limitation with 10.0 retail (32bit)

The problem is exactly the same ;-(
Comment 6 robert spitzenpfeil 2005-10-22 07:32:47 UTC
today I've had the chance to test it with SLES9 SP2 (kernel 2.6.5-7.191-smp)
on a HP blade with the cciss driver. 

snapshotsizes of several gigabytes work nicely. this time evms just wouldn't work, but I don't care now.
Comment 7 Lars Marowsky-Bree 2005-10-24 17:07:54 UTC
Adjusting OS and product. Can't really be a blocker because we already shipped ;-)