1 (edited by gedakc 2016-05-04 21:27:30)

Topic: [closed] Protect your valued partitions

I am sure you can save a lot of people a lot of headaches by simply adding a device filter in a configuration file. For example, I want to wipe the partition table on a USB flash drive, but by accident I deleted a crucial LVM partition. (I did read up and did restore my data, but it wasted a lot of my time - and it now needs personal intervention every time I reboot) It would be much simpler to write device and/or partition names in a config file in order to either hide some devices completely from the drop-down, or colour them red (or something to that effect). In stead, currently, md0 is always on top - and most probably the one you do not want to touch. The removable drives, which you wipe from time to time to try out a new version of Linux, is right at the bottom of the list. So you want to wipe your 4GB flash stick, but because of a small lapse in concentration, you mess up a 4TB LVM partition. How can this happen when the LVM is mounted as /home? Well, it's actually quite simple - since you know you cannot mess up a partition without unmounting it first, so you are pretty confident you can't mess up your system. So when you get an "Invalid partition table", you have no doubt that the failed attempt to make your flash drive boot an ISO caused the problem. Only after you opt to fix the solution, you realize that it was not your flash stick - you wrote a new partition table on your LVM. Pretty please, give us a way to hide our valued devices and partitions. When I do want to work on them - I'll be too happy to temporarily change my config file to include them.

2

Re: [closed] Protect your valued partitions

To limit which devices GParted sees, you can pass the device names to gparted on the command line.

For example,

sudo gparted /dev/sdd

See GParted Manual - Running gparted from a Command Line.

3

Re: [closed] Protect your valued partitions

gedakc wrote:

To limit which devices GParted sees, you can pass the device names to gparted on the command line.

For example,

sudo gparted /dev/sdd

See GParted Manual - Running gparted from a Command Line.

Unfortunately this does not limit the possibility of human error. You could still type the wrong device number. Also, why would I open a terminal
just in order to type "sudo gparted" if I can access gparted from a menu? Surely you can use "fdisk" if you prefer a command shell over a GUI interface.
I guess I could change the shortcut to include the possible drives that I might want to change in the future (e.g. gparted /dev/sdd /dev/sde /dev/sdf),
but since I do not have 3 flash sticks in all the time, the error messages for "Device not found", can be a bit annoying. To get back to my initial post,
because of a lapse in concentration (totally my fault), I would have to back up my entire drive, recreate my LVM partition, and restore the data
again. GParted is a very good and powerful tool - I don't doubt that for a minute - but a small change like a device filter just gives you that much
more peace of mind.

Of course there is a different approach. The problem came in that the partition table of the LVM logical volume (/dev/md1) was not probably understood by
GParted, so a message box pops up and asks the user if he / she wants to fix it. GParted does protect mounted partitions, but not the partition tables
defining mounted partitions (or so it seems from my experience). Maybe GParted should not allow you to fix a partition table while one of the partitions
on it is mounted. Maybe my wording is not correct for LVM logical volumes, but hopefully you catch my drift.

4

Re: [closed] Protect your valued partitions

One of the challenges with an exclusion list is that there is variability in device paths.  For example if you have two usb sticks, simply changing the order of connecting the usb sticks will change which device path is assigned (e.g. /dev/sde versus /dev/sdf).