Difference between pages "Linux Logical Volume Manager (LVM)" and "Libsmraw"

From ForensicsWiki
(Difference between pages)
Jump to: navigation, search
m (Mounting an LVM from a device)
 
(Tools)
 
Line 1: Line 1:
{{expand}}
+
{{Infobox_Software |
 +
  name = libsmraw |
 +
  maintainer = [[Joachim Metz]] |
 +
  os = [[Linux]], [[FreeBSD]], [[NetBSD]], [[OpenBSD]], [[Mac OS X]], [[Windows]] |
 +
  genre = {{Disk imaging}} |
 +
  license = {{LGPL}} |
 +
  website = [https://code.google.com/p/libsmraw/ code.google.com/p/libsmraw/] |
 +
}}
  
The [[Linux]] Logical Volume Manager, is commonly abbreviated to LVM. Although LVM can used for other [http://en.wikipedia.org/wiki/Logical_Volume_Management Logical Volume Management] variants as well.
+
The '''libsmraw''' package contains a library and applications to read and write (split) RAW storage media bitstream copies.
 +
Libsmraw contains supports for multiple (split) RAW naming schemes.
  
Not all forensic tools have support for Linux Logical Volume Manager (LVM) volumes, but most modern Linux distributions do.
+
== History ==
  
== Forensic analysis ==
+
Libsmraw was created by [[Joachim Metz]] in 2010, while working for [http://en.hoffmannbv.nl/ Hoffmann Investigations].
The metadata area of a LVM Physical Volume can contain multiple versions of metadata section that contains the LVM Volume Group definitions, including a creation date and time value.
+
Libsmraw is a rewrite of earlier work for the proof-of-concept multi-threaded imager: GNOME Forensic Imager.
  
== Mounting an LVM ==
+
== Tools ==  
=== Mounting an LVM from an image ===
+
The '''libsmraw''' package contains the following tools:
If you have an image mount the LVM read-only on a loopback device (e.g. /dev/loop1) by:
+
* '''smrawmount''', which FUSE mounts (split) RAW image files.
<pre>
+
sudo losetup -r -o $OFFSET /dev/loop1 image.raw
+
</pre>
+
  
Note that the offset is in bytes.
+
The '''libsmraw''' package also contains the following bindings:
 +
* '''pysmraw''', bindings for Python (libsmraw 20140621 or later).
  
If you need to write to the image, e.g. for recovery, use [[xmount]] to write the changes to a [[shadow file]] (or cachefile in xmount terminology).
+
== Examples ==
<pre>
+
sudo xmount --in dd --cache sda.shadow sda.raw image/
+
</pre>
+
  
You can then safely mount the LVM in read-write mode (just omit the -r in the previous losetup command).
+
FUSE mounting a split RAW image (libsmraw 20110916 or later)
 
+
To remove this mapping afterwards run:
+
 
<pre>
 
<pre>
sudo losetup -d /dev/loop1
+
smrawmount image.raw.000 mount_point
 
</pre>
 
</pre>
  
To scan for new physical volumes:
+
Or:
<pre>
+
lvm pvscan
+
</pre>
+
 
+
You cannot unmount an active volume group. To detach (or deactivate) the volume group:
+
<pre>
+
vgchange -a n $VOLUMEGROUP
+
</pre>
+
 
+
Where $VOLUMEGROUP is the corresponding name of the volume group
+
 
+
The individual volume devices are now available in:
+
<pre>
+
/dev/mapper/$VOLUMEGROUP-$VOLUMENAME
+
</pre>
+
 
+
=== Mounting an LVM from a device ===
+
 
+
To list the Volume Groups (VG) run:
+
<pre>
+
pvs
+
</pre>
+
 
+
To list information about a Volume Group (VG) run:
+
<pre>
+
lvdisplay $VOLUMEGROUP
+
</pre>
+
 
+
The field "LV Name" provides the volume name
+
 
+
To make the volume group known to the system (only if it was previously exported using ''vgexport'' command, note that ''vgimport'' would alter the data in the LVM2 header):
+
<pre>
+
vgimport $VOLUMEGROUP
+
</pre>
+
 
+
And activate the volumes in the volume group:
+
<pre>
+
vgchange -a y $VOLUMEGROUP
+
</pre>
+
 
+
The individual volume devices are now available in:
+
<pre>
+
/dev/mapper/$VOLUMEGROUP-$VOLUMENAME
+
</pre>
+
 
+
These now can be analyzed with e.g. a tool like the [[Sleuthkit]] or loop-back mounted.
+
 
+
To read-only loop-back mount an individual volume:
+
 
<pre>
 
<pre>
mount -o ro,loop /dev/mapper/$VOLUMEGROUP-$VOLUMENAME filesystem/
+
smrawmount image.raw.??? mount_point
 
</pre>
 
</pre>
  
== Also see ==
+
== Also See ==
* [[:Category:File Systems | File Systems]]
+
[[Raw_Image_Format | RAW Image format]]
  
 
== External Links ==
 
== External Links ==
* [http://en.wikipedia.org/wiki/Logical_Volume_Manager_%28Linux%29 Wikipedia article on Logical Volume Manager]
 
* [http://www.tldp.org/HOWTO/LVM-HOWTO/ LVM Howto], by [http://www.tldp.org/ The Linux Documentation Project]
 
* [http://www.sourceware.org/lvm2/ LVM2 Resource Page]
 
* [http://www.redhat.com/magazine/009jul05/features/lvm2/ The Linux Logical Volume Manager], by Heinz Mauelshagen and Matthew O'Keefe
 
* [http://www.datadisk.co.uk/html_docs/redhat/rh_lvm.htm LVM cheatsheet], by [[RedHat]]
 
* [http://content.hccfl.edu/pollock/aunix1/lvm.htm Unix/Linux Administration Logical Volume Management Guide], by Wayne Pollock, 2005
 
* [http://lvb.sti.fce.vutbr.cz/public/LinuxAlt_2009/2009_11_08_LA_04_LVM/2009_11_08_LA_04_LVM.pdf LVM2 – data recovery], by Milan Brož, LinuxAlt 2009
 
  
[[Category:Volume Systems]]
+
* [https://code.google.com/p/libsmraw/ Project site]

Revision as of 08:46, 21 June 2014

libsmraw
Maintainer: Joachim Metz
OS: Linux, FreeBSD, NetBSD, OpenBSD, Mac OS X, Windows
Genre: Disk imaging
License: LGPL
Website: code.google.com/p/libsmraw/

The libsmraw package contains a library and applications to read and write (split) RAW storage media bitstream copies. Libsmraw contains supports for multiple (split) RAW naming schemes.

History

Libsmraw was created by Joachim Metz in 2010, while working for Hoffmann Investigations. Libsmraw is a rewrite of earlier work for the proof-of-concept multi-threaded imager: GNOME Forensic Imager.

Tools

The libsmraw package contains the following tools:

  • smrawmount, which FUSE mounts (split) RAW image files.

The libsmraw package also contains the following bindings:

  • pysmraw, bindings for Python (libsmraw 20140621 or later).

Examples

FUSE mounting a split RAW image (libsmraw 20110916 or later)

smrawmount image.raw.000 mount_point

Or:

smrawmount image.raw.??? mount_point

Also See

RAW Image format

External Links