Extend the size of ext3 partition online in VM
2013-09-12 15:41
911 查看
1. Increase disk space in vCenter
2. scan disk on the Linux VM
3. umount the partition
4. Extend disk size by fdisk, and command "d" will not format the data in the disk by test
5. Verify the new partition
6. Resize new partition in system
7. Mount new size partition back to system
2. scan disk on the Linux VM
# fdisk -lu > /tmp/fdisk.1 # echo 1 > /sys/block/sdb/device/rescan # echo 1 > /sys/block/sdd/device/rescan # fdisk -lu > /tmp/fdisk.2
3. umount the partition
# umount /Backup # umount /Data/
4. Extend disk size by fdisk, and command "d" will not format the data in the disk by test
# fdisk -u /dev/sdb The number of cylinders for this disk is set to 23497. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): d Selected partition 1 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First sector (63-377487359, default 63): Using default value 63 Last sector or +size or +sizeM or +sizeK (63-377487359, default 377487359): Using default value 377487359 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
5. Verify the new partition
# e2fsck -f /dev/sdb1 e2fsck 1.39 (29-May-2006) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/sdb1: 171/13107200 files (24.6% non-contiguous), 23456238/26214055 blocks
6. Resize new partition in system
# resize2fs /dev/sdb1 resize2fs 1.39 (29-May-2006) Resizing the filesystem on /dev/sdb1 to 47185912 (4k) blocks. The filesystem on /dev/sdb1 is now 47185912 blocks long.
7. Mount new size partition back to system
# mount -all
相关文章推荐
- How To: Extend the Virtual Disk Size of a XenServer VM
- Is there any best way to reduce the size of ibdata in mysql.?
- tomcat consider increasing the maximum size of the cache java.lang.IncompatibleClassChangeError: Imp
- The size of base data type in Ubuntu-AMD64
- Why is the size of an empty class not zero in C++?
- [PReact] Reduce the Size of a React App in Two Lines with preact-compat
- How to get the size of file in C++ - 在C++中如何获取文件的大小
- Display the size of all tables in Sql Server 2005
- InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
- Whats the best way to split an array in ruby into multiple smaller arrays of random size
- The size of the object heap + VM data exceeds the maximum representable size问题解决办法
- How to Change the Size of a Box-Plot Label in MATLAB
- The List of the 100 Companies That Matter Most in Online Video in 2015
- InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pa
- 2017年Nature文章“Millions of online book co-purchases reveal partisan differences in the consumption of science”阅读笔记
- ora-03206 maximum file size of blocks in autoextend clause is out of range
- 如何调整Dreamhost主机PHP上传尺寸的限制/How to change the maximal size of uploading in your Dreamhost
- How to extend the root partition in LVM
- mysql5.7.12/13在安装新实例时报错:InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero