In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to transfer disk space in linux system? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Actual combat under fedora24
Use the following command to view disk usage
Df-lh file system capacity used used mount point devtmpfs 3.9G 0 3.9G 0 0 / devtmpfs 3.9G 0 3.9G 0 0 / dev/shmtmpfs 3.9G 2.9m 3.9G 1% / runtmpfs 3.9G 03.9G 0 0% / sys/fs/cgroup/dev/mapper/fedora-root 60G 46G 12G 81% 3.9G 400K 3.9G 1% / tmp/dev/sda1 477M 141M 307M 32% / boottmpfs 787M 0787M 0% / run/user/0/dev/mapper/fedora-home 141G 60M 134G 1% / home
The mount directory corresponding to / dev/mapper/fedora-home is / home
The mount directory corresponding to / dev/mapper/fedora-root is /
From the above list, we can see that the fedora-home is very large, but the fedora-root is very small, so we practice moving 1G.
Unmount the / home directory
Umount-v / home
Check the disk to be transferred
E2fsck-ff / dev/mapper/fedora-home# all five steps of the operation result of this command must be passed.
The display results are as follows
E2fsck 1.42.13 (17-May-2015) step 1: check inode, block, and size step 2: check directory structure step 3: check directory connectivity Pass 4: Checking reference counts step 5: check cluster summary information / dev/mapper/fedora-home: 130190max 10838016 files (0.1% non-contiguous), 8077341 blocks 43338752
Change the disk size of / dev/mapper/fedora-home
Calculation method: 141g-transfer 1g = 140g
Resize2fs / dev/mapper/fedora-home 140G
Cut disk space
Lvreduce-L-1G / dev/mapper/fedora-home
Remount / home
Mount-v / home
Transfer to / root
Lvextend-Little 1G / dev/mapper/fedora-root
Make the / root space effective
Resize2fs / dev/mapper/fedora-root
This is it, then execute the df-lh command
File system capacity used available mount point devtmpfs 3.9G 0 3.9G 0 / devtmpfs 3.9G 0 3.9G 0 0 / dev/shmtmpfs 3.9G 2.9M 3.9G 1% / runtmpfs 3.9G 03.9G 0% / sys/fs/cgroup/dev/mapper/fedora-root 60G 46G 13G 82% / tmpfs 3.9G 400K 3.9G 1% / tmp/dev/sda1 477M 141M 307m 32% / boottmpfs 787M 0787M 0% / run/user/0/dev/mapper/fedora-home 141G 60M 133G 1% / home read the above content Do you know how to transfer disk space in the linux system? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.