|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
||||
fdisk
Code:
Disk: sd0 geometry: 121601/255/63 [1953525168 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused *3: A6 0 1 2 - 121600 254 63 [ 64: 1953520001 ] OpenBSD Code:
# /dev/rsd0c: type: SCSI disk: SCSI disk label: ST1000LM024 HN-M duid: 341910ffd49c2c85 flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 121601 total sectors: 1953525168 boundstart: 64 boundend: 1953520065 drivedata: 0 16 partitions: # size offset fstype [fsize bsize cpg] a: 2097152 64 4.2BSD 2048 16384 1 # / b: 7981104 2097216 swap # none c: 1953525168 0 unused d: 8388576 10078336 4.2BSD 2048 16384 1 # /tmp e: 23302240 18466912 4.2BSD 2048 16384 1 # /var f: 4194304 41769152 4.2BSD 2048 16384 1 # /usr g: 2097152 45963456 4.2BSD 2048 16384 1 # /usr/X11R6 h: 20971520 48060608 4.2BSD 2048 16384 1 # /usr/local i: 4194304 69032128 4.2BSD 2048 16384 1 # /usr/src j: 4194304 73226432 4.2BSD 2048 16384 1 # /usr/obj k: 629145600 77420736 4.2BSD 4096 32768 1 # /home Code:
Filesystem Size Used Avail Capacity Mounted on /dev/sd0a 1005M 67.2M 887M 7% / /dev/sd0k 298G 181G 102G 64% /home /dev/sd0d 3.9G 1.1M 3.7G 0% /tmp /dev/sd0f 2.0G 483M 1.4G 25% /usr /dev/sd0g 1005M 194M 761M 20% /usr/X11R6 /dev/sd0h 9.8G 3.3G 6.1G 35% /usr/local /dev/sd0j 2.0G 2.0K 1.9G 0% /usr/obj /dev/sd0i 2.0G 2.0K 1.9G 0% /usr/src /dev/sd0e 10.9G 25.8M 10.4G 0% /var |
|
||||
Let's start with the drive itself. This is a drive with 1,953,525,168 512-byte sectors addressable by the OS. That's 1,000,204,886,016 bytes. 1TB in "marketing" terabytes (where 1,000 = kilo, 1,000,000 = mega, etc.) It's 931.5 GB in "engineering" gigabytes (where 1,024 = kilo, 1,048,576 = mega, etc.)
The entire drive could actually fit in a single standard FFS filesystem, because those can be up to 1TB in size. Your /home partition is 629,145,600 512-byte sectors, which is 322,122,547,200 bytes. This is exactly 300 "engineering" GB. The filesystem within is 298GB - the remaining 2GB are consumed primarily by superblocks, which are the metadata constructs that manage your filesystem. But when you add your used and free, you end up with 283 GB. Now, where's the missing 5%? The Fast File System reserves it, in order to automatically manage fragmentation for you. Yay!! You should never have to defrag the filesystem. In fact, there is no defrag(8) command. You can also instruct the newfs(8) command not to reserve the space, or to reserve a different percentage. If needed, you can consume that "missing" 5%, but only if you are root. And when you do that, your Fast File System will become your Slow File System. A little more info can be found in FAQ 14.14, and in newfs(8) and tunefs(8) and in the SEE ALSO sections of both man pages. ---edited to add--- If you wish to "fill up" your drive by expanding the size of /home, you can do so with growfs(8). But you don't need to do this until/unless you need to use the space. Last edited by jggimi; 2nd December 2014 at 06:54 PM. Reason: typo! |
|
||||
Quote:
Quote:
|
|
||||
Exactly. There's about 594GB unallocated on the drive. And the /home partition is a good candidate for growfs(8), as there is no partition allocated after it.
Always back up your data before using growfs. I've never had a problem with it, but others have. |
|
||||
Quote:
Code:
# df -h Filesystem Size Used Avail Capacity Mounted on /dev/sd0a 1005M 58.5M 896M 6% / /dev/sd0k 829G 15.0G 773G 2% /home /dev/sd0d 3.9G 10.0K 3.7G 0% /tmp /dev/sd0f 2.0G 883M 1.0G 46% /usr /dev/sd0g 1005M 193M 761M 20% /usr/X11R6 /dev/sd0h 9.8G 830M 8.5G 9% /usr/local /dev/sd0j 2.0G 2.0K 1.9G 0% /usr/obj /dev/sd0i 2.0G 2.0K 1.9G 0% /usr/src /dev/sd0e 51.1G 17.3G 31.3G 36% /var /dev/sd1i 2.7T 2.1T 509G 81% /data |
|
||||
Quote:
Quote:
Quote:
|
|
||||
Quote:
Code:
Disks > 7 Gigabytes / 5% of disk. 80M – 1G swap 5% of disk. 80M – 2x max physical memory /tmp 8% of disk. 120M – 4G /var 13% of disk. 80M – 2x size of crash dump /usr 5% of disk. 900M – 2G /usr/X11R6 3% of disk. 512M – 1G /usr/local 10% of disk. 2G – 10G /usr/src 2% of disk. 1G – 2G /usr/obj 4% of disk. 1.3G – 2G /home 45% of disk. 1G – 300G Last edited by jggimi; 3rd December 2014 at 12:44 PM. Reason: typo, formatting |
|
||||
Using the entire disk means that OpenBSD will not place itself into an existing partition defined in the MBR. Instead, the whole disk -- including sector 0, which may or may not hold an MBR -- will be allocated to the system. An existing MBR, if any, will be lost. The unallocated space (well over half of the 1TB) can be used to expand /home, or to define new disklabel partition(s) for whatever purpose you wish.
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mounting/Reading Samsung USB drive | Gogglehead | FreeBSD General | 11 | 25th February 2011 09:55 PM |
Cannot copy large files to Flash Drive | sharris | FreeBSD General | 6 | 30th July 2010 09:57 AM |
Second Hard Drive | IronForge | OpenBSD Installation and Upgrading | 4 | 2nd November 2009 08:53 AM |
Did I fry my hard drive? | JMJ_coder | General Hardware | 7 | 23rd December 2008 10:38 PM |
CF as a *BSD hard drive? | JMJ_coder | General Hardware | 26 | 31st July 2008 05:13 PM |