partitioning: unintentionally merged Linux and Windows partitions, how can I recover Linux?

I had about 30 GB of free space on disk C and I was checking the partitions I had and I discovered that I have 35 GB of unallocated disk. I completely forgot that this partition is for Ubuntu (dual boot with Windows) and merged it with disk C. Then I created a new partition hoping to recover Ubuntu, but when I go to Ubuntu a black screen appears with GRUB open that says: a minimal edition is supported as bash … What should I do to recover lost data in Ubuntu?

How to remove partitions – Ask differently

I recently bought a used iMac 27 "2017. It has a 2TB HD and the guy who previously owned Windows ran in Bootcamp. I tried to use the Disk Utility application to merge the partitions but I had no luck. I'm still getting an error message that he says there is corruption. I would like to have all 2TB for my MacOS. Being unfamiliar with the terminal, I don't want to delete anything important.

Thank you

enter the description of the image here

Is "fsutil mftzone behavior query" for all partitions in Windows 8.1 64-bit?

I have 2 HDDs and 5 partitions in them, and I can't find this question answered on DuckDuckGo, Google or Microsoft; The command does not allow you to specify a drive letter, so I guess it is for all partitions, but I am not sure.

Or the default is C: and I have to change the approach with DiskPart?
Windows 8.1 Off and online don't have any of that either, so I'm lost.

hard drive – meaning of Windows 10 disk partitions

The first partition (EFI) is the BIOS partition.

From the second to the fifth, except the third: yours.

Third: it can occur from the original configuration

Sixth and Seventh: Partitions to be able to rebuild according to factory specifications.

These are all normal partitions in Windows 10

Not all kafka consumers are being assigned to partitions

I have 10 consumers and 10 partitions.
I take the number of partitions

    int partitionCount = getPartitionCount(kafkaUrl);

and I create the same number of consumers with the same Group ID.

Stream.iterate(0, i -> i + 1)
.limit(partitionCount)
.forEach(index -> executorService.execute(() -> createCosnumer(consumerConfig(index), topicName)

config looks like this

Properties properties = new Properties();
properties.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, kafkaUrl);
properties.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class.getName());
properties.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class.getName());
properties.put(ConsumerConfig.GROUP_ID_CONFIG, CONSUMER_CLIENT_ID);
properties.put(ConsumerConfig.CLIENT_ID_CONFIG, CONSUMER_CLIENT_ID + index);
properties.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, "false");
properties.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, "300000");
properties.put(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG, "10000");
properties.put(ConsumerConfig.MAX_POLL_INTERVAL_MS_CONFIG, String.valueOf(Integer.MAX_VALUE));
properties.put(ConsumerConfig.PARTITION_ASSIGNMENT_STRATEGY_CONFIG, "org.apache.kafka.clients.consumer.RoundRobinAssignor");

each consumer assigns a topic and begins to consume

consumer.subscribe(topicName);
while (true) {
ConsumerRecords consumerRecords = consumer.poll(Duration.ofSeconds(4));
if (consumerRecords.count() > 0) {
consumeRecords(consumerRecords);
consumer.commitSync();
}
}

what I see after assigning consumers to the partition

TOPIC      PARTITION  CURRENT-OFFSET  LOG-END-OFFSET  LAG             CLIENT-ID                                                        
topicName  1          89391           89391           0               consumer0
topicName  3          88777           88777           0               consumer1
topicName  5          89280           89280           0               consumer2
topicName  4          88776           88776           0               consumer2
topicName  0          4670991         4670991         0               consumer0
topicName  9          23307           89343           66036           consumer4
topicName  7          89610           89610           0               consumer3
topicName  8          88167           88167           0               consumer4
topicName  2          89138           89138           0               consumer1
topicName  6          88967           88967           0               consumer3

only half of consumers have been assigned to partitions
Why did this happened? There must be one consumer per partition according to the documentation. I am doing something wrong? kafka version 2.1.1.

Partitioning – Search for Postgres partitions in reverse order of partitions

Our production system is in postgres 9, with a partition table. In one of the selection queries, we cannot pass the partition key for the selection, but we want the data from the last partition, is it possible to make the postgres search from the last partition backwards?

EXPLAIN
SELECT *
FROM ifta_trip
WHERE username = 123456
ORDER BY start_time DESC
LIMIT 1;

This searches from the oldest partition to the most recently created partition even though I have sorted my partition key in descending order. Is there any way to make postgres look from the most recent partition and look back?

sql server – Table partition Function Empty partitions

I plan to partition my table monthly along a date column, and I have read in some places that it is recommended (in fact, a recommended practice) to keep the partitions empty at both "ends" of the range.
https://techcommunity.microsoft.com/t5/premier-field-engineering/oops-i-forgot-to-leave-an-empty-sql-table-partition-how-can-i/ba-p/370563

As a naive approach, I would create my partition function in this way:

CREATE PARTITION FUNCTION MyPf(DATE)
AS RANGE RIGHT FOR VALUES (
'1900-01-01',
'2019-10-01','2019-11-01',...,...,...,'2022-08-01',
'9999-12-31');

CREATE PARTITION SCHEME MyPs AS PARTITION MyPf
ALL TO (MySingleFileGroup)

I can guarantee that there is no data prior to 2019-10-01 will be inserted into the table, and I plan to keep the SPLIT partitions when it arrives 08-20-08-01, until you get 9999-12-31.
I also plan to TRUNK old partitions regularly and MERGE the range of old partitions.

Did I miss something obvious regarding best practices with this configuration? My only goal is to be able to divide and merge without moving data.

Thank you!

I install ubuntu by default and lost all partitions and my data

Battery exchange network

The Stack Exchange network consists of 175 question and answer communities, including Stack Overflow, the largest and most reliable online community for developers to learn, share their knowledge and develop their careers.

Visit Stack Exchange

18.04 – Ubuntu gets stuck in emergency mode when expanding partitions

After having performed the process described here to change the size of the hard drive, I get the following error, in which Ubuntu crashes in emergency mode.

ERROR could not send host log messa

I followed the steps here using sudo sudo update-grub

And I get the following results shown here

From here I systemctl reboot and used update-grub

And when ls -l /dev/disk/by-uuid I get the next 2 partitions available

enter the description of the image here

I continued with the suggested commands on the screen systemctl reboot Y systemctl default

[enter the description of the image here]

However, all the steps still do not allow me to log back into the machine and remain stuck at startup.

The error started after trying the steps here to change the partition size
in which /dev/sda1 I was starting well until assigning /dev/sdb5 to expand storage.

File system – How to create and use multiple partitions on an external SD card with different file systems (Ext4, exFAT, NTFS)?

Some points in four partitions:

  1. First dedicated partition exFAT or NTFS or FAT32 (whatever Android allows and offers optimal performance) to store applications, photos and media.

    For applications, consider the kind of application, but that is expensive. Others will exercise a performance penalty more or less. In the file system selection, the biggest drawback of FAT32 is its maximum file size limit of 4 GB. In addition, it does not have any built-in phenomenon to deal with the increasing fragmentation that can reduce performance over time. You can find many resources online about the pros and cons of FAT32 and exFAT. See also the functionality comparison of the official MS file system.

    Is it necessary on Android that the first partition be FAT32?

    It is not necessary if your device supports other file systems. FAT32 is Android's default value for secondary external storage (SD cards and USB drives) since the start days. How SDXC cards (32GB +) come preformatted with exFAT (Although not a technical limit), many OEMs add exFAT support to their devices. However, exFAT was closed source until recently, so it is not part of the Android stock (except for some limited addition in Android 9). But now it is very likely to be added to the Android kernel source. See some relevant details in this answer.

    So check if your kernel is compatible with exFAT: grep exfat /proc/filesystems. NTFS is still closed source and does not have a stable open source driver in the kernel. However, it is possible to mount exFAT and NTFS using FUSE controllers. In each case vold You must support the file system.

    Or can we make exFAT or NTFS available for download in Android Apps2SD and other applications?

    Regardless of the file system, all applications do not have write access to the external SD card unless you make some changes to the ROM. See details on How to save files to an external SD card? and the Android storage trip.

  2. Applications are available to move unsupported applications to the SD card. Or you can manually mount (link) an SD card partition (or directory) inside /data. Surely you need ext4 (or f2fs on new devices) for this purpose (to enforce UNIX permissions). But it doesn't necessarily have to be a partition, you can place a loop file on the first partition.

    Trying to modify the application manifest (or ask how to do it) can be considered unethical or illegal.

  3. You do not need a dedicated partition to store backup copies. Instead, the first partition can be used.

  4. If you want to use the entire partition to swap, that doesn't need a file system (but mkswap) If you want to create swap instead (which is not a bad idea), you can again use the first partition for that. However, using an external SD card to swap It is not always a good idea. Since zram Commit to the main core:

    Embedded systems are usually reluctant to use eMMC or SDCard as an exchange because there is wear leveling.

    Although we have real storage as an exchange, it was also a problem. Because at some point it ends up causing the system to not respond due to the slow exchange storage performance.

    Android supports swap with zram back-end (which creates a compressed block device within RAM) from Android 4.4. Android OOM killers (old in lowmemorykiller kernel and new lmkd userspace) take swap consider. If your kernel supports ZRAM, the use of an external SD card for SWAP is not recommended. It may worsen performance and will kill the SD card very soon due to the increase in I / O operations.

If I format the first partition with ext4, exFAT or NTFS, the Android operating system does not display it in SETTINGS> STORAGE> SD CARD> PARTITIONS and requests to mount or delete partitions.

It may be due to an unsupported file system (see explanation above) or multiple partitions (see explanation below). However, if a partition is mounted manually with the appropriate permissions, applications can read / write files there. You can use sdcardfs or FUSE to emulate the file system for fixed permissions. But in this way, the Android framework is unaware of the mounted file system and Android applications will not be notified of the new storage. You also cannot manage the mounted storage from the Device Configuration.

Can the SD card have 4 partitions and Android and the SD card will support it?

The Android kernel by default is compatible with GPT which can have up to 128 partitions. MBR also supports 4 primary (or more logical) partitions (within an extended partition). In general, there is no technical limit, but the Android user space can mount only the first partition, or it may not recognize the SD card with multiple partitions, e.g. due to an unknown partition type that includes Linux (0x83) Although vold It is also compatible with multiple partitions before Android 6, you must define FUSE (sdcard) init services, add tickets to fstab, configure storage on framework-res.apk etc. If mounting multiple partitions does not work without these changes, you must mount the partitions (additional or all) manually (or rebuild your ROM with modified code).

Will this mount show the partitions in Settings and file manager of the device?

No. See explanation above. I am not sure what you mean by "device file manager".

Or can we see these partitions through ES File Manager or Solid Explorer or Root Manager and take their backups too?

Yes and no; It depends on how, where and with what permissions the file system mounted the file system. See explanation above. I'm not sure what you mean by "take your backups too".

Examples of commands to partition on Android; fdisk or parted or the best

The partition works the same on all operating systems. There is a long list of CLI and GUI tools and you will find hundreds of online tutorials. Assuming your SD card is listed as mmcblk1 and you want to create the first 32 GB partition while leaving the rest for the second one, a line on Android can be:

~# sgdisk -Z -n 0:0:+32G -n 0:0:0 -p /dev/block/mmcblk1

See sgdisk manual page for explanation and more options. If necessary, use partx -uv /dev/block/mmcblk1 to update the core of the changes in the partition table, or simply reinsert the SD card.

After partitioning use mkfs.fat/ /mkfs.exfat/ /mkfs.ntfs/ /mkfs.ext4 to create a file system. All tools are available for Linux and also work on Android.

Can we force the mount command on some startup boot init file to mount the four partitions?

Yes. Create a init service or init.d script. See details on How to run an executable at startup?