In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "linux system disk partition and how to mount the disk to the system", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's take you to learn "linux system disk partition and mount the disk to the system method"!
fdisk partition
fdisk /dev/sdb
-p View current partition
-t Change partition number
-w Write partition table to disk
-n Create partition
-p Primary partition
-e Extension zone
partprobe lets kernel update partition information
cat /proc/partitions View disk partitions
Create File System (Format File System)
mke2fs -t ext4 /dev/sda3
-b blocksize Specifies the file system size
-c Check for bad blocks when creating a file system
-L label Specify label
-j Create file system log ext3 ext4 Default is with log
mkfs.ext3 /dev/sdb1
mkfs.evfat /dev/sda3
View partition information
dumpe2fs /dev/sda2
journal
ext3 ext4 has strong stability, errors can be recovered
Disk mounting and unmounting
mount shows the mounted partition
Mount a new disk partition
eg:
mount /dev/sda3 /mnt/
Additional parameters: -t File system type
-o [Options] Specifies options when loading the file system. Some options are also available in/etc/fstab. These options include:
ro mounted read-only
rw mounted read-write
async mount using cache method
sync does not use cache mount
noatime does not update file access times
atime update file access time
mount mount
eg:
mount -o remount,rw /dev/mnt/
umount uninstall partition, equivalent to pop-up in windows system
eg:
umount /dev/sda3
Or write mount points
umount /mnt/
See which processes are using the file system
fuser -m /mnt
View specific process information
ps -ef |egrep '(process id| Process id)'| grep -v grep
See which files are open for use
lsof /mnt/
Automount settings (automount by modifying configuration items)
/etc/fstab defines which disks are automatically mounted
eg:
/dev/sda3 /mnt ext4 defaults 0 0
Description: Set path to label name equivalent to label name
eg:
/dev/sda3 《=》label=soft_config
At this point, I believe that everyone has a deeper understanding of "linux system disk partition and the method of mounting the disk into the system," so it is advisable to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.