將/usr mount到別顆硬碟 - BBS
By Vanessa
at 2006-11-24T20:21
at 2006-11-24T20:21
Table of Contents
: 假設用 /mnt 當臨時用的 mount 點,就先建立一下:
: # mkdir -p /mnt
: 把 B 的 /dev/ad1s1e mount 到 /mnt
: # mount /dev/ad1s1e /mnt
: 切到 /mnt
: # cd /mnt
: 把原本 /var 東西全部照原本內容、權限、owner等 dump 到 /mnt,並 restore 之
我照大大你說的作法實做一下 我的/abc = 你說的/mnt
/abc>dump -f- /var | restore -f- -r
DUMP: WARNING: should use -L when dumping live read-write filesystems!
DUMP: Date of this level 0 dump: Fri Nov 24 20:07:53 2006
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/ad0s2d (/var) to standard output
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 2318 tape blocks.
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
warning: ./.snap: File exists <--- 出現這行 什麼意思
DUMP: DUMP: 2658 tape blocks
DUMP: finished in 4 seconds, throughput 664 KBytes/sec
DUMP: DUMP IS DONE
/abc>df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 248M 77M 151M 34% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/ad0s1d 62M 12K 57M 0% /tmp
/dev/ad0s3d 3.2G 1.5G 1.5G 50% /usr
/dev/ad0s2d 96M 2.2M 86M 2% /var
/dev/ad0s1e 62M 6.0K 57M 0% /var/tmp
/dev/ad3s1d 3.9G 2.2M 3.6G 0% /abc
而原本/usr有1.5G dump到/abc只用了2.2M
這會不會太神奇了??
感覺上重灌又離我不遠了
: # dump -f- /var | restore -f- -r
: 然後 umount 並砍除 /mnt
: # umount /mnt ; rm -rf /mnt
: 修改 /etc/fstab
: # vi /etc/fstab
: 將原先 /var 的 disk 改為 /dev/ad1s1e
: 重開
: # reboot
--
: # mkdir -p /mnt
: 把 B 的 /dev/ad1s1e mount 到 /mnt
: # mount /dev/ad1s1e /mnt
: 切到 /mnt
: # cd /mnt
: 把原本 /var 東西全部照原本內容、權限、owner等 dump 到 /mnt,並 restore 之
我照大大你說的作法實做一下 我的/abc = 你說的/mnt
/abc>dump -f- /var | restore -f- -r
DUMP: WARNING: should use -L when dumping live read-write filesystems!
DUMP: Date of this level 0 dump: Fri Nov 24 20:07:53 2006
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/ad0s2d (/var) to standard output
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 2318 tape blocks.
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
warning: ./.snap: File exists <--- 出現這行 什麼意思
DUMP: DUMP: 2658 tape blocks
DUMP: finished in 4 seconds, throughput 664 KBytes/sec
DUMP: DUMP IS DONE
/abc>df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 248M 77M 151M 34% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/ad0s1d 62M 12K 57M 0% /tmp
/dev/ad0s3d 3.2G 1.5G 1.5G 50% /usr
/dev/ad0s2d 96M 2.2M 86M 2% /var
/dev/ad0s1e 62M 6.0K 57M 0% /var/tmp
/dev/ad3s1d 3.9G 2.2M 3.6G 0% /abc
而原本/usr有1.5G dump到/abc只用了2.2M
這會不會太神奇了??
感覺上重灌又離我不遠了
: # dump -f- /var | restore -f- -r
: 然後 umount 並砍除 /mnt
: # umount /mnt ; rm -rf /mnt
: 修改 /etc/fstab
: # vi /etc/fstab
: 將原先 /var 的 disk 改為 /dev/ad1s1e
: 重開
: # reboot
--
Tags:
BBS
All Comments
Related Posts
新手的問題
By Lydia
at 2006-11-23T22:53
at 2006-11-23T22:53
新手的問題
By Erin
at 2006-11-23T19:33
at 2006-11-23T19:33
板上都沒有討論Freebsd伺服用途的菜單
By Yuri
at 2006-11-23T00:04
at 2006-11-23T00:04
網路穩定測試記錄
By Harry
at 2006-11-22T23:16
at 2006-11-22T23:16
板上都沒有討論Freebsd伺服用途的菜單
By Emily
at 2006-11-22T22:52
at 2006-11-22T22:52