In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "how to increase the hard disk of virtual machine ubuntu". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Foreword: when we first install ubuntu on virtual machines, we are always reluctant to allocate too much hard disk space. But if it takes a long time, the hard drive won't be enough. One of the stupidest ways is to reinstall the system, but it takes time and effort. It would be nice if you could add a hard drive without reinstalling the system. Let's make it happen.
two。
1. Firstly, ubuntu shutdown.
two。 Click the menu VM-- > Settings in VMware
3. Click the Add button at the bottom of Hardware, and then select Hard Disk-- > Next-- > Next-- > Disk size (GB) is the new hard disk size-> Next-- > Finish-- > Ok. This adds a Hard Disk 2 to VMware's Devices.
Third, the next step is to enter ubuntu and put the new hard drive mount in.
1.
Root@sparkle-desktop:~# fdisk-l
Disk / dev/sda: 17.1 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000af2a2
Device Boot Start End Blocks Id System
/ dev/sda1 * 1,993 7976241 83 Linux
/ dev/sda2 994 1044 409657 + 5 Extended
/ dev/sda5 994 1044 409626 82 Linux swap / Solaris
Disk / dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk / dev/sdb doesn't contain a valid partition table
You can see that there is one more / dev/sdb
two。
The following is formatted into the ext3 file system
Root@sparkle-desktop:~# mkfs-t ext3 / dev/sdb
Mke2fs 1.40.8 (13-Mar-2008)
/ dev/sdb is entire device, not just one partition!
Proceed anyway? Y / / format the whole new hardware without partitioning.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
524288 inodes, 2097152 blocks
104857 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2147483648
64 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first. Use tune2fs-c or-i to override.
Root@sparkle-desktop:~#
3.
Root@sparkle-desktop:~# cd / home
Root@sparkle-desktop:/home# mkdir work
Root@sparkle-desktop:/home# mount / dev/sdb work / / mount the hard drive to the work directory.
Root@sparkle-desktop:/home# cd work
Root@sparkle-desktop:/home/work# ls
Lost+found
4.
Use the df command to check the mount
Root@sparkle-desktop:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/ dev/sda1 7913216 7803524 / 100%
Varrun 257788 240 257548 / var/run
Varlock 257788 0 257788 / var/lock
Udev 257788 48 257740 / dev
Devshm 257788 44 257744 1 per dev/shm
Lrm 257788 39760 218028 16% / lib/modules/2.6.24-19-generic/volatile
/ dev/sdb 8322488 149632 7753428 2% / home/work
Gvfs-fuse-daemon 7913216 7803524 0 / root/.gvfs
See / dev/sdb 8322488 149632 7753428 2% / home/work
One, it can be seen that it has been a success.
5. To start automatic mount.
Root@sparkle-desktop:~# gedit / etc/fstab
According to the following format
#
We add our own:
/ dev/sdb / home/work ext3 defaults 0 0
Restart, which completes all the steps to add the hard drive.
This is the end of "how to add the hard disk of virtual machine ubuntu". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.