How to add new partitions to a Linux server remotely

Source: Internet
Author: User
How to remotely Add a new partition for a Linux Server-Linux Enterprise Application-Linux server application information is as follows. Installing a new partition on a Linux server is actually very simple, and all operations can be done through remote logon. Of course, before adding the partition, make sure that the hard disk has been physically added to the server.

This operation is performed remotely, which is easier for Linux than Windows, because partitions on windows seem a bit unimaginable, while linux can perform remote operations on everything. After adding a new hard disk, We can log on to the system via ssh to start adding new partitions remotely. The main purpose of adding a new hard disk this time is to move the previous/home partition to the new hard disk. In sdc, we checked out many bad channels through the badblocks command, and declared failure after several repair attempts, so we decided to use the new hard disk for the problematic hard disk. The new hard disk is sdb, first partitioning first;

Fdisk/dev/sdb

If a partition exists before, use the d command to delete it first and then use the n command to add a new partition. If you want to add a swap partition, remember that the partition code is 82, rather than the default linux Code 83. Remember to use the w command to save and exit. After partitioning, It is formatted as follows:

Mkfs. ext3-c/dev/sdb1

Note that I use the-c option to check the hard disk in the read-only mode. This command will check the hard disk when formatting the hard disk and mark the wrong hard disk "block ".

By the way, every time you restart the machine, the system fails to start after you modify the fstab. It takes a lot of patience to format the hard disk using this method, because after the command is run, the hard disk will be checked one by one in Read mode. After formatting is complete, I think it is necessary to check whether your new hard disk has a bad track or not.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.