Bug 324772 - partitionmanager deleted mounted partition table - Errors AFTER writing changes to disk
Summary: partitionmanager deleted mounted partition table - Errors AFTER writing chang...
Status: RESOLVED INTENTIONAL
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mint (Ubuntu based) Linux
: NOR critical
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-10 22:11 UTC by bill smith
Modified: 2016-05-26 18:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bill smith 2013-09-10 22:11:55 UTC
A freshly restored drive with multiple partitions was added to system.
one partition (NTFS) on drive was mounted to verify the restore. 
restore was valid, but layout of partitions was wrong.
without remembering to unmount the partition, the partition table was deleted, and new partitions were setup and committed.

partitionmanager threw an error AFTER deleting the partition table, not before.

the order of events could be more optimal.

visibility of the error message could be more visible.

platform was LinuxMint 14 KDE x64.

no harm for me, big trouble for the next guy - the guy who picks the wrong drive will be very unhappy.

Reproducible: Always

Steps to Reproduce:
1. partition a scratch drive with a few partitions
2. write a file or two to one of those.
3. mount that partition and ls the files.
4. run partition manager and delete the partition table.
5. commit
6. optionally make new partitions and commit.
7. do 6 enough, and you'll get all your partitions without unmounting.
Actual Results:  
partition table is modified while drive has mounted volumes.

Expected Results:  
when volumes are mounted (with any file system type), the drive should not be able to be modified.
Comment 1 Andrius Štikonas 2016-05-18 13:07:10 UTC
Hi bill,

Actually KPM seems to disable creating a new partition table if there are mounted partitions.

Did you mean mounting outside KPM without refreshing KPM? At least right now KPM always assumes that there were no changes made to the partitions since the last refresh.
Comment 2 Andrius Štikonas 2016-05-26 18:13:42 UTC
I added some extra check when mounted partition is deleted. But it's not possible to check these things at job execution when partition table is created.

Actually, gparted also throws an error very late if you mount partition without refreshing the status of the devices.

It's just the way partition managers work, e.g. if I open partition manager and gparted at the same time, try to do some operations and then apply first one program and then another, the second program will also throw a lot of errors. So try to refresh partition manager status (e.g. F5 or from menu) if you do any changes externally.