In Oracle VM, we accidentally found that the space was small and we didn't want to reinstall it, so we had to resize it. Fortunately, Oracle VM is relatively easy to use. Just scale up. Steps: 1. Find the uuid C: \ Users \ XCL> cd C: \ Program Files \ Oracle \ VirtualBox
C: \ Program Files \ Oracle \ VirtualBox> vboxmanage list hdds UUID: dc54c773-8c62-43fe-92e2-e3e0d7ee8d5e Parent UUID: base Format: VDI Location: D: \ OracleVM \ 11RAC1 \ 11RAC1. vdi State: created Type: normal Usage: 11RAC1 (UUID: 2499fdd3-5595-4260-b1c0-12472a44b53f)
2. resize the UUID. Expansion: 5242880 = 5 TB 30720 = 30 GB
VBoxManage modifyhd dc54c773-8c62-43fe-92e2-e3e0d7ee8d5e -- resize 5242880 can also be: VBoxManage modifyhd D: \ OracleVM \ 11RAC1 \ 11RAC1. vdi -- resize 5242880
3. in linux, df cannot find the expanded space. You can use fdisk to see it. Then fdisk the/dev/sda file. A. view the existing [root @ rac1 ~] # Df-h Filesystem Size Used Avail Use % Mounted on/dev/mapper/vg_xclrac1-lv_root 16G 12G 3.4G 77%/tmpfs 1004 M 260 K 1004 M 1%/dev/shm/dev /sda1 485 M 56 M 404 M 13%/boot
B. Print the current partition [root @ rac1 ~] # Fdisk-l Disk/dev/sda: 5497.6 GB, 5497558138880 bytes 255 heads, 63 sectors/track, 668373 cylinders Units = cylinders of 16065*512 = 8225280 bytes Sector size (logical/physical): 512 bytes/512 bytes I/O size (minimum/optimal ): 512 bytes/512 bytes Disk identifier: 0x000eb935
C. create a primary partition and save [root @ rac1 dev] # fdisk/dev/sda WARNING: The size of this disk is 5.5 TB (5497558138880 bytes ). DOS partition table format can not be used on drives for volumes larger than (2199023255040 bytes) for 512-byte sectors. use parted (1) and GUID partition table format (GPT ). WARNING: DOS-compatible mode is deprecated. it's stronugly recommended to switch off the mode (command 'C') and change di Splay units to sectors (command 'U '). command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 3 First cylinder (2611-668373, default 2611): Using default value 2611 Last cylinder, + cylinders or + size {K, M, G} (2611-267349, default 267349): Using default value 267349 Command (m for help ): w The partition table has been altered! Calling ioctl () to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. the kernel still uses the old table. the new table will be used at the next reboot or after you run partprobe (8) or kpartx (8) Syncing disks. c. restart. Shutdown-ry 0
4. Under/dev, you can see the new n/dev/sda3 [root @ rac1 ~] # Ls/dev/sd */dev/sda/dev/sda2/dev/sdb/dev/sdc/dev/sdd/dev/sde/dev/sdf/dev/sda1/ dev/sda3/dev/sdb1/dev/sdc1/dev/sdd1/dev/sde1/dev/sdf1
5. now you can format it. First, you need to find the current system file format and prepare for partitioning. here. df-Th B. change the partition type to Linux fdisk/dev/sda-> T-> select 3-> L-> Select 83 (Linux)-> w to save c. check again
[Root @ rac1 dev] # fdisk-l Disk/dev/sda: 5497.6 GB, 5497558138880 bytes 255 heads, 63 sectors/track, 668373 cylinders Units = cylinders of 16065*512 = 8225280 bytes Sector size (logical/physical): 512 bytes/512 bytes I/O size (minimum/optimal ): 512 bytes/512 bytes Disk identifier: 0x000eb935 Device Boot Start End Blocks Id System/dev/sda1 * 1 64 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 64 2611 20458496 8e Linux LVM/dev/sda3 2611 267349 2126509322 + 83 Linux
D. format it to ext4 mkfs-t ext4-c/dev/sda3
6. mount/dev/sda3/u01 df-Th 7. it will be automatically mounted after the system is restarted. vi/etc/fstab # xcl/dev/sda3/u01 ext4 defaults 0 0