Difference between revisions of "Linux: Partition and format new hard drive"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) (Created page with " fdisk /dev/xvdN m show help add new partition (if you want filesystem different from ext4 change with t) p (print partition table) w (write partition table) q (quit) m...") |
Rafahsolis (talk | contribs) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| + | = File System = | ||
| + | == check hard disk partitions and disk space == | ||
| + | sudo fdisk -l | ||
| + | sudo sfdisk -l -uM | ||
| + | sudo cfdisk /dev/sdb | ||
| + | sudo parted -l | ||
| + | df -h | grep ^/dev | ||
| + | df -h --output=source,fstype,size,used,avail,pcent,target -x tmpfs -x devtmpfs | ||
| + | lsblk | ||
| + | blkid | ||
| + | hwinfo --block --short | ||
| + | |||
| + | = ext4 = | ||
fdisk /dev/xvdN | fdisk /dev/xvdN | ||
m show help | m show help | ||
| Line 7: | Line 20: | ||
mkfs.ext4 /dev/xvdN# | mkfs.ext4 /dev/xvdN# | ||
| + | |||
| + | == Check ext4 file system == | ||
| + | e2fsck -vf /dev/sda2 | ||
Latest revision as of 12:13, 24 March 2018
File System[edit]
check hard disk partitions and disk space[edit]
sudo fdisk -l sudo sfdisk -l -uM sudo cfdisk /dev/sdb sudo parted -l df -h | grep ^/dev df -h --output=source,fstype,size,used,avail,pcent,target -x tmpfs -x devtmpfs lsblk blkid hwinfo --block --short
ext4[edit]
fdisk /dev/xvdN m show help add new partition (if you want filesystem different from ext4 change with t) p (print partition table) w (write partition table) q (quit)
mkfs.ext4 /dev/xvdN#
Check ext4 file system[edit]
e2fsck -vf /dev/sda2