Pages

FreeBSD partitioning Hard drive




The smallest unit of organization that FreeBSD uses to find files is the filename. Filenames are case-sensitive, which means that readme.txt and README.TXT are two separate files. FreeBSD does not use the extension (.txt) of a file to determine whether the file is a program, or a document, or some other form of data.

GENERAL DISK PARTITIONING ON PC
    * A maximum of four partitions can be placed on any hard disk. These are sometimes called primary partitions. The limitation of four is one that is imposed on the system by the way that the master boot record is structured.
    * Only one partition may be designated, at any given time, as active. That partition will be used for booting the system. See here for more on active partitions and switching active status between partitions.
    * DOS (and the operating systems that depend on it for booting, which includes all consumer Windows operating systems) will only recognize the active primary partition. Any other primary partitions will be ignored.
    * One of the four partitions may be designated as an extended DOS partition. This partition may then be subdivided into multiple logical partitions. This is the way that two or more logical DOS volumes can be placed on a single hard disk.

ad0s1a     The first partition (a) on the first slice (s1) on the first IDE disk (ad0).
da1s2e     The fifth partition (e) on the second slice (s2) on the second SCSI disk (da1).

a) DISK
Common codes that each disk on the system can be:
ad         ATAPI (IDE) disk
da         SCSI direct access disk
acd       ATAPI (IDE) CDROM
cd         SCSI CDROM
fd         Floppy disk

b) SLICE
Each partition-that-contains-a-file-system is stored in what FreeBSD calls a slice.
Slices are numbered: 1,2,3,4.
There can only be four physical slices on a disk, but you can have logical slices inside physical slices of the appropriate type. These extended slices are numbered starting at 5, so “ad0s5” is the first extended slice on the first IDE disk.

So “da0s1” is the first slice on the first SCSI drive.

The term "slice" is also used in the FreeBSD operating system to refer to PC BIOS hard disk partitions
In FreeBSD a "slice" is what you may consider to be a "partition" under Windows.

c) PARTITION
Slices, “dangerously dedicated” physical drives, and other drives contain partitions, which are represented as letters, only 8 max: a,b,c,d,e,f,g,h.

(dangerously) dedicated mode: Formatting a disk with no slice table. This makes the process of adding disks easier, however non-FreeBSD operating systems may not accept the disk. Oppose compatibility mode.

SAMPLE PARITIONING
    * ad0s1a: 2000M, filesystem mounted as /
    * ad0s1b: 500M (2x RAM), swap
    * ad0s1d: 7000M, filesystem mounted as /usr
    * ad0s1e: 3000M, filesystem mounted as /var
    * ad0s1f: 8000M, filesystem mounted as /home



Keep in mind that there can only be one filesystem per BSD partition, and multiple BSD partitions within a BSD slice. the BSD slice coresponds to FAT/Linux primary partitions, and due to archaic PC BIOS limitations, there can only be four BSD slices (same as for FAT/Linux primary partitions) per system.
http://www.freebsd-howto.com/HOWTO/Filesystem-Layout-HOWTO


man hierm


http://citkit.ru/articles/162/
Однако FreeBSD (и не только она) поддерживает и еще одну группу файловых систем, которые можно назвать виртуальными. Под ними не лежат какие-либо физические устройства вроде дисков и иных накопителей, место их расположения - оперативная память. И соответственно, для использования их не требуется ни разбиение диска, ни форматирование, а подчас не нуждаются они даже в монтировании. К их числу принадлежат procfs - файловая система процессов, devfs - файловая система устройств, и mfs - файловая система в оперативной памяти.


devfs -The device file system, or devfs(5), provides access to kernel's device namespace in the global file system namespace.
devfs     /dev devfs rw 0 0


The devfs utility provides an interface to manipulate properties of
     devfs(5) mounts.


This includes access to
to system devices such as storage devices, kernel and system memory
devices, BPF devices, and serial port devices.  Devfs is is generally
mounted as /dev.  Devfs rulesets allow an administrator to hide
certain device nodes; this is most commonly applied to a devfs mounted
for use inside a jail, in order to make devices inaccessible to
processes within that jail.


on Unix systems a device (hd, soundcard, etc.) is seen as a special file and you can find them in /dev. This is for example to have a uniform way to do I/O operations.
devfs manages that filesystem for you, dynamically creating the files and assigning permissions.

reading /usr/share/doc/papers/devfs.ascii.gz .

No comments:

Post a Comment