How the Ubuntu system changes the size of the filesystem

Source: Internet
Author: User
Keywords Ubuntu
Tags clear disk etc file files hard hard drive how should

My 80G hard drive, a total of 3 areas, of which/10g,swap divided the 1G, the remaining 60 more g is just clear out.
My filesystem not separate out, now only 1G of space, the next film is not allowed. I want to use the remaining 60 more g space, it is best to separate the filesystem, the more than 60 g to it, how should I operate? Is it okay to hang up such a large space in the filesystem? What to do?

(Suppose your Ubuntu system username is Wzhy, and if not, replace the corresponding part.) )

According to the gparted screen you give, you can see that you are going to put 60G/dev/sda3 hard drive under filesystem. (now/dev/sda3 is hanging under/media/disk).

sudo chown-r wzhy/media/disk First of all the/media/disk and the owner of all the files under the change to you, so as to avoid future permissions problems.

Open the File Manager (Nautilus, and so on), the/home/wzhy of the files are all selected, (note that you must not forget to show hidden files.) Nautilus Ctrl can display hidden files. And then copy all to/media/disk.

Tar cvzf/media/disk/backupwzhy.tar.gz/home/wzhy give your file a compressed package, also put in 60G (this one can be skipped, but anyway your disk has 60G space, why not do a double insurance? )

Then

sudo umount/media/disk first uninstall your 60g disk
sudo mount/dev/sda3/home/wzhy

All right, it's done.

But this is only temporary, after you restart, everything changed back again. (your file is still on the 60G plate, but/home/wzhy still hangs in your first plate.) )

You used for a while, no problem, you can modify the Fstab, permanent effect.

sudo cp/etc/fstab/etc/fstab.backup first make a backup of fstab, just in case.
sudo gedit/etc/fstab

Join this line at the bottom.

/dev/sda3/home/wzhy ReiserFS Defaults 0 0

If you find a line with/media/disk in it, you can add the # number to the beginning of the line. (Note is the English half-width symbol, not add also can, the best Add.) )

Save Exit Gedit.

Reboot and see if anything is abnormal.

If everything goes well, you can delete backupwzhy.tar.gz if you need to save hard disk space.

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.