Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 5.5.31
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux Mint 15. SSD boot drive ext4 with ide data drive NTFS. Intel Dual Core 2.7Mhz. 4Gb Ram.

      Description

      Can only access data on the boot drive. My thoughts could be linked to permissions as mounted drives are owned by ROOT account no MySql account. Possibly MariaDb is starting before the drive is mounted after a reboot. Reproduce as detailed below:
      1. Stop server.
      2. Copy data from ssd ext4 boot drive to ide ntfs mounted drive
      3. Restart server.
      4. Test access with MySql Workbench and custom apps. All works fine.
      5. Reboot computer. MariaDb starts ok.
      6. Run custom app. Logs on ok but try to read records and get error:
      "java.sql.SQLSyntaxErrorException: Table 'pword.app' doesn't exist"
      7. Open MySql Workbench. All schemas listed correctly in tree view.
      8. Attempt to expand "Tables". Tables listed correctly.
      9. Attempt to expand a table. Workbench shuts down.
      10. Stop server.
      11. Reset datadir back to boot partition as original.
      12. Restart server.
      13. Everything works fine.
      14. Reboot computer. MariaDb works fine.

        Gliffy Diagrams

          Attachments

          1. axel.log
            10 kB
          2. elena_tests.txt
            12 kB
          3. global_variables.csv
            11 kB
          4. mariadb.log
            10 kB
          5. my.cnf
            5 kB
          6. my.cnf.wba.bak
            5 kB
          7. start_bad.log
            38 kB
          8. start_good.log
            1 kB

            Issue Links

              Activity

              Hide
              axel Axel Schwenke added a comment -

              taking over

              Show
              axel Axel Schwenke added a comment - taking over
              Hide
              axel Axel Schwenke added a comment -

              Axel session log

              Show
              axel Axel Schwenke added a comment - Axel session log
              Hide
              axel Axel Schwenke added a comment -

              Hi Michael,

              I have now tried a very similar test as yours. I have formatted a 16GB USB stick with NTFS, created a MariaDB instance on it, rebooted and started MariaDB again. All data from former MariaDB run was ok and new data could be added. Please see attached file axel.log for details (I used 3 screen sessions to record this)

              Re your other questions:

              > have you considered the different geometry between ssd
              > drives and spinning disc drives.

              Drive geometries are obsolete for decades. Rotating disks use http://en.wikipedia.org/wiki/Zone_bit_recording and displayed disk geometries are bogus (because number of sectors is not constant over cylinders). Further more, addressing of disk sectors is not longer using http://en.wikipedia.org/wiki/Cylinder-head-sector addresses, but http://en.wikipedia.org/wiki/Logical_block_addressing. This change was also necessary to overcome limitation of disk size (CHS was limited to 1024 cylinders, 16 heads, 63 sectors, totaling to 504MB).

              On top of that: MariaDB is storing data in files. Anything from block device addressing over device block size up to the file system used is completely invisible to MariaDB.

              > I have had correspondence with the
              > author of Ghost4Linux because an image of an ssd drive cannot be
              > restored to a convention disc drive. No solution yet found.
              ...
              > This is because an ssd
              > does not have physical sectors, it has firmware that mimics the layout
              > of a conventional drive.

              This is a pinch of truth in an ocean of nonsense. Indeed SSD don't have sectors in the conventional meaning. But then also rotating disks lie about their geometry and happily convert fake CHS addresses or LBA addresses to their hidden physical geometry. Recent hard disk even use 4KB sectors internally but mimic old fashioned 512 byte sectors on their interface.

              The truth is that mass storage addressing and volume sizes in Linux use logical addresses for ages now. And the size of a volume is simply a multiple of the device block (sector) size. If you don't believe me: look at the partition table of a device once with "fdisk -l <device>" - this shows CHS coordinates. And with "fdisk -lu <device>" - this shows LBA block numbers. If you run fdisk with the -u option, you can start a partition on any sector you want, even in the mid of a cylinder. It simply doesn't matter.

              Finally: the machine I'm typing on now and which I ran my tests on, is my laptop - running an SSD. It was delivered with a hard disk though and I simply used ntfsclone (from the ntfs-3g toolkit) to copy the pre-installed Windows image to the SSD. I could have used dd or even cat as well, but I didn't want to copy the unused blocks. So as far as cloning of partitions goes, there is no difference between a rotating hard disk and a SSD whatsoever. The only constraint is that the target partition must be at least as big as the source partition.

              Show
              axel Axel Schwenke added a comment - Hi Michael, I have now tried a very similar test as yours. I have formatted a 16GB USB stick with NTFS, created a MariaDB instance on it, rebooted and started MariaDB again. All data from former MariaDB run was ok and new data could be added. Please see attached file axel.log for details (I used 3 screen sessions to record this) Re your other questions: > have you considered the different geometry between ssd > drives and spinning disc drives. Drive geometries are obsolete for decades. Rotating disks use http://en.wikipedia.org/wiki/Zone_bit_recording and displayed disk geometries are bogus (because number of sectors is not constant over cylinders). Further more, addressing of disk sectors is not longer using http://en.wikipedia.org/wiki/Cylinder-head-sector addresses, but http://en.wikipedia.org/wiki/Logical_block_addressing . This change was also necessary to overcome limitation of disk size (CHS was limited to 1024 cylinders, 16 heads, 63 sectors, totaling to 504MB). On top of that: MariaDB is storing data in files. Anything from block device addressing over device block size up to the file system used is completely invisible to MariaDB. > I have had correspondence with the > author of Ghost4Linux because an image of an ssd drive cannot be > restored to a convention disc drive. No solution yet found. ... > This is because an ssd > does not have physical sectors, it has firmware that mimics the layout > of a conventional drive. This is a pinch of truth in an ocean of nonsense. Indeed SSD don't have sectors in the conventional meaning. But then also rotating disks lie about their geometry and happily convert fake CHS addresses or LBA addresses to their hidden physical geometry. Recent hard disk even use 4KB sectors internally but mimic old fashioned 512 byte sectors on their interface. The truth is that mass storage addressing and volume sizes in Linux use logical addresses for ages now. And the size of a volume is simply a multiple of the device block (sector) size. If you don't believe me: look at the partition table of a device once with "fdisk -l <device>" - this shows CHS coordinates. And with "fdisk -lu <device>" - this shows LBA block numbers. If you run fdisk with the -u option, you can start a partition on any sector you want, even in the mid of a cylinder. It simply doesn't matter. Finally: the machine I'm typing on now and which I ran my tests on, is my laptop - running an SSD. It was delivered with a hard disk though and I simply used ntfsclone (from the ntfs-3g toolkit) to copy the pre-installed Windows image to the SSD. I could have used dd or even cat as well, but I didn't want to copy the unused blocks. So as far as cloning of partitions goes, there is no difference between a rotating hard disk and a SSD whatsoever. The only constraint is that the target partition must be at least as big as the source partition.
              Hide
              mdavies5 Michael Davies added a comment -

              Thanks Axel,
              Sorry to put you to so much trouble. I have done 2 final tests.
              Previously my data was copied to a NTFS extended partition. This time I
              used a primary partition but the result and error messages were the
              same. Then I created a new extended partition formatted ext4 and ran
              same tests as before. It worked perfectly, even after a reboot. I again
              retested on the NTFS partition to ensure no other factors were involved
              and got the old errors.
              The only major difference in the 2 data set-ups is permissions. In ext4
              I can set ownership of the data directory to "mysql" which is the
              account under which mariaDb runs. In the ntfs partitions ownership is
              forced to "root" and read/write access is set to "all".
              Perhaps we can put this problem down to my particular system. I will use
              ext4 as my default data partition and you may move on to more urgent
              problems.

              Regarding ssd drives. I do not pretend to be an expert and mainly quoted
              from the CloneZilla forum. If you are interested:
              http://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/0e9ffb51/?limit=50#2f81

              Thanks Again
              Michael

              Show
              mdavies5 Michael Davies added a comment - Thanks Axel, Sorry to put you to so much trouble. I have done 2 final tests. Previously my data was copied to a NTFS extended partition. This time I used a primary partition but the result and error messages were the same. Then I created a new extended partition formatted ext4 and ran same tests as before. It worked perfectly, even after a reboot. I again retested on the NTFS partition to ensure no other factors were involved and got the old errors. The only major difference in the 2 data set-ups is permissions. In ext4 I can set ownership of the data directory to "mysql" which is the account under which mariaDb runs. In the ntfs partitions ownership is forced to "root" and read/write access is set to "all". Perhaps we can put this problem down to my particular system. I will use ext4 as my default data partition and you may move on to more urgent problems. Regarding ssd drives. I do not pretend to be an expert and mainly quoted from the CloneZilla forum. If you are interested: http://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/0e9ffb51/?limit=50#2f81 Thanks Again Michael
              Hide
              axel Axel Schwenke added a comment -

              Hi Michael,

              > Perhaps we can put this problem down to my particular system. I will use
              > ext4 as my default data partition and you may move on to more urgent
              > problems.

              OK, I will close this ticket then.

              BR, Axel

              Show
              axel Axel Schwenke added a comment - Hi Michael, > Perhaps we can put this problem down to my particular system. I will use > ext4 as my default data partition and you may move on to more urgent > problems. OK, I will close this ticket then. BR, Axel

                People

                • Assignee:
                  axel Axel Schwenke
                  Reporter:
                  mdavies5 Michael Davies
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Due:
                    Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 3 hours
                    3h