I have 3 partitions on my operating system installed on the computer. 629MB /boot/efi FAT32 partition, 1.1GB Ext4 /boot partition and the rest is btrfs / (root) partition. swap partition is not allocated but it has technology to create temporary swap by itself. On this computer I want to separate /home, /var, /var/log, /tmp from the / (root) partition. I want to create new partitions and clone these directories to those partitions. Then I will mount the directories on the new partitions to the system. Then I will delete the old partitions. I also want to create a swap partition. I don’t know how to do this? I don’t know if this is possible?
I wouldn’t recommend it, but there is nothing stopping you from doing that. You can just use commands like cp -a /home/* /mnt/new-home-partition
to transfer files to new partitions. The only “trick” is that you need to make sure none of the files you are trying to copy are being accessed by any running programs. If files such as log files are being actively written to while you try to copy them, the copy will be corrupt. One way to ensure no files are being accessed is to perform the copy from the initramfs boot stage before the root partition (or any others) are mounted. I demonstrated something like this once as a method of converting a single-drive installation to one that is “mirrored” with MD: https://youtu.be/62RViGv4Nfg
I tried that, but the command to mount the new partition didn’t work and unmounting the old partition failed. I even consulted my AI assistant installed on the AI server. I have installed in my home AI server to make sure there is no problem in the system, but even he couldn’t help me. He has 4 nvidia H100 brains. As far as I understand, in order to do this, I need to prepare a live usb, start the system with live usb, connect the partitions to my live usb system. Then I don’t know how to do mount and unmount on the system on the pc? yAI is also very inadequate, it seems like it needs a lot of meat to develop more, sorry, it needs data.
The man (manual) page might be more useful than anything you would get from AI. Try running man mount
to find out how to manage your mountpoints.
Is this the link:
https://www.man7.org/linux/man-pages/man1/man.1.htm
Is it correct?
I prefer to use the man pages that are installed on my PC to be sure that they are the right documentation for the software version that I have installed on my system. However, it looks like that website does have a copy of the man page for some version of the mount command: https://man7.org/linux/man-pages/man8/mount.8.htm