## Does increase in partition for a Kafka topic gets logged in some log file

I am using Kafka’s `0.8.2` version. I have a topic say `test`. The initial partition count for this topic is 10. Recently the partition count for this topic got increased to 20. There are multiple ways by which this can be achieved. Either from Command-line Kafka tools or Kafka manager or any other possible way. I want to determine how this was done?

I can see multiple types of log files in the `logs` directory on the Kafka Broker. Some of them, for example, are `controller.log`, `server.log`, `state-change.log`. But I could not find any appropriate log in these files that explains the increase in the partition for a topic.

So does Kafka logs/write this change in metadata for a Kafka topic in some log file? And if yes, then where does this get logged?

## linux – How to calculate exact size of partition and number of inodes to write a directory

I need to write a directory with files (specifically – a Linux chroot) to a file with LVM image on it. The background of task is stupid, but I want to understand what is going on for now.
I calculate the size of directory with `du`:

``````# du -s --block-size=1 chroot
3762733056  chroot
``````

I round it up and create a file large enough to encompass it:

``````# fallocate -l 4294967296 image.lvm
# ls -lah
drwxr-xr-x 23 root    root    4.0K мая 27 20:59 chroot
-rw-r--r--  1 root    root    4.0G мая 28 09:59 image.lvm
``````

I mount (sorry, not sure for the right term) the file as loop device and create an LVM partition on it. I will use ext4 fs for it, I know that ext4 reserves 5% of space for root (I can tune it) and some space for inodes table, so I create a partition bigger than my actual directory by about 10% (4139006362 bytes) and round it up so it is multiple of 512 (4139006464 bytes) for LVM needs:

``````# losetup -f --show image.lvm
/dev/loop0
# pvcreate /dev/loop0
Physical volume "/dev/loop0" successfully created.
# vgcreate IMAGE /dev/loop0
Volume group "IMAGE" successfully created
# lvcreate --size 4139006464B -n CHROOT IMAGE
Rounding up size to full physical extent <3.86 GiB
Logical volume "CHROOT" created.
``````

I then create an ext4 filesystem on this LV:

``````# mkfs.ext4 /dev/IMAGE/CHROOT
mke2fs 1.45.6 (20-Mar-2020)
Creating filesystem with 1010688 4k blocks and 252960 inodes
Filesystem UUID: fb3775ff-8380-4f97-920d-6092ae0cd454
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

# mount /dev/IMAGE/CHROOT mnt
# df --block-size=1 mnt
Filesystem                   1B-blocks         Used    Available Use% Mounted on
/dev/mapper/IMAGE-CHROOT    4007591936     16179200   3767648256   1% /mnt
``````

While 3767648256 is greater than 3762733056 that I got from `du`, I still tune it up a notch:

``````# tune2fs -m 0 /dev/IMAGE/CHROOT
tune2fs 1.45.6 (20-Mar-2020)
Setting reserved blocks percentage to 0% (0 blocks)
# df --block-size=1 mnt
Filesystem                1B-blocks     Used  Available Use% Mounted on
/dev/mapper/IMAGE-CHROOT 4007591936 16179200 3974635520   1% /mnt
``````

So far so good, let’s write some data to it:

``````# cp -a chroot/. mnt/
...
cp: cannot create regular file 'mnt/./usr/portage/profiles/hardened/linux/powerpc/ppc64/32bit-userland/use.mask': No space left on device
``````

Bang. Let’s see what `df` shows:

``````# df --block-size=1 mnt
Filesystem                1B-blocks       Used Available Use% Mounted on
/dev/mapper/IMAGE-CHROOT 4007591936 3587997696 402817024  90% /mnt
``````

So there is actually space available. After googling it up a bit, I found out that you can run out of inodes on your partition, which seems exactly like my case:

``````# df -i mnt
Filesystem               Inodes IUsed IFree IUse% Mounted on
/dev/mapper/IMAGE-CHROOT   248K  248K     0  100% /mnt
``````

And now, the question! I can easily use bigger file size, create 1.5x larger partition, write my files there, and it will work. But being the pedantic developer who wants to preserve the space: how do I calculate precisely how much bytes and inodes I will need for my directory to be written? I am also fairly certain I screw up with `--block-size=1` somewhere along the way too.

## windows 10 – How to move users’ data from a separate partition on one drive to another drive and remove the original users’ data partition?

Simplifying, my old drive has four NTFS partitions; we are going to speak about first two (the remaining two belong to Linux). Let’s call the first two partitions C: and D:; they are NTFS. Partition C: contains the Windows 10 system and programs, and D: contains users’ data in users’ folders: we have directories D:Jack, D:Jane, D:Sally, and subdirectories D:JackDownloads, D:JackDocuments, D:JackFavorites, … that I could move easily to D: by changing the location of the corresponding subdirs of C:Users in file properties. Hidden, system, and admin subdirectories and files in C:Users stay where they originally were (namely, in C:Users).

The goal of moving was (and is) to store users’ data separately from the system, programs, and auxiliary admin data. Such a scheme eases backups, reinstallation, recovery from crashes, etc.

Two years after moving, I ran out of space on both partitions. The current partition C: is 80% full, and the current partition D: won’t hold a large chunk of external users’ data that logically belongs there. Now I bought a new large drive that I’d like to use for the the users’ data only (with hidden/system/admin files from old C:Users or without — I don’t care). The old D: partition should be gone, the old C: partition should be extended to the space freed by deleting old D:, and the new D: partition should be on the new secondary drive and contain the data from the old D: partition (either exhibiting the same structure as now, i.e., with hidden/system/admin files still in C:users, or containing all of %Users%; I don’t care about the difference).

How do I accomplish this such that Windows 10 is still usable after the change and the users won’t feel too much difference except more space?

As available tools, I have Debian live with gnome (so, I believe, linux tools could work) and a Windows 10 installation image.

## windows 10 – bootable usb not found after change linux type partition

My notebook is ASUS TUF, I have dual boot windows 10 home 64 bit and linux mint. I want to delete linux but I can’t delete partition on windows 10 disk management. then, I sign to linux and change type partition from linux type to generic and windows type (I change 2 partition type). then, I restart my notebook. after that, I can’t sign to windows just windows boot manager and linux boot. I delete boot option for linux. then, I think a solution is create bootable usb for reinstall windows, but on bios cant detect bios option for reinstall. any solution?

## sierra – After removing bootcamp partition, booting the mac it says insert bootable media and press any key?

so I had to remove my bootcamp partition because I was running low on osx Sierra space and I didn’t need the Windows partition. But when I boot the mac I get an error

No bootable device — insert boot disk and press any key

My guess is that there is still some sort of a Windows boot manager on a partition, but I can’t see it in Diskutil GUI or when pressing Alt on startup, or in the startup disk. Currently, the only wat to boot to macOS is to hold down Alt then -> Macintosh HD,

## Swap's partition size in CloudLinux

Hi,

I have dedicated server where i will install: CloudLinux + WHM/cPanel + LiteSpeed; i will host 250 cPanel accounts aprox.

## hard drive – Should I create APFS volumes or a partition on an external disk?

I have just newly bought an external drive (not SSD), and was planning to create several partitions on it, for example to keep my files separate from Time Machine backups.

However, when browsing through the Disk Utility help guides, I found the following paragraph:

However, with APFS, you shouldn’t partition your disk in most cases. Instead, create multiple APFS volumes within a single partition.

I don’t need the files or the disk to be compatible with any other operating system – in that case, would it be the recommended option to set the disk format to `APFS` and then create “multiple APFS volumes” instead of a partition?

Or does the recommendation in the help guide not apply to regular external drives?

I hope this type of question is on-topic here, as it’s my first time asking (I’m more used to stackoverflow), and I’d like to thank you in advance for your help!

## hard drive – external HD: partition map check failed because no cuts found. (-69770)

I cannot access my external HD.

This is the error I get when I try to run first aid in disk utility:

``````Running First Aid on “WD My Passport 25E2 Media” (disk2)
Checking prerequisites
Checking the partition list
Problems were found with the partition map, which might prevent booting
Partition map check failed because no slices were found. : (-69770)
Operation failed…
``````

What I can do?

I have a MacBook Pro in mid 2014 with Catalina 10.15.14

## reference request – partition tuples

Given are the tuples $$(a_ {11}, dots, a_ {1k}), (a_ {21}, dots, a_ {2k}), dots, (a_ {n1}, dots, a_ {nk})$$. We want to know if there is a partition of the tuples into two parts, so that for each coordinate $$i = 1, points, k$$, the sum of each part is equal to the sum of the other part.

Has this problem been studied before? Yes $$k = 1$$Of course, it's the famous Partition problem. But I can't find this generalization in the "Variants and generalizations" section on the Wikipedia page.

## hard drive: where did the free space go for my deleted ExFAT partition?

I had these partitions on an external hard drive:

``````/dev/disk2 (external, physical):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *2.0 TB     disk2
1:                        EFI EFI                     209.7 MB   disk2s1
2:                  Apple_HFS Android                 63.9 GB    disk2s2
3:                  Apple_HFS RiptideHUP              968.0 GB   disk2s3
4:       Microsoft Basic Data RiptideF                967.8 GB   disk2s4
``````

My goal was to remove disk2s2 and then resize disk2s3 to take up the extra space by removing disk2s2.
I removed disk2s2 using this command:

``````diskutil  erasevolume  "Free Space"  ""  /dev/disk2s2
``````

Now to resize the volume I used:

``````diskutil  resizevolume  /dev/disk2s3  R
``````

``````Started partitioning on disk2s3 RiptideHUP Error: -69743: The new size
must be different than the existing size
``````

Can someone help me and tell me where I was wrong?

NOTE: Using `diskutil list` now shows:

``````/dev/disk2 (external, physical):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *2.0 TB     disk2
1:                        EFI EFI                     209.7 MB   disk2s1
2:                  Apple_HFS RiptideHUP              968.0 GB   disk2s3
3:       Microsoft Basic Data RiptideF                967.8 GB   disk2s4
``````