Commit Graph

2067 Commits

Author SHA1 Message Date
Mario Blättermann c5a34551ca [l10n] Updated German doc translation 2012-02-15 21:24:17 +01:00
Daniel Mustieles 6fef59f9fd Updated Spanish translation 2012-02-15 18:25:21 +01:00
Marek Černocký 095a9d0b73 Updated Czech translation 2012-02-14 21:27:31 +01:00
Curtis Gedak 93241cccbf Fix regression when shrinking, moving and copying swap (#670017)
Since linux-swap does not contain data and does not have a resize
command, linux-swap is recreated instead of moved, copied, or resized.

GParted 0.11.0 contained the following enhancement:
Bug #663980 - Avoid redundant file system maximize actions

An unfortunate side effect of this change was that the required
maximize action to recreate linux-swap would not occur when the new
size for the partition was less than or equal to the original size.

The changes associated with this commit address this regression.

Closes Bug #670017 - Corrupting swap partitions
2012-02-14 11:31:15 -07:00
Baurzhan Muftakhidinov 7338ddf78a Updated Kazakh translation 2012-02-14 09:18:35 +06:00
Bruno Brouard 493ad030cb Updated French doc translation 2012-02-13 11:45:47 +01:00
Bruno Brouard 6989050ced Updated French translation 2012-02-13 11:44:02 +01:00
Fran Diéguez 2f7fe571fd Updated Galician translations 2012-02-13 02:16:57 +01:00
Gabor Kelemen a3c96e3519 Updated Hungarian translation 2012-02-13 01:09:19 +01:00
Daniel Mustieles 4ad574214a Updated Spanish translation 2012-02-12 21:10:22 +01:00
Piotr Drąg d15012e657 Updated Polish translation 2012-02-12 20:59:34 +01:00
Daniel Mustieles 5e6d8af505 Updated Spanish translation 2012-02-12 20:29:18 +01:00
Mike Fleetwood ea1c0c023e Warn when an LVM2 PV is a member of a damaged VG (#160878)
Generate a warning for each LVM2 Physical Volume which is a member of a
Volume Group which has other members missing.

Bug #160787 - lvm support
2012-02-12 11:02:55 -07:00
Mike Fleetwood 6d665d669d Display VG export status with an LVM2 PVs busy status (#160787)
Also update to use LVM terminology, such that a Physical Volume is
referred to as a member of a Volume Group.  Status of an LVM2 PV is now
displayed using one of the following messages:
    Not active (Not a member of any volume group)
    VGNAME not active
    VGNAME not active and exported
    VGNAME active

Bug #160787 - lvm support
2012-02-12 10:43:01 -07:00
Mike Fleetwood 3fbdb8055f Prevent crash in the LVM2 PV information cache (#160787)
GParted would crash if there were any embeded spaces in the output from
the command used to query LVM2 PVs.  There aren't normally any embeded
spaces, but they can occur in certain degrated situations.  For example
if one of the PVs in a VG spanning two PVs is lost the PV is displayed
as "unknown device" rather than its actual device name:

    # lvm pvs --nosuffix --units b --separator , -o pv_name,pv_free,vg_name,lv_name,lv_attr
      Couldn't find device with uuid DMEi8r-9Vvy-w0Ok-CSSn-oLmY-YrY3-1PBznz.
      PV,PFree,VG,LV,Attr
      /dev/sda11,2143289344,GParted-VG1,,
      unknown device,1619001344,GParted-VG1,lvol0,-wi---
      unknown device,1619001344,GParted-VG1,,

This was loaded into the cache as:

    ["/dev/sda11,2143289344,GParted-VG1,,",
     "unknown",
     "device,1619001344,GParted-VG1,lvol0,-wi---",
     "unknown",
     "device,1619001344,GParted-VG1,,"]

The crash would happen when trying to access the VG name or LV flags on
a line without enough comma separated fields.

Improve parsing of the output from "lvm pvs" so that lines are not split
on embeded spaces.  Don't crash on lines without without enough comma
separated fields.

Bug #160787 - lvm support
2012-02-12 10:42:40 -07:00
Mike Fleetwood c24170927d Display any errors from querying LVM2 PVs to the user (#160787)
Previously any errors which occurred when running LVM commands used to
load the LVM2_PV_Info cache were simply ignored and the cache wasn't
loaded.  This lead to missing information about LVM2 PVs, but the user
had no indication as to why.

Now when any errors occur the command ran and all output is captured.
This is displayed to the user, along with a suitable warning message, in
the Partition Information dialog.

Bug #160787 - lvm support
2012-02-12 10:24:02 -07:00
Mike Fleetwood 4b30a2ddbf Fix detection of LVM2 PV busy status when exported VGs exist (#160787)
If a Volume Group is exported the "lvm lvs" command returns non-zero
exit status causing its output to not be loaded into the LVM2_PV_Info
cache and detection of busy Physical Volumes completely fail.

    # lvm lvs -o lv_name,vg_name,lv_attr
      Volume group GParted_VG4 is exported
      LV    VG          Attr
      lvol0 GParted-VG2 -wi---
      lvol0 GParted_VG3 -wi-a-
      lvol1 GParted_VG3 -wi-a-
    # echo $?
    5

Switch to using "lvm pvs" to query all cached information using one
command, which doesn't return non-zero when exported VGs exist.

    # lvm pvs --nosuffix --units b -o pv_name,pv_free,vg_name,lv_name,lv_attr
      PV         PFree      VG          LV    Attr
      /dev/sda10 2147483648
      /dev/sda11 2143289344 GParted-VG1
      /dev/sda12 1619001344 GParted-VG2 lvol0 -wi---
      /dev/sda12 1619001344 GParted-VG2
      /dev/sda13  830472192 GParted_VG3 lvol0 -wi-a-
      /dev/sda13  830472192 GParted_VG3 lvol1 -wi-a-
      /dev/sda13  830472192 GParted_VG3
      /dev/sda14 1619001344 GParted_VG4 lvol0 -wi---
      /dev/sda14 1619001344 GParted_VG4
    # echo $?
    0

Bug #160787 - lvm support
2012-02-12 10:24:02 -07:00
Mike Fleetwood 11d044dba0 Don't ignore any errors resizing btrfs on Linux >= 3.2 (#669389)
Btrfs file system can be successfully resized to the same size without
failing on Linux 3.2 or higher.

Linux 3.2-rc4 includes commit:
    35bae54a255fbf3eab747b842d300d59f6e1abb4
    Btrfs: Don't error on resizing FS to same size

Closes bug #669389
2012-02-10 11:20:47 -07:00
Mike Fleetwood 5967966ff7 Create helper functions to check for minimum kernel version
Create function Utils::kernel_version_at_least() to check that the
current Linux kernel is a particular version or higher.

Update nilfs2 to use this function to determine whether the kernel is
new enough to support file system resizing.
2012-02-10 11:20:47 -07:00
Rogier Goossens 88cfe40a8b Remove temporary file after reading UUID of fat16 and fat32 filesystems 2012-02-10 10:33:13 -07:00
Rogier Goossens a5eb91e549 Further improve help manual wording
See Bug #667278 - Add support for setting UUID
2012-02-10 10:33:13 -07:00
Curtis Gedak 2f191307cf Restructure and word-smith UUID translatable text
Restructure and word-smith translatable text associated with the
enhancement to add ability for setting UUID in an effort to better
align with the Gnome Documentation Style Guide.

See Bug #667278 - Add support for setting UUID
2012-02-10 10:33:13 -07:00
Rogier Goossens 4108daf15f Implement changing UUID for NTFS (#667278)
Part 4 of 4 to provide new UUID support for NTFS.

Closes Bug #667278 - Add support for setting UUID
2012-02-10 10:33:13 -07:00
Rogier Goossens 170a79b3a0 Use custom text functions for mount/unmount and swapon/swapoff texts
Part 3 of 4 to provide new UUID support for NTFS.

See Bug #667278 - Add support for setting UUID
2012-02-10 10:33:12 -07:00
Rogier Goossens 8735227dd7 Add support for custom text strings depending on the filesystem
Part 2 of 4 to provide new UUID support for NTFS.

See Bug #667278 - Add support for setting UUID
2012-02-10 10:33:12 -07:00
Rogier Goossens ce9feeda0e Make FileSystem objects in GParted_Core accessible and usable by others
Part 1 of 4 to provide new UUID support for NTFS.

See Bug #667278 - Add support for setting UUID
2012-02-10 10:33:12 -07:00
Mario Blättermann 7b83febf19 [l10n] Updated German doc translation 2012-02-09 22:31:45 +01:00
Mario Blättermann d1b34dac03 [l10n] Updated German translation 2012-02-09 22:14:44 +01:00
Rogier Goossens 50befd62a3 Check LVM cache only for LVM physical volumes
Determine the FS type before checking whether a FS is busy,
and check LVM only for LVM PVs.

Remove the LVM busy check for extended partitions, as they
don't contain LVM PVs - or any other FS for that matter.
(and even if they did, the rest of the code silently assumes
they don't...)
2012-02-08 15:46:36 -07:00
Rogier Goossens ed51f4b28f README file: dmsetup is not required for lvm 2012-02-08 15:46:29 -07:00
Daniel Mustieles 51650ed0d2 Updated Spanish translation 2012-02-05 19:28:19 +01:00
Curtis Gedak d2d830108b Place file system types in alphabetical order 2012-02-03 16:16:04 -07:00
Marek Černocký a5b89524d4 Updated Czech translation 2012-02-03 22:31:56 +01:00
Curtis Gedak 7a0dd4ab7a Update AUTHORS file
Add recognition for the work done by Mike Fleetwood to add initial
support for Logical Volume Management Physical Volumes (LVM PVs).
2012-02-03 11:58:04 -07:00
Curtis Gedak cb3aab77fc Add comment to Utils::tokenize method 2012-02-03 11:38:51 -07:00
Mike Fleetwood 820242635a Switch to using lvs to identify active LVM LVs (#160787)
Previously used "dmsetup info" to directly list device-mapper mapping
names in the kernel to identify active Logical Volumes.  However GParted
failed to recognise active LVs if the VGNAME contains any hyphens (-).
This is because LVM encodes hyphens as double hyphens in the mapping
name.

To avoid having to duplicate the LVM hyphen encoding in GParted, switch
to using "lvm lvs" to list LVs.

    # dmsetup info --columns --noheadings --separator , -o name
    GParted_VG1-lvol_00
    GParted--VG2-lvol--00

    # lvm lvs --noheadings --separator , -o lv_name,vg_name,lv_attr
      lvol_00,GParted_VG1,-wi-a-
      lvol-00,GParted-VG2,-wi-a-
      lvol-01,GParted-VG3,-wi---
                             .^.
(-) not active, (a) or any other character considered active.  Reference
lvs(8).

Bug #160787 - lvm support
2012-02-02 10:24:31 -07:00
Mike Fleetwood 72ac712024 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
2012-02-02 10:24:31 -07:00
Mike Fleetwood aa085a3caa Display busy status of LVM2 PVs (#160787)
A Volume Group is active when any of its Logical Volume mappings are
loaded (and enabled) in the Kernel's device-mapper driver.  Therefore
all the Physical Volumes in the VG (must be considered) active too.
This is exactly equivalent to a mounted file system, as the kernel is
actively using the partition.  Mark active LVM2 PVs as busy in GParted.

Don't use statvfs() for determining sector usage of busy LVM2 PVs as it
will fail with "statvfs(VGNAME): No such file or directory".  Instead
always use the LVM2 PV specific method.

Display the status of the LVM2 PV in the Information dialog using one of
the following relevant messages:
    Not active (Not part of any volume group)
    VGNAME not active
    VGNAME active
(The code uses the VGNAME stored in the partition's first mount point,
as displayed in the "Mount Point" column, rather than going back to the
primary source of the information in the LVM2_PV_Info class).

Temporarily prevent GParted from offering to unmount LVM2 PVs until
activating and deactivating Volume Groups is implemented later.

Bug #160787 - lvm support
2012-02-02 10:24:31 -07:00
Mike Fleetwood 8083f11d84 Display LVM2 VGNAME as the PV's mount point (#160787)
As the Mount Point column is being borrowed to display the PV's VGNAME,
also suppress generation of the "Mount on" submenu for LVM2 PVs.

Bug #160787 - lvm support
2012-02-02 10:24:31 -07:00
Mike Fleetwood ff8ad04120 Lazy initialize the cache from querying LVM2 PVs (#160787)
Previously when GParted was started LVM2_PV_Info cache was loaded twice,
executing LVM2 PV querying commands twice.  Firstly when
lvm2_pv::get_filesystem_support() was checking if LVM2 PV support was
available, and secondly when forced by a refresh in
GParted_Core::set_devices().

Implement lazy initialization.  Only load the cache when forced by the
above mentioned refresh or having to return a value when the cache is
not yet loaded.  Do not initialize the cache when just checking if LVM2
PV support is available.

Bug #160787 - lvm support
2012-02-02 10:24:31 -07:00
Mike Fleetwood 608d992e82 Cache results from querying all LVM2 PVs (#160787)
Cache results from querying all LVM2 PVs in one go to minimise the
number of times lvm commands are executed.  Take inspiration from
caching performed by FS_Info and Proc_Partitions_Info.

Bug #160787 - lvm support
2012-02-02 10:24:28 -07:00
Mike Fleetwood 0acb623725 Allow unused space in a partition to equal its size
Newly created LVM2 PVs, before being added to a Volume Group, report
free space equal to the partition size.  Allow free space to equal
partition size.

    # parted /dev/sda10 unit B print
    Error: /dev/sda10: unrecognised disk label
    Model: Unknown (unknown)
    Disk /dev/sda10: 2147483648B
    Sector size (logical/physical): 512B/512B
    Partition Table: unknown
    # lvm pvcreate /dev/sda10
      Writing physical volume data to disk "/dev/sda10"
      Physical volume "/dev/sda10" successfully created
    # lvm pvs --units b -o pv_free /dev/sda10
      PFree
      2147483648B
2012-02-02 10:17:41 -07:00
Mike Fleetwood abd0dd0426 Report space usage of LVM2 PVs (#160787)
Add minimal support for just reporting the space usage of LVM2 PVs.
Accept libparted / blkid detection of LVM2 PVs first, falling back on
GParted's specific detection code otherwise.  Maintain LVM not supported
warning message.

Bug #160787 - lvm support
2012-02-02 10:17:29 -07:00
Mike Fleetwood 391e5e12f9 Rename FS_LVM2 -> FS_LVM2_PV (#160787)
This is the first step of adding support for just LVM2 Phyiscal Volumes,
a subset of full LVM2 support.

Make it clear that it is only LVM2 PVs being treated like a file system.

Bug #160787 - lvm support
2012-01-31 10:26:51 -07:00
Matej Urbančič d852a394e9 Updated Slovenian translation 2012-01-29 21:51:56 +01:00
Matej Urbančič 4f641df061 Updated Slovenian translation 2012-01-28 19:49:35 +01:00
Daniel Mustieles 889fcf88a2 Updated Spanish translation 2012-01-27 14:37:20 +01:00
Marek Černocký d25836a05e Updated Czech translation 2012-01-26 09:16:52 +01:00
Curtis Gedak 9c2b57cb50 Update copyright year 2012-01-25 16:55:51 -07:00
Curtis Gedak fcdd853cb9 Increase FAT32 minimum size to 33 MiB (#668491)
Closes Bug #668491 - Formatting small FAT32 partitions (32MB)
                     violates FAT32 specifications
2012-01-25 16:52:51 -07:00