adding extra disks on openbsd the fast way

<script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>


This is to add an extra disk to OpenBSD system, in a simple and quick way. if you'd like to know more details and what we're doing by these commands, please go to OpenBSD faq "disk setup" page: http://www.openbsd.org/faq/faq14.html.

tested on openbsd 4.2.

NOTE: THIS  IS FOR LEARNING ONLY. DO NOT TRY ON YOUR PRODUCTION SERVER!!


1. power off your box
2. attache your disk to your computer
3. boot
4. login as root
5. check dmesg for the disk you just add.
     For a 2nd IDE disk, usually it's wd1; for 2nd SCSI disk, it's sd1 etc
6. run command: `fdisk -i wd1`, assuming it's 2nd IDE disk, brand new.
7. run command: `disklabel -E wd1`
8. under the disklabel command prompt, enter `a a` to add your first partition, accept all default setting in the following 3 prompt, the "offset" sector, end sector and fs type. this will make the whole disk as one partition "a"
9. enter 'q' to exit disklabel command and save your setting
10. run `newfs /dev/wd1a` to make new file system on the newly created partition.
11. make a directory, under which you want to mount the new partition to. `mkdir /vol0`.
12. run `mount /dev/wd1a /vol0`
13. you should be able to cd into /vol0 directory and do whatever you normally can do.
if you want to have this partition mounted automatically at every reboot, edit the "/etc/fstab" file, append to it the line `/dev/wd1a /vol0 ffs 1 1`

DONE.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值