expand ROOT filesystem size @ Oracle VM

1. dd a new bigger file than /OVS/styks, for example:create a 30G file,named styks_2. the file will be your new /dev/xvda.
# dd if=/dev/zero of=/OVS/styks_2 bs=5M count=6000

2. shutdown the VM and then dd your image file, /OVS/styks to the bigger file.
#dd if=/OVS/styks of=/OVS/styks_2 conv=notrunc

3. start VM guest using the new bigger image file, and log in system
replace this line in your vm.cfg file and restart your Guest VM
from:
disk = [ 'file:/OVS/styks,xvda,w', ]
to
disk = [ 'file:/OVS/styks_2,xvda,w', ]

4. @dom0 mount the image file, and the fdisk the parition
# losetup /dev/loop2 ./styks_2
# fdisk -l -u /dev/loop2
# fdisk -u /dev/loop2
# fdisk -u /dev/loop2

The number of cylinders for this disk is set to 3824.
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): p

Disk /dev/loop2: 31.4 GB, 31457280000 bytes
255 heads, 63 sectors/track, 3824 cylinders, total 61440000 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/loop2p1 * 63 64259 32098+ 83 Linux
/dev/loop2p2 64260 8562644 4249192+ 83 Linux
/dev/loop2p3 8562645 12739544 2088450 82 Linux swap / Solaris

Command (m for help): d
Partition number (1-4): 3

Command (m for help): d
Partition number (1-4): 2

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First sector (64260-61439999, default 64260):
Using default value 64260
Last sector or +size or +sizeM or +sizeK (64260-61439999, default 61439999): 57263100

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First sector (57263101-61439999, default 57263101):
Using default value 57263101
Last sector or +size or +sizeM or +sizeK (57263101-61439999, default 61439999):
Using default value 61439999

Command (m for help): v
62 unallocated sectors

Command (m for help): t
Partition number (1-4): 3
Hex code (type L to list codes): 82
Changed system type of partition 3 to 82 (Linux swap / Solaris)

Command (m for help): p

Disk /dev/loop2: 31.4 GB, 31457280000 bytes
255 heads, 63 sectors/track, 3824 cylinders, total 61440000 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/loop2p1 * 63 64259 32098+ 83 Linux
/dev/loop2p2 64260 57263100 28599420+ 83 Linux
/dev/loop2p3 57263101 61439999 2088449+ 82 Linux swap / Solaris

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 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.




# fdisk -u -l /dev/loop2
# losetup -d /dev/loop2


5. reboot the VM
# fdisk -l
# df -h
# resize2fs /dev/xvdb2
# mkswap /dev/xvdb3
# reboot
内容概要:本文详细介绍了洛特卡-沃尔泰拉模型的背景、假设及其数学表达方式,该模型用于描述生态学中捕食者与猎物间的种群动态变化。首先回顾了该模型的发展历程,阐述了其基本假设,包括无外部干扰下猎物按指数规律生长、捕食者依附于猎物生存等情况。接着给出了描述两物种相互关系的一阶非线性微分方程组,并对其各参量进行了具体解释,明确指出α、β、δ、γ分别对应于猎物增长率、捕获效率、能量转化率及捕食者自然衰减率四个关键要素。此外还提供了利用Python进行数值仿真的方法与代码样例,借助matplotlib等库生成直观的时间演变图形及二者互动的相空间轨迹图,展示了系统固有的周期振荡特性。最后讨论了该理论存在的不足之处以及未来发展的方向,强调可以通过加入更多现实因素改进现有模型。 适合人群:生物学专业学生,特别是关注生态学领域的本科生及以上学历的学习者;对于希望深入了解生物数学模型或者有意从事相关科研工作的研究人员来说也具有较高的参考价值。 使用场景及目标:本篇适用于高校课堂教学中有关种群动力学的内容讲解,帮助学生建立对捕食者-猎物种群动态变化规律的理解;也可以作为学术研讨材料辅助专业人士探索生态系统内不同物种间长期共生关系的本质。同时对于想要动手尝试经典生态模型编程实验的人来说非常适合作入门指南。 其他说明:文中提供的Python代码可供读者下载并在个人电脑上运行验证效果。需要注意的是,由于文中只涉及到简单的理想条件下模型,当应用到更为复杂的真实世界问题时需要适当调整参数设定并考虑到其它外界因素带来的影响。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值