Re: FreeBSD slice/partiton setup question
There have been some excellent responses, and I just wanted to add a quick point: Virtual machines with VirtualBox work very well and avoid the problem of trying to make compatible partition layouts. Enable sshd on FreeBSD and get to the files with rsync or scp or some FUSE module on the other computer. Besides avoiding the whole problem of mixed partition schemes, it means both operating systems can run at the same time. The host computer can be used to look up things on the web about setting up the VM guest, while the guest is actually running. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: FreeBSD slice/partiton setup question
2013. június 19. 19:41 napon Warren Block wbl...@wonkity.com írta: There have been some excellent responses, and I just wanted to add a quick point: Virtual machines with VirtualBox work very well and avoid the problem of trying to make compatible partition layouts. Enable sshd on FreeBSD and get to the files with rsync or scp or some FUSE module on the other computer. Thank you all for your answers, detailed explanations and document links. I am now digesting what I've read and probably will try different setups on an empty hard disk. Thanks again, Istvan ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
FreeBSD slice/partiton setup question
Hello: I have a question regarding FreeBSD slices/partitions. I have a disk with linux partitions with the following layout: /dev/sda1 / /dev/sda2 /home /dev/sda3 /usr/local /dev/sda5 swap /dev/sda6 /home/user1 /dev/sda7 /home/user2 etc. sda1, sda2, and sda3 are primary partitions, sda5 and above are logical partitions on an extended partition. I would like to have a similar setup with FreeBSD. The goal is that the / root, /home, /usr/local and /home/user1 etc. filesystems should be on independent slices/partitions so that I could mount them independently from linux. How can I do this in FreeBSD? Can I have slices with only one partition occupying the whole slice? Can I do something like the following: /dev/ad0s1a / /dev/ad0s2e /home /dev/ad0s3e /usr/local /dev/ad0s5b swap /dev/ad0s6e /home/user1 /dev/ad0s7e /home/user2 etc. where the partitions (a, e, b) occupy the whole slice where they reside on? Thanks, Istvan ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: FreeBSD slice/partiton setup question
On Tue, Jun 18, 2013 at 10:44 AM, Istvan Gabor suseuse...@lajt.hu wrote: ... How can I do this in FreeBSD? Can I have slices with only one partition occupying the whole slice? Can I do something like the following: /dev/ad0s1a / /dev/ad0s2e /home /dev/ad0s3e /usr/local /dev/ad0s5b swap /dev/ad0s6e /home/user1 /dev/ad0s7e /home/user2 etc. where the partitions (a, e, b) occupy the whole slice where they reside on? Why bother with partitions if you're going to use the whole slice? Why bother with slices if you won't run out of partitions? - M ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: FreeBSD slice/partiton setup question
2013. június 18. 19:49 napon Michael Sierchio ku...@tenebras.com írta: On Tue, Jun 18, 2013 at 10:44 AM, Istvan Gabor suseuse...@lajt.hu wrote: ... How can I do this in FreeBSD? Can I have slices with only one partition occupying the whole slice? Can I do something like the following: /dev/ad0s1a / /dev/ad0s2e /home /dev/ad0s3e /usr/local /dev/ad0s5b swap /dev/ad0s6e /home/user1 /dev/ad0s7e /home/user2 etc. where the partitions (a, e, b) occupy the whole slice where they reside on? Thanks, but I don't understand your answer. I am puzzled a little bit. My understanding based on the FreeBSD handbook is that slices in FreeBSD are the partitions in linux. And that on one slice (linux partition) FreeBSD has (or can have?) several partitions. These are labeled as letters: a for root partition, b for swap, c for the whole slice, and e for a regular non-root partition. Why bother with partitions if you're going to use the whole slice? Are you saying that one can use/mount a whole slice without adding partitions to it? For example /dev/ada0s1 could be the root partition? Why bother with slices if you won't run out of partitions? Do you mean putting all partitions on one big slice? I would like to be able to mount different partitions independently from other OS, eg. from linux. As far as I know linux cannot mount FreeBSD partitions, only the whole slice. If one slice has several partitions, one single partition can not be mounted from linux. Could you please confirm if my understanding is correct, or explain a little bit more detailed what you meant? Thanks, Istvan ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Re: FreeBSD slice/partiton setup question
From owner-freebsd-questi...@freebsd.org Tue Jun 18 13:47:50 2013 Subject: =?UTF-8?Q?Re:_FreeBSD_slice/partiton_setup_?= =?UTF-8?Q?question?= From: =?UTF-8?Q?Istvan_Gabor?= suseuse...@lajt.hu To: =?UTF-8?Q?FreeBSD_Questions?=freebsd-questions@freebsd.org, =?UTF-8?Q?Michael_Sierchio?=ku...@tenebras.com, =?UTF-8?Q?Michael_Sierchio?=ku...@tenebras.com Date: Tue, 18 Jun 2013 20:48:20 +0200 2013. jA nius 18. 19:49 napon Michael Sierchio ku...@tenebras.com A- rta: On Tue, Jun 18, 2013 at 10:44 AM, Istvan Gabor suseuse...@lajt.hu wrote: ... How can I do this in FreeBSD? Can I have slices with only one partition occupying the whole slice? Can I do something like the following: /dev/ad0s1a / /dev/ad0s2e /home /dev/ad0s3e /usr/local /dev/ad0s5b swap /dev/ad0s6e /home/user1 /dev/ad0s7e /home/user2 etc. where the partitions (a, e, b) occupy the whole slice where they reside on? Thanks, but I don't understand your answer. I am puzzled a little bit. My understanding based on the FreeBSD handbook is that slices in FreeBSD are the partitions in linux. And that on one slice (linux partition) FreeBSD has (or can have?) several partitions. These are labeled as letters: a for root partition, b for swap, c for the whole slice, and e for a regular non-root partition. The terminology gets confusing. 'slices' in FreeBSD, and most other 'real' unix systems, correspond to MSDOS/Windows 'partitions', on hardware that supports the MSDOS partitioning scheme.. Unix has its own layer of disk subdivision, referred to here as 'BSD partitioning' (to make clear it is not the same as Microsoft's 'fdisk' functionality, as well. In the 'classical' form this gives the (up to 8) 'letter-named' pieces that a disk may be carved into. You can use 'slices', giving filesystem names, after 'BSD partitioning', like '/dev/ad4s0a', or you can omit 'slice' creation, and do only a 'BSD partioning scheme, giving device names like /dev/ad4a. In the 'BSD partitioning' scheme, letter 'c' is reserved for the entire disk, but SHOULD NOT ever be used directly. One can create another 'BSD partition' (using the letter of ones choice) that also spans the entire disk. There is no requirement to have more than one 'usable' partition on the disk. Why bother with partitions if you're going to use the whole slice? Are you saying that one can use/mount a whole slice without adding partitions to it? For example /dev/ada0s1 could be the root partition? Why bother with slices if you won't run out of partitions? Do you mean putting all partitions on one big slice? I would like to be able to mount different partitions independently from other OS, eg. from linux. As far as I know linux cannot mount FreeBSD partitions, only the whole slice. If one slice has several partitions, one single partition can not be mounted from linux. A full discussion gets 'messy'. there are lots of variations that complicate things -- including a single 'logical volume' with multiple physical disks (e.g. RAID), a single physical disk with multiple 'logical drives' on it (think 'fdisk' partitioning), *AND* the type of filesystem in use on the logical volume/drive. *ASSUMING* the 'Berkeley fast filesystem' (the traditional/classical system choice, also known as 'UFS'), a logical volume/drive must have a BSD 'volume label' on it, which allows subdividing that logical volume/drive into (up to) 8 letter-names parts. Each such 'part' holds a separate filesystem, and must be 'mounted', _individually_, before files on that filesystem can be acessed. The overall logic is similar for other filesystem types, however the mechanical details may be quite different. Could you please confirm if my understanding is correct, or explain a little bit more detailed what you meant? If you want a -single- filesystem to occupy an entire physical disk you can: a) use a 'dangerously dedicated' drive -- one with no 'fdisk' partitioning and only a BSD volume label, and create a single 'BSD partition' -- giving a device like '/dev/ad4h' b) creat a single 'fdisk' primary partition spanning the entire drive and put a BSD volume label on the primary partition, with only a single 'BSD partition' -- giving a device like '/dev/ad4s0h' c) do 'something similar' using a different partitioning scheme -- e.g. 'gpart' -- instead of 'bsdlabel'. d) do 'something similar' using a different type of filesystem -- e.g. 'ZFS' or 'EXT3' (beware: EXT3 is _not_ well-supported under FreeBSD, and there are 'good reasons' _not_ to use any of the EXT* filesystem types if one values the integrity of ones data in the event of 'unexpected' events. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to
Re: Re: FreeBSD slice/partiton setup question
You can simply newfs the device itself, without a volume label, slice, or partition. That's the normal thing to do with malloc devices, or additional disks. If the disk doesn't require a boot loader, isn't the root device, etc. that may be the best thing to do. Your caution about EXT* is spot-in - adequate tools exist for EXT2FS, but it's still problematic. - M ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: FreeBSD slice/partiton setup question
On Tue, 18 Jun 2013 20:48:20 +0200, Istvan Gabor wrote: 2013. június 18. 19:49 napon Michael Sierchio ku...@tenebras.com írta: On Tue, Jun 18, 2013 at 10:44 AM, Istvan Gabor suseuse...@lajt.hu wrote: ... How can I do this in FreeBSD? Can I have slices with only one partition occupying the whole slice? Can I do something like the following: /dev/ad0s1a / /dev/ad0s2e /home /dev/ad0s3e /usr/local /dev/ad0s5b swap /dev/ad0s6e /home/user1 /dev/ad0s7e /home/user2 etc. where the partitions (a, e, b) occupy the whole slice where they reside on? Thanks, but I don't understand your answer. First I'd like to point you at the excellent documentation provided by FreeBSD: http://www.freebsd.org/doc/handbook/disks-adding.html http://www.freebsd.org/doc/en/books/handbook/geom-glabel.html http://www.freebsd.org/doc/handbook/bsdinstall-partitioning.html Also read Warren Block's article about the tools used in the old and new way of preparing a disk for use: http://www.wonkity.com/~wblock/docs/html/disksetup.html Regarding terminology, just if it hasn't been clear already: In UNIX terminology, a slice is what DOS and therefor Windows refers to as a DOS primary partition. It is designated a number. It can be subdivided in partitions which are designated a letter. A partition carries a file system, a slice carries partitions, and finally a device carries slices. (The slicing can also be omitted, this is called dedicated). Examples: ad0 = the 1st disk ad0s1 = the 1st slice ad0s1a = the 1st partition of the 1st slice ... ad0s1h = the 8th partition of the 1st slice And the dedicated approach: ad0a = the 1st partition directly created on the 1st disk The letters have a specific meaning: 'a' is a bootable partition. 'c' is the whole thing (being the whole slice or the whole disk), 'b' is reserved for a swap partition, and user-defined partitions go from 'd' to 'h'. As I mentioned, there is a new and an old way of partitioning. What I've discussed so far is called MBR partitioning, it's the old way. The new way, GPT partitioning, does not use the idea of slices and partitions anymore. Instead partitions are enumerated and created directly. Example: ad0 = the 1st disk ad0p1 = the 1st partition ... ad0p15 = the 15th partition Of course, different tools are involved here, as you can see in the documentation links provided above. I am puzzled a little bit. My understanding based on the FreeBSD handbook is that slices in FreeBSD are the partitions in linux. So far correct, with an exception: A slice does _not_ carry a file system, whereas in DOS terminology, reflected in Linux, the file system is created in a DOS-like manner. Example: /dev/sda1 = 1st disk 1st DOS partition (slice) _with_ file system /dev/ad0s1 = the same, but no file system here /dev/ad0s1a = 1st partition on that slice _with_ file system And that on one slice (linux partition) FreeBSD has (or can have?) several partitions. Correct. These are labeled as letters: a for root partition, b for swap, c for the whole slice, and e for a regular non-root partition. Correct as well. Are you saying that one can use/mount a whole slice without adding partitions to it? For example /dev/ada0s1 could be the root partition? No. You _need_ to create a partition, read: at least one partition. That partition can cover the whole slice (or device, as mentioned above), and it will be designated 'c', but that letter is omitted (I think since FreeBSD 5). Example: Let's assume you have created the /dev/ada0s1 slice already. Now you do: # newfs /dev/ada0s1 and you get a file system on the /dev/ada0s1c partition (which is created implicitely by newfs. You can now mount it: # mount -t ufs /dev/ada0s1 /mnt But remember: That is the 'c' partition! Similar approach for data disks (where you want to dedicate the whole disk to data use, not booting or anything else): # newfs /dev/da0 # mount -t ufs /dev/da0 /mnt Again, /dev/da0c is the device you're operating on (which carries the file system). Do you mean putting all partitions on one big slice? With traditional partitioning, you can only use up to 'h' partitions (with exceptions). If you need more than those 8, use GPT instead. If you _must_ use MBR partitioning, you can have up to 4 slices on a disk, giving you (with exceptions) 4 x 8 = 32 partitions for FreeBSD on one disk. I would like to be able to mount different partitions independently from other OS, eg. from linux. That can be problematic because Linux doesn't seem to fully support UFS file systems and BSD partitioning... If interoperability is your goal, then you should probably use exchange partitions with a file system that is better supported on FreeBSD (than using FreeBSD and hoping for greater-than-zero support on Linux). Check if Linux supports GPT properly. It's much easier to deal with GPT than with the