Linux disk operations (resizing)

Source: Internet
Author: User
Linux disk operations (resizing)-General Linux technology-Linux technology and application information, the following is a detailed description. For example, if you want to extend the f disk in windows to/home in linux, you can use the following method:
First, format the f disk to the ext3 format. Command:
Code:
Sudo mke2fs-j/dev/sda8

Then mount the partition to a directory, such as/medis/F (if the directory F is not available, create it yourself ). For the sake of security, it is best not to mount it directly to/home first. Command:
Code:
Sudo mkdir/media/F
Sudo mount-t ext3/dev/sda8/media/F

Move/home to/media/F. Of course, you can use the copy method for the sake of insurance. Command:
Code:
Sudo cp/home/media/F

Note that the root permission is used throughout the process, and the/home/username directory of the user is accessed when the system enters, the permission of the moved directory is root, so you need to change the permission. Of course, if you didn't extend this partition to the/home directory, you don't need. However, pay attention to permission issues. Command: (username corresponds to your user name)
Code:
Sudo chown-R username: username/media/F/username

Unmount the partition and delete the/media/F directory. Command:
Code:
Sudo umount/media/F
Sudo rmdir F

Finally, modify the/etc/fstab file. You can set the option of this partition against the mount of the root system (uuid may be used, you can use the command code:
Sudo vol_id -- uuid/dev/sda8
To view its uuid.
Linux disk resizing is probably done by many senior players. It seems a little late to share it with me!

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.