Sponsored Content
Special Forums Hardware Filesystems, Disks and Memory Linux Storage system: looking for advices Post 302385275 by Loic Domaigne on Thursday 7th of January 2010 04:15:48 PM
Old 01-07-2010
Good Evening,

Quote:
Originally Posted by pludi
No, it's not possible with LVM alone. LVM is designed to simplify the management of multiple, different devices by grouping them together. Bonus is a slight speed improvement. If you loose one drive with LVM, the data on it is gone for good too, but it's easy to extend the size.
Since I am not very fluent in LVM, I set-up a virtual KVM/Qemu guest with Linux in order to play with LVM and investigate possible failures scenario. Enclosed the results of my experiments.

I have the following setup: a volume group containing the following physical volume /dev/vda6, /dev/vdb2 and /dev/vdb3. I have only one logical volume than spans the entire volume group. ext3 is used as filesystem.
Code:
+--------------------------------------------------+
|                    ext3                          |
+--------------------------------------------------+
+--------------------------------------------------+
|                    mylv                          | logical volume = 100%VG
+--------------------------------------------------+
+--------------------------------------------------+
|                    myvg                          | volume group = vda6, vdb2, vdb3 
+--------------------------------------------------+
+-------------+     +-------------+    +-----------+
| /dev/vda6   |     | /dev/vdb2   |    | /dev/vdb3 |
+-------------+     +------------+    +-----------+

It is possible to save the current volume group meta information using vgcfgbackup.
I failed /dev/vdb3, /dev/vdb2 and /dev/vda6 respectively (zeroed the partition using dd). For vdb2 and vdb3, I could restore the ext3 filesystem as follows:
- recreate the physical volume of the failed partition, giving the right uuid label.
- restore the volume group meta information using vgcfgrestore
- repairing the ext3 filesystem using fsck.
As expected, only the files from the failed partition were missing after the restore operation.

However, I failed to restore the file system if /dev/vda6 gets damaged. I used an alternate superblock for fsck (one located on vdb2 or vdb3), but no avail. I lost information about the data stored on vdb2 and vdb3 (they can be found in lost+found, but name is lost). I didn't managed so far to recover the file system if the first disk (i.e. where the primary superblock is) failed. I still need to investigate what's wrong.

What do you think about these recovery possibilities? No point however that RAID+LVM looks safer.

Quote:
Originally Posted by DukeNuke2
how about opensolaris with ZFS? there are many tutorials on ZFS and how to build a home NAS system...
That could be definitively worse a try. But I'll first investigate on the system where I am most knowledgeable about.
 
index_set(7rheolef)						    rheolef-6.1 					       index_set(7rheolef)

NAME
index_set - a set of indexes (rheolef-6.1) SYNOPSYS
A class for: l = {1,3,...9} i.e. a wrapper for STL set<size_t> with some assignment operators, such as l1 += l2. This class is suitable for use with the array<T> class, as array<index_set> (see array(2)). IMPLEMENTATION
class index_set : public std::set<std::size_t> { public: // typedefs: typedef std::set<std::size_t> base; typedef std::size_t value_type; typedef std::size_t size_type; // allocators: index_set (); index_set (const index_set& x); index_set& operator= (const index_set& x); template <int N> index_set& operator= (size_type x[N]); void clear (); // basic algebra: void insert (size_type dis_i); // a := a union {dis_i} index_set& operator+= (size_type dis_i); // idem index_set& operator+= (const index_set& b); // a := a union b // a := a union b void inplace_union (const index_set& b); void inplace_intersection (const index_set& b); // c := a union b friend void set_union (const index_set& a, const index_set& b, index_set& c); friend void set_intersection (const index_set& a, const index_set& b, index_set& c); // io: friend std::istream& operator>> (std::istream& is, index_set& x); friend std::ostream& operator<< (std::ostream& os, const index_set& x); // boost mpi: template <class Archive> void serialize (Archive& ar, const unsigned int version); }; SEE ALSO
array(2) rheolef-6.1 rheolef-6.1 index_set(7rheolef)
All times are GMT -4. The time now is 02:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy