![]() I was asked to grow a disk mounted as /scratch on a Dell server running CentOS 7 without interrupting current users. I have never lost files or corrupted the drive using this method. df -m (I check /home to verify it resized) ![]() Enter last sector of resize = "-1" (minus 1 means 1 sector from end of disk)ģ resize2fs /dev/sda"x" (x = partition to be resized. resize x (x = partition you want to resize, use "p" to get a list of partitions)ī. umount /home (I retry this command if it fails for up to 30 seconds, then go look at other sessions to see if I am "cd /home/xxx" somewhere.)Ī. If you just logged out of a user log in, it can take Linux 20-30 seconds to finish closing any files, so you might get errors trying to umount /home.ġ. I logout of a GUI (KDE / Gnome / etc) session and use + + to bring up a shell session. Since "root" user's home directory is directly under the system root / as in /root, if you can log into root, then you can unmount /home But to unmount /home, you need to make sure you are not logged into any user account whose home directory is within it. In this case, you just need to unmount /home while you extend it. This is the situation I have when I take a image from a smaller drive or SSD and move it to a larger SSD. This is especially true if is the last partition. If you want to change a mounted partition that is not the "root" partition (/), like /home which is a different partition, then there is no need to use a rescue image. Sda2 = / (partition to be expanded is not last)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |