WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Disk partition - 3 partitions  (Read 7143 times)

Offline ketank

  • Newbie
  • *
  • Posts: 40
  • learning ...
Disk partition - 3 partitions
« on: October 01, 2018, 09:53:57 AM »
Hi,
I have piCore 9.0.3 installed and am trying to partition the memory card in 3 partitions
1, FAT partition
2. For /home
3. Static partition - this will not be backed up and will contain static files and transaction data in nosql

I have tried this many times but when I add the 3rd partition, memory card crashes and all 3 partitions are deleted.
I am using a 4GB memory card so trying to make 1GB + 3GB partitions which should leave lots of free space on the card.

Kindly guide how to go about this partitioning. 

 

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Disk partition - 3 partitions
« Reply #1 on: October 01, 2018, 10:04:21 AM »
Hi ketank
Quote
I am using a 4GB memory card so trying to make 1GB + 3GB partitions which should leave lots of free space on the card.
1GB + 3GB = 4GB leaving no free space on the card for your 3rd partition.

Offline ketank

  • Newbie
  • *
  • Posts: 40
  • learning ...
Re: Disk partition - 3 partitions
« Reply #2 on: October 01, 2018, 11:02:02 AM »
Sorry. My bad - 1GB + 2 GB

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1264
Re: Disk partition - 3 partitions
« Reply #3 on: October 01, 2018, 01:05:15 PM »
I do this all the time.....   I just made 8 partitions for some testing the other day using an extended partition.

When you add the last partition in fdisk, before you write the partition and quite, can print the partition table and post it here?

Offline core-user

  • Full Member
  • ***
  • Posts: 195
  • Linux since 1999
Re: Disk partition - 3 partitions
« Reply #4 on: October 01, 2018, 02:29:38 PM »
I think you just need to create the partitions before installing, pointing the boot process to use another partition for your /home.
AMD, ARM, & Intel.

Offline ketank

  • Newbie
  • *
  • Posts: 40
  • learning ...
Re: Disk partition - 3 partitions
« Reply #5 on: October 03, 2018, 08:44:56 AM »
Hi,
Thank you for response. I am not sure but it worked after changing the SD card.
Thank you for your support.

Offline ketank

  • Newbie
  • *
  • Posts: 40
  • learning ...
Re: Disk partition - 3 partitions
« Reply #6 on: October 03, 2018, 09:45:41 AM »
Hi,
I thought I had success but looks like something is still not ok.

the final partition table -
Code: [Select]
Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/mmcblk0p1    4,0,1       37,63,32          8192      77823      69632 34.0M  c Win95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary
/dev/mmcblk0p2    38,0,1      1014,36,1        77824    2077824    2000001  976M 83 Linux
Partition 2 does not end on cylinder boundary
/dev/mmcblk0p3    1014,36,2   1023,63,32     2077825    5984075    3906251 1907M 83 Linux
Partition 3 does not end on cylinder boundary

Questions -
1. how to I make it mount automatically
2. when I try to mount manually I get following error -
Code: [Select]
[  353.108040] F2FS-fs (mmcblk0p3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[  353.108059] F2FS-fs (mmcblk0p3): Can't find valid F2FS filesystem in 1th superblock
[  353.108724] F2FS-fs (mmcblk0p3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[  353.108737] F2FS-fs (mmcblk0p3): Can't find valid F2FS filesystem in 2th superblock
[  353.108787] F2FS-fs (mmcblk0p3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[  353.108797] F2FS-fs (mmcblk0p3): Can't find valid F2FS filesystem in 1th superblock
[  353.108809] F2FS-fs (mmcblk0p3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[  353.108816] F2FS-fs (mmcblk0p3): Can't find valid F2FS filesystem in 2th superblock

Not sure how to proceed forward.

    [EDIT]: Added code tags.  Rich
« Last Edit: October 03, 2018, 10:08:46 AM by Rich »

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1264
Re: Disk partition - 3 partitions
« Reply #7 on: October 03, 2018, 11:25:47 AM »
I've been doing testing with f2fs, it is really not very stable.   There are real no speed gains either for normal linux use.

I would just use EXT3/4.    XFS seems to work fairly well too.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Disk partition - 3 partitions
« Reply #8 on: October 04, 2018, 01:13:44 AM »
I've been doing testing with f2fs, it is really not very stable.   There are real no speed gains either for normal linux use.

I would just use EXT3/4.    XFS seems to work fairly well too.

What do you mean not very stable?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline ketank

  • Newbie
  • *
  • Posts: 40
  • learning ...
Re: Disk partition - 3 partitions
« Reply #9 on: October 04, 2018, 05:11:43 AM »
Hi,

Reformated as ext3 and working fine now.
Thank you for your support.

Offline TimJ

  • Jr. Member
  • **
  • Posts: 57
Re: Disk partition - 3 partitions
« Reply #10 on: October 04, 2018, 05:47:21 AM »
Another partitioning question.

I write piCore to a sdcard on my PC using Ubuntu 18.04, and whilst there use gparted to increase the partition size and add any extras partitions, but if I then try to use fsck on the Pi i just get this.

Code: [Select]
tc@box:~$ sudo fsck /mnt/mmcblk0
fsck (busybox 1.28.4)
fsck: fsck.auto: No such file or directory
tc@box:~$

Not a major problem as I just put the card back in the PC. But wondering what was the cause?

Tim

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Disk partition - 3 partitions
« Reply #11 on: October 04, 2018, 01:41:11 PM »
That is the device, not the partition.
The only barriers that can stop you are the ones you create yourself.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1264
Re: Disk partition - 3 partitions
« Reply #12 on: October 04, 2018, 10:39:52 PM »
Bela,

Stable might not be the right choice of words, but I've had a number of cases when testing f2fs, where a file system was "successfully" created, but the drive would not mount......   the exact problem the OP had.   It seemed to be dependent on the size of the partition created.

Once a partition was mounted, it did seem to work okay, but my unofficial benchmark tests showed times varied by about 90 seconds on a 7min test  (I ran tests 5 times)   ext4 was much more consistent on the same test. 

Paul
« Last Edit: October 04, 2018, 10:43:53 PM by Paul_123 »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Disk partition - 3 partitions
« Reply #13 on: October 05, 2018, 03:34:02 AM »
Hi Paul

thanks. By default I'm using ext4. In piCore10 base btrfs kernel module is also included. It is stable and reliable. btrfs partition mounts slower than ext4fs but performance is good.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1264
Re: Disk partition - 3 partitions
« Reply #14 on: October 05, 2018, 06:19:32 PM »
I did btrfs testing too. 

-Mounts slow as you noted
-Modules are extremely large.
-btrfs-progs packages has extra dependencies.
-Smallest partition with separate data and metadata regions is ~115MB.  (Doesn't make it a good candidate for the tce partition)
-Average performance was similar to ext4.   Some test runs were much faster and some runs were slower.
-The self healing is interesting.....but not sure that is of much value in a read-only file system.

xfs was not a clear winner either.