[SOLVED] Issue with partition manager in control center

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] Issue with partition manager in control center

Postby ghmitch » Apr 18th, '19, 20:44

Just so everyone is aware. I have experienced an issue with partition manager in the Mageia control center.

I created two new partitions on an SSD drive and subsequently added them to two btrfs RAID 1 arrays all without any problem. I then balance one of the arrays, populating the new partition and shut down the system. Next day I rebooted the system only to find it failed to boot. I then booted on another Mageia system and tried to mount the arrays in question and got mount fails with no explanation. I then rechecked the partitions in partition manager and found they existed but were not formatted btrfs which expected to happen with the btrfs add device. I then checked the partitions with "parted" cli command and was shocked when parted came back with "Partition does not exist". So Mageia partition manager shows the partitions but parted fails to find them? They are assigned device names and the whole thing. So now I am spending days doing a backup on the failed arrays before attempting to fix them. Fortunately the whole filesystem seems to be intact as I have been working through the backup I started on Monday, but still quite a while more before it is complete, but so far everything looks good when I look at the backup drive as the data transfer proceeds. I am really not sure what I might have done wrong with the partition tool that would result in something like this because I have never before experienced any thing like this.
Last edited by ghmitch on Apr 24th, '19, 05:37, edited 2 times in total.
ghmitch
 
Posts: 325
Joined: Mar 30th, '11, 03:05
Location: Eureka California USA

Re: Issue with partition manager in control center ...

Postby Bequimao » Apr 19th, '19, 09:03

To start, please show the cli output of

Code: Select all
# btrfs filesystem show

and the error message of the mount command.

Your verbal description is quite useless. If I planned such project, I would execute any step on the command line interface, and control its success. Of course # bftrs add device <device> formats the new device automatically. Btrfs add device is not in the scope of the Mageia partition manager. You may file a bug report in bugzilla, but I doubt that there will be any taker.

Best regards,
Bequimão
Bequimao
 
Posts: 108
Joined: Jun 3rd, '11, 21:51
Location: Minas Gerais, Brazil

Re: Issue with partition manager in control center ...

Postby ghmitch » Apr 19th, '19, 17:24

All cli commands (fdisk etc) show the partition empty exept parted which shows it to be not existing and blkid which shows it formated to btrfs. I spent years as a Unix system administrator so I have plenty of background with this sort of thing and have been using btrfs RAID 1 for close to five years now without incident. At this point I have fully backed up the unmounted btrfs array with btrfs restore and will now attempt to mount the array degraded without the offending partition and then attempt to remove that non existent partition from the array with btrfs device remove. But I want to put a warning out there that something weird might be going on with diskdrake, after this I will use gparted instead AND format to btrfs rather than leaving it empty.


Code: Select all
[root@localhost ghmitch]# btrfs filesystem show
Label: 'COMMON'  uuid: 4b0983d7-8d85-463d-85c1-c20aa3b4fa3b
        Total devices 7 FS bytes used 473.83GiB
        devid    1 size 385.78GiB used 96.00GiB path /dev/sde4
        devid    4 size 385.78GiB used 84.00GiB path /dev/sdc4
        devid    5 size 385.78GiB used 85.00GiB path /dev/sdd4
        devid    6 size 385.76GiB used 109.03GiB path /dev/sdf4
        devid    7 size 385.76GiB used 110.00GiB path /dev/sdg4
        devid    8 size 781.12GiB used 480.03GiB path /dev/sdb4
        devid    9 size 458.98GiB used 0.00B path /dev/sda4
       
[root@localhost ghmitch]# mount -t btrfs /dev/sda4 /common                                                                                                                                                                                           
mount: wrong fs type, bad option, bad superblock on /dev/sda4,                                                                                                                                                                               
       missing codepage or helper program, or other error                                                                                                                                                                                   
                                                                                                                                                                                                                                             
       In some cases useful info is found in syslog - try                                                                                                                                                                                   
       dmesg | tail or so.
       
[root@localhost ghmitch]# parted -l
Model: ATA CT1000MX500SSD1 (scsi)                                                                                                                                                                                                           
Disk /dev/sda: 1000GB                                                                                                                                                                                                                       
Sector size (logical/physical): 512B/4096B                                                                                                                                                                                                   
Partition Table: msdos                                                                                                                                                                                                                       
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  5240MB  5238MB  primary  ext4         boot
 2      5240MB  10.5GB  5239MB  primary
 
 [root@localhost ghmitch]# ls -l /dev/sda4
brw-rw---- 1 root disk 8, 4 Apr 19 08:10 /dev/sda4
ghmitch
 
Posts: 325
Joined: Mar 30th, '11, 03:05
Location: Eureka California USA

Re: Issue with partition manager in control center ...

Postby doktor5000 » Apr 22nd, '19, 01:34

ghmitch wrote:I spent years as a Unix system administrator so I have plenty of background with this sort of thing and have been using btrfs RAID 1 for close to five years now without incident.

Just out of curiosity, why do you span a RAID 1 over 2 partitions on the same physical harddrive?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Issue with partition manager in control center [SOLVED]

Postby ghmitch » Apr 23rd, '19, 19:23

Just out of curiosity, why do you span a RAID 1 over 2 partitions on the same physical harddrive?


Very good question because doing so would break RAID protection by artificially introducing a single point of failure.

That is not what I am doing, rather I have two RAID arrays, each spread across the same hard drives with each array occupying only 1 partition on each of those hard drives.

And in fact, the problem is now solved after taking a week to do offline btrfs backups which worked flawlessly, then after fixing the alignment problem and removing the dubious partitions they both mounted without issues, no data lost, making me really super impressed with btrfs tools. After five years without problems, finally when I do have a problem, the fix is straight foward and uneventful and no data lost.

As for the partitions created with diskdrake, I still don't know what went wrong with that but when the result is that multiple partition tools give different results as to a single partition, something is very wrong. So I deleted both the partitions with diskdrake and will now recreate them with gparted. The drive that failed the partitioning was a 1TB SSD, so I do wonder if the drive being an SSD could have had something to do with the partitioning fail.

The inability to mount the arrays was being caused by the alignment issue which probably had been around for a long time. The partition issue was a separate issue that was not preventing them from being mounted. I know that because in the case of one of these arrays I actually mounted the array after fixing the alignment problem and THEN removed the ghost partition (which had data from the array) and successfully retrieved all the array data back into the other drives in that array.

All of this has caused me to reassess my overall backup strategies because my backups in this case were on bluray discs and I had never equipped my second machine with a bluray drive making my backups useless. Added to that I found it impossible to find a bluray drive locally. Now, needless to say both machines have a bluray drive installed.

I also did not have an external drive to use in emergency which was a big fail on my part, and now I have one. With that on hand I decided to backup my second machine which operates with the whole root directory on one btrfs RAID 1 array spread over three SSDs and thats it. So I download Mageia 6 live disc and booted up on it to see if it would pass the test. First challenge, will Mageia 6 live be able to manage my btrfs array? Yup! No problem. Second challege, will Mageia 6 live be able to mount my external USB 3.0 ntfs drive? Amazingly no problem. I am VERY impressed with Mageia live disc! So I very successfully tarred the whole filesystem off of that pc, postgre sql and all onto the external drive just in case. I have been backing up the database regularly, but backing up the whole system will make things a lot easier in event of a catastrophic failure.
ghmitch
 
Posts: 325
Joined: Mar 30th, '11, 03:05
Location: Eureka California USA

Re: Issue with partition manager in control center [SOLVED]

Postby martinw » Apr 23rd, '19, 20:44

diskdrake will display partitions that have a type code of 0x00 ("Empty"), as will fdisk. parted won't. It is possible to create such partitions in diskdrake, by selecting "BIOS boot or Empty" for the partition type. That's only intended to be used for creating a partition to hold the GRUB2 bootloader on a disk with a GPT partition table.

blkid will analyze and show the format of the partition. So if you format an "Empty" partition, blkid will report the format.

So I don't know how you got there, but from the evidence, you ended up with a partition with type code 0x00 and formatted as btrfs.
martinw
 
Posts: 609
Joined: May 14th, '11, 10:59

Re: Issue with partition manager in control center [SOLVED]

Postby ghmitch » Apr 23rd, '19, 23:02

Thanks for the insights. I intended it as being empty, but expected the type to change once the partition was formatted and populated. But obviously that doesn't happen. In the past I have preformatted the partitions to btrfs but then I get a warning from btrfs add that the partition already contains other data, which is confusing. Certainly changing the type to empty fixed that problem but introduced yet another problem in that it creates a ghost partition that contains data but appears not to with most partition tools. So I never tried that approach before and after burning my fingers with this, I won't ever try it again in the foreseeable future. But thanks for coming up with the answer to the mystery.
ghmitch
 
Posts: 325
Joined: Mar 30th, '11, 03:05
Location: Eureka California USA


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron