From 72ac712024e65597319faa65b07001f2f6d263b1 Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Sun, 29 Jan 2012 10:43:33 +0000 Subject: [PATCH] Show LVM2 PVs as supported, read-only (#160787) Add LVM2 PV into the File System Support dialog list and remove the warning message reporting LVM as not being supported. Bug #160787 - lvm support --- README | 6 ++++++ src/DialogFeatures.cc | 3 +-- src/GParted_Core.cc | 7 ------- src/Utils.cc | 3 ++- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README b/README index 036b81a1..66146f1d 100644 --- a/README +++ b/README @@ -164,6 +164,12 @@ For GNU/Linux distribution dmraid support, the following are required: - dmraid drive arrays activated on boot (e.g., dmraid -ay). +For LVM2 Physical Volume support the following commands are required: + lvm - LVM2 administration tool + dmsetup - Use to query active kernel device-mapper devices +And device-mapper support in the kernel. + + For attempt data rescue for lost partitions, the following package is required: gpart - guesses PC-type hard disk partitions diff --git a/src/DialogFeatures.cc b/src/DialogFeatures.cc index 65b194e8..cc51f442 100644 --- a/src/DialogFeatures.cc +++ b/src/DialogFeatures.cc @@ -123,10 +123,9 @@ void DialogFeatures::load_filesystems( const std::vector & FILESYSTEMS ) //fill the features chart with valid file systems for ( unsigned short t = 0; t < FILESYSTEMS .size() ; t++ ) { - //Skip luks, lvm2, and unknown because these are not file systems + //Skip luks and unknown because these are not file systems if ( FILESYSTEMS[ t ] .filesystem == GParted::FS_LUKS || - FILESYSTEMS[ t ] .filesystem == GParted::FS_LVM2_PV || FILESYSTEMS[ t ] .filesystem == GParted::FS_UNKNOWN ) continue ; diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc index 4c6f964b..ed7b3526 100644 --- a/src/GParted_Core.cc +++ b/src/GParted_Core.cc @@ -1107,9 +1107,6 @@ GParted::FILESYSTEM GParted_Core::get_filesystem() fs_type = fs_info.get_fs_type( get_partition_path( lp_partition ) ) ; } - Glib::ustring lvm_warning = _( "Logical Volume Management is not yet supported." ) ; - lvm_warning += "\n" ; - if ( ! fs_type .empty() ) { if ( fs_type == "extended" ) @@ -1133,10 +1130,7 @@ GParted::FILESYSTEM GParted_Core::get_filesystem() fs_type == "swap" ) return GParted::FS_LINUX_SWAP ; else if ( fs_type == "LVM2_member" ) - { - partition_temp .messages .push_back( lvm_warning ) ; return GParted::FS_LVM2_PV ; - } else if ( fs_type == "fat16" ) return GParted::FS_FAT16 ; else if ( fs_type == "fat32" ) @@ -1207,7 +1201,6 @@ GParted::FILESYSTEM GParted_Core::get_filesystem() if ( 0 == memcmp( magic1, "LABELONE", 8 ) && 0 == memcmp( magic2, "LVM2", 4 ) ) { - partition_temp .messages .push_back( lvm_warning ) ; return GParted::FS_LVM2_PV ; } } diff --git a/src/Utils.cc b/src/Utils.cc index c7789740..f97a3f2b 100644 --- a/src/Utils.cc +++ b/src/Utils.cc @@ -160,7 +160,7 @@ Glib::ustring Utils::get_filesystem_string( FILESYSTEM filesystem ) case FS_UFS : return "ufs" ; case FS_USED : return _("used") ; case FS_UNUSED : return _("unused") ; - case FS_LVM2_PV : return "lvm2" ; + case FS_LVM2_PV : return "lvm2 pv" ; case FS_LUKS : return "crypt-luks" ; default : return "" ; @@ -181,6 +181,7 @@ Glib::ustring Utils::get_filesystem_software( FILESYSTEM filesystem ) case FS_HFSPLUS : return "hfsprogs" ; case FS_JFS : return "jfsutils" ; case FS_LINUX_SWAP : return "util-linux" ; + case FS_LVM2_PV : return "lvm2" ; case FS_NILFS2 : return "nilfs-utils" ; case FS_NTFS : return "ntfsprogs" ; case FS_REISER4 : return "reiser4progs" ;