Bug 449755 - RFE: file magic for LVM persistent overlay snapshots
RFE: file magic for LVM persistent overlay snapshots
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: file (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Tomas Smetana
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-03 08:48 EDT by Jason Farrell
Modified: 2008-06-06 07:50 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-06 07:50:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jason Farrell 2008-06-03 08:48:43 EDT
Would be nice to get file magic added for LVM snapshots, especially now that the
persistent overlay image in Fedora 9 will be seen by more eyes. Having file
report that it's just "data" isn't very enlightening.

My ~/.magic:
-----------------------------------
# $ hexdump -C -n 512 /media/Patriot/LiveOS/overlay-Patriot-32B4-B464
# 00000000  53 6e 41 70 01 00 00 00  01 00 00 00 08 00 00 00  |SnAp............|
# 00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
# # hexdump -C -n 512 /dev/mapper/vgr0-0tmp--snap-cow
# 00000000  53 6e 41 70 01 00 00 00  01 00 00 00 08 00 00 00  |SnAp............|
# 00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

# header struct: 
http://fxr.watson.org/fxr/source//drivers/md/dm-exception-store.c?v=linux-2.6#L53
# lelongs:  magic, valid flag, version, chunk_size in sectors
0    string  SnAp        LVM Snapshot (CopyOnWrite store)
>4   lelong    !0        - valid,
>4   lelong    0         - invalid,
>8   lelong    x         version = %d,
>12  lelong    x         chunk_size = %d
-----------------------------------

e.g.:
$ file /media/Patriot/LiveOS/overlay-Patriot-32B4-B464
/media/Patriot/LiveOS/overlay-Patriot-32B4-B464: LVM Snapshot (CopyOnWrite
store) - valid, version = 1, chunk_size = 8
Comment 1 Tomas Smetana 2008-06-03 09:00:15 EDT
Thanks.  This looks OK to me.  Have you sent your patch upstream as well?
Comment 2 Jason Farrell 2008-06-03 09:15:55 EDT
Only here. Not sure who the keeper of the upstream magic is
Comment 3 Tomas Smetana 2008-06-03 09:39:49 EDT
Nevermind. I'll send it to him together with other updates I have.

Note You need to log in before you can comment on or make changes to this bug.