提問三步曲: 提問先看教程/FAQ索引(wdcp,wdcp_v3,一鍵包)及搜索,會讓你更快解決問題
1 提供詳細,如系統(tǒng)版本,wdcp版本,軟件版本等及錯誤的詳細信息,貼上論壇或截圖發(fā)論壇
2 做過哪些操作或改動設置等
溫馨提示:信息不詳,很可能會沒人理你!論壇有教程說明的,也可能沒人理!因為,你懂的
下載 (16.3 KB)
2015-12-18 18:39
下載 (19.98 KB)
2015-12-18 18:39
請問怎么把home改成/www目錄?
我是菜鳥不會弄這個!用sh /www/wdlinux/tools/wdcp_disk_xvdb.sh小工具也不行,
#!/bin/sh
disk='/dev/xvdb'
dir='/www'
chk_fstab_1=`grep ${dir} /etc/fstab | wc -l`
chk_fstab_2=`grep ${disk}1 /etc/fstab | wc -l`
if [ $chk_fstab_1 -ne 0 ]; then
exit
fi
if [ $chk_fstab_2 -ne 0 ]; then
exit
fi
fdisk_exit=`fdisk -l | grep ${disk} | wc -l`
fdisk_done=`fdisk -l | grep ${disk}1 | wc -l | tr -d " "`
if [ $fdisk_exit -ne 0 ]; then
if [ $fdisk_done -ne 1 ]; then
echo -e "\n\nfdisk $disk ..."
fdisk $disk <<EOF
n
p
1
w
EOF
partprobe
fi
else
exit
fi
sleep 10
has_format=`tune2fs -l ${disk}1 2>1 | grep "Filesystem UUID"|wc -l`
if [ $has_format -eq 0 ]; then
echo -e "\n\nmkfs.ext3 $disk ..."
mkfs.ext3 ${disk}1
fi
I_N=0
if [ ! -d ${dir} ]; then
mkdir $dir
else
service wdapache stop
service pureftpd stop
service httpd stop
service mysqld stop
service nginxd stop
mv /www /wwwo
mkdir /www
I_N=1
fi
echo -e "\n\nmount $disk ..."
mount ${disk}1 $dir &> /dev/null
if [ $I_N -eq 1 ];then
mv /wwwo/* /www/
service wdapache start
service pureftpd start
service httpd start
service mysqld start
service nginxd start
fi
chk_mount=`mount | grep /dev/xvdb2 | wc -l`
if [ $chk_mount -eq 1 ];then
echo "${disk}1 $dir ext3 defaults 0 0" >> /etc/fstab
fi
echo
echo "All Is OK"
echo
小工具代碼應該怎么改?請大蝦們幫忙看看謝謝...
Disk /dev/xvdb: 95.6 GB, 95563022336 bytes
255 heads, 63 sectors/track, 11618 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: 0x0006cde7
Device Boot Start End Blocks Id System
/dev/xvdb1 1 11618 93321553+ 83 Linux
Disk /dev/xvda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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: 0x000858c5
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/xvda2 64 1306 9972736 8e Linux LVM
Disk /dev/mapper/vg_have-lv_root: 9168 MB, 9168748544 bytes
255 heads, 63 sectors/track, 1114 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: 0x00000000
Disk /dev/mapper/vg_have-lv_swap: 1040 MB, 1040187392 bytes
255 heads, 63 sectors/track, 126 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: 0x00000000
Disk /dev/mapper/Xvdbgroup-xvdb1: 95.5 GB, 95458164736 bytes
255 heads, 63 sectors/track, 11605 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: 0x00000000 |