Linux Block Device Notes

This is an old revision of the document!


Prev  
 Next

Linux Block Device Notes

Linux Disk Partition and Format Notes

Some basic tools

lsblk to list partitions (or list block devices) lsblk -f or blkid to list the UUIDs


parted

There would seem to be a number of partition tools for Linux CLI.
  • sudo parted -l - to see all available partition information
  • sudo parted /dev/sda - to partition the specific drive

When in parted:

  • print to see current partition information
  • mkpart help to list option
  • mklabel gpt to give drive label gpt
  • mkpart help mkpart to list specific help items on mkpart
  • mkpart primary ext4 0% 100% to make a partition that take the full optimised drive area
  • rm 1 to remove partition 1

Format

sudo mkfs.ext4 /dev/sda1 - to format the drive


Fstab

sudo vim /etc/fstab -to edit the boot disk mount table, remember to make matching mount point directories


Block Device Monitoring and Control

smartmon


hdparm


/app/www/public/data/attic/home_server/home_server_setup/other_services/disk.1593835774.txt.gz · Last modified: 2023-04-30 Sun wk17 17:44
CC Attribution-Share Alike 4.0 International Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International