In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "the detailed process of adding a new hard disk to linux". In daily operation, I believe many people have doubts about the detailed process of adding a new hard disk to linux. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubts of "the detailed process of adding a new hard disk by linux". Next, please follow the editor to study!
After getting the new disk, turn it off, plug it in, and restart it. Everything's fine.
After entering the system, check for an extra hdb under / dev, and then start partitioning
Execute fdisk / dev/hdb
Enter the fdisk interface and issue the command n to create a new partition.
Then you are prompted to select e (extended partition) or p (primary partition), and you enter e to create the extended partition.
Then you are prompted to enter the partition number (1-4), and enter 1
Next, follow the prompts to enter the start sector number and the end sector number, and since you are only going to divide it into one zone, the default value is selected.
Finally, enter the command w to save the exit.
The following prompt appears in the program
The partition table has been altered!
Calling ioctl () to re-read partition table.
Syncing disks.
So the partition is complete.
Next, format the partition:
Execute mkfs.ext3 / dev/hdb1
It is expected that the formatting process will occur, and the result is indeed a prompt / dev/hdb1: Invalid argument passed to ext2 library while setting up superblock
Thought that the partition has not been loaded, restart the machine and then re-execute the formatting command, the problem remains.
Fdisk-l / dev/hdb view, partition hdb1 already exists normally.
Baidu searched for this hint and found that many people encountered the same problem and did not give a solution.
In desperation, I went to google to search the English website and found several of the same problems. After half-reading and half-guessing, I saw a solution.
Delete the partition that has just been divided, then re-partition, and choose to create the primary partition when choosing e (extended partition) or p (primary partition), and then execute it in turn, successfully dividing the area.
Next, execute the format command mkfs.ext3 / dev/hdb1 again.
At this point, the program smoothly enters the formatting interface and starts formatting.
After a long wait for more than 20 minutes, the formatting is finally completed. Problem solved!
Next, mount the newly added hard disk partition:
The original directory structure of the server to store games is: there is a game directory under update, which contains any online games. Update does samba sharing, and administrator users can read, write and delete game directories. At the same time, the game directory can be shared by samba. It can be accessed anonymously and only has read and execute permissions.
At this point, create a new game2 directory under the update directory: mkdir / update/game2
Then mount the newly added hard disk partition to this directory mount / dev/hdb1 / update/game2
Then modify the samba configuration document to share the game2 directory with the same permissions as game, which can be accessed anonymously, readable and executed.
Service smb restart restarts samba sharing service
So far, the server has been expanded successfully.
In order not to mount the new partition manually after restarting the server, we have to modify the / etc/fstab document so that the system can be mounted automatically when the system starts.
Vi / etc/fstab
Add a line / dev/hdb1 / update/game2 ext3 default 1 2 at the end of the document
Save exit.
So far, all the work has been done.
At this point, the study on "the detailed process of adding a new hard disk to linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.