Disk Management
Installation
-
sudo apt install partedin debian
Useful parted cli commands:
-
print- print the full configuration. -
select DEVICE- to change to a different device and edit it. -
mklabel gpt- to create a gpt label for the partition -
mkpart primary btrfs 1MiB 100%- to create a partition of type primary with format btrfs starting at 1MiB and ending at 100% or end of the disk. -
`` Useful other disk management commands:
-
lsblkandfdisk -lshows disk configuration for all the disks. -
sudo mkfs.btrfs -f /dev/sda1to create the final btrfs partition for sda1 partition. This is not always needed if parted does it by default.
Validate settings:
-
df -hto show all the mount location.
User management:
-
sudo useradd -m -d /home/subho -s /bin/bash -G standard,admin subhoto add user subho with home location /home/subho, default shell as bash and add to group standard,admin. -
sudo passwd subhoto change or create password for user subho.
Permanent Mount
- To mount a drive during restart one need to make the mount entry to /etc/fstab
- Obtain the UUID from
lsblk -forsudo blkid -
UUID=0f2b8e50-94c0-4385-abed-ce020da2555b /fast btrfs defaults 0 0something of this format -
systemctl daemon-reloadin debian to reload the fstab settings - To temporary mount use
sudo mount /dev/sdb1and to unmountsudo umount /mnt/loc
Conclusion
parted cli is the most powerful partition tool available for terminal user. Meticious use could help save lot of time.
References
- https://www.redhat.com/sysadmin/resize-lvm-simple
- https://kb.vander.host/disk-management/how-to-resize-expand-an-ubuntu-lvm-disk/
- https://fedoramagazine.org/choose-between-btrfs-and-lvm-ext4/
Enjoy Reading This Article?
Here are some more articles you might like to read next: