1 / 29
文档名称:

linux,lvm分区.docx

格式:docx   大小:28KB   页数:29页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

linux,lvm分区.docx

上传人:892629196 2022/3/7 文件大小:28 KB

下载得到文件列表

linux,lvm分区.docx

相关文档

文档介绍

文档介绍:时间:2022年3月8日
学海无涯
页码:第- 1 -页共29页
linux,lvm分区
篇一:linux 调整根分区大小方法(非LVM)
Linux 调整根分区大小(非LVM)
trd分析
3)Howto shrink a remote root ext3 filesystem on Debian wheezy
4) 内核的 Initrd 机制解析
附两个脚本:
1、
#!/bin/bash
echo Start to modify the initrd file.....
mkdir ./initrdTmp
initrdName=`ls /boot | grep -`
cp /boot/$initrdName ./initrdTmp/$
gunzip ./initrdTmp/$
cd ./initrdTmp
cpio -i -d ./$initrdName
rm -f ./$initrdName
cp ../openwrt-x86-generic-combined- ./
#copy fdisk e2fsck resize2fs
cp /sbin/fdisk ./bin
cp /sbin/e2fsck ./bin
cp /sbin/resize2fs ./bin
时间:2022年3月8日
学海无涯
页码:第- 6 -页共29页
#cp to /scripts
cp ../ ./scripts
chmod +x ./scripts/
sed /Mount root/i\. /scripts/ ./scripts/local ./scripts/ mv ./scripts/ ./scripts/local
echo Start to gzip the initrd file.....
find ./ | cpio -H newc -o | gzip -v -9 /boot/$
mv /boot/$ /boot/$initrdName
echo Finish the initrd flie , will be reboot.....
reboot
2、
#!/bin/bash
#########################
#1、通过dd命令将openwrt镜像写入sda磁盘
#2、fdisk 修改sda2(根目录)的分区
#3、resize2fs扩大sda2的大小
#########################
disk=sda2
echo Start to write openwrt image(/dev/sda) with dd......
时间:2022年3月8日
学海无涯
页码:第- 6 -页共29页
dd if=/openwrt-x86-generic-combined- of=/dev/sda
part2_start=`fdisk -l /dev/sda | grep $disk | awk {print $2}`
echo Start toextend partion2 from $part2_start to end .....
/bin/fdisk /dev/sda __EOF__ /dev/null
d
2
n
p
2
$part2_start
w
__EOF__
echo Start to e2fsck and resize2fs $disk .... /bin/e2fsck -p -f -C 0 /dev/$disk
/bin/resize2fs /dev/$disk
echo All done ,will reboot.....
reboot