Hitchhiker's Guide to Openbsd
If all this seems needlessly complex, you can just use disklabel -E to get the same partitioning mode that
Download 1.27 Mb. Pdf ko'rish
|
obsd-faq49
- Bu sahifa navigatsiya:
- /dev/sd2d /usr/local ffs rw 1 1 Reboot into single user mode with boot -s
If all this seems needlessly complex, you can just use disklabel -E to get the same partitioning mode that
you got on your install disk! There, you can just use "96M" to specify "96 megabytes", or 96G for 96 gigs. http://www.openbsd.org/faq/faq14.html (9 of 34)9/4/2011 10:02:25 AM 14 - Disk Setup That was a lot. But you are not finished. Finally, you need to create the filesystem on that disk using newfs(8) . # newfs sd2d Or whatever your disk was named as per OpenBSD's disk numbering scheme. (Look at the output from dmesg(8) to see what your disk was named by OpenBSD.) Now figure out where you are going to mount this new partition you just created. Say you want to put it on /u. First, make the directory /u. Then, mount it. # mount /dev/sd2d /u Finally, add it to /etc/fstab(5) . /dev/sd2d /u ffs rw 1 1 What if you need to migrate an existing directory like /usr/local? You should mount the new drive in /mnt and use cpio -pdum to copy /usr/local to the /mnt directory. Edit the /etc/fstab(5) file to show that the /usr/local partition is now /dev/sd2d (your freshly formatted partition). Example: /dev/sd2d /usr/local ffs rw 1 1 Reboot into single user mode with boot -s, move the existing /usr/local to /usr/local-backup (or delete it if you feel lucky) and create an empty directory /usr/local. Then reboot the system, and voila, the files are there! 14.5 - How is swap handled? 14.5.1 - About swap Historically, all kinds of rules have been tossed about to guide administrators on how much swap to configure on their machines. The problem, of course, is there are few "normal" application. One non-obvious use for swap is to be a place the kernel can dump a copy of what is in core in the event of a system panic for later analysis. For this to work, you must have a swap partition (not a swap file) at least as large as your RAM. By default, the system will save a copy of this dump to /var/crash on reboot, so if you wish to be able to do this automatically, you will need sufficient free space on /var . However, you can also bring the system up single-user, and use savecore(8) to dump it elsewhere. Many types of systems may be appropriately configured with no swap at all. For example, firewalls should not swap in normal operation. Machines with flash storage generally should not swap. If your firewall is flash based, you may benefit (slightly) by not allocating a swap partition, though in most other cases, a swap partition won't actually hurt anything; most disks have more than enough space to allocate a little to swap. There are all kinds of tips about optimizing swap (where on the disk, separate disks, etc.), but if you find yourself http://www.openbsd.org/faq/faq14.html (10 of 34)9/4/2011 10:02:25 AM 14 - Disk Setup in a situation where optimizing swap is an issue, you probably need more RAM. In general, the best optimization for swap is to not need it. In OpenBSD, swap is managed with the swapctl(8) program, which adds, removes, lists and prioritizes swap devices and files. Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2025
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling