|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
external drive partition question + fdisk question
Ok, I've finally bought myself a new drive which I'll use for backup and simply as extra memory.
It is 1T and has a big fat32 partition. I would like to make smaller partitions, maybe four (if I understand right this is the maximum for fdisk). I've used fdisk before to install OpenBSD and I know that the partition must start at sector 63. Is it the same for a non bootable drive? Is it fine to start from head 0 sector 1? Like here: Code:
$ fdisk sd0 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: 83 0 0 1 - 32635 106 47 [ 0: 524288000 ] Linux files* 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused Once I manage to partition in fdisk, does disklabel give the opportunity to make extra partitions (or how are they called?)? I've tried to divide sectors by 4 and have now this mbr: 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: 83 0 0 1 - 30400 83 63 [ 0: 488381292 ] Linux files* 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused Sorry I'm adding new things all the time. I've just seen this in a post http://www.daemonforums.org/showthre...ighlight=fdisk : Quote:
Last edited by gosha; 13th June 2009 at 10:26 AM. |
|
||||||
Quote:
http://en.wikipedia.org/wiki/Extended_partition You should also study Sections 4 & 14 of the FAQ: http://www.openbsd.org/faq/faq4.html http://www.openbsd.org/faq/faq14.html Quote:
Quote:
Quote:
Nevertheless, disklabel(8) can further subdivide FFS filesystems. Quote:
The order of preparing additional storage for use with OpenBSD is:
Quote:
I would highly suggest that you change the order where you search for information.
|
|
|||
Thanks a lot.
I know, it seems I've not read the faq and manpages, but I did many times in the past to install OpenBSD, but could never fully understand the difference between the partition in fdisk and in disklabel and also this head/sector thing. Now, if I get it right, I could make my four partitions in fdisk and then for every of them add extended partitions with disklabel, right? So, Ocicat, you say I could make one big partition in fdisk and then extended partitions using disklabel. That could be fine for me. I was thinking about doing it with fdisk to start using only part of the disk, and then if needed make the new partition, maybe, if needed using another filesystem (if the primary partition is, say, ffs, disklabel cannot make a ext2 partition, right?) |
|
|||
No, There can only be 1 primary MBR partition for OpenBSD, (A6 identifier).. disklabel provides an additional layer of partitioning within the OpenBSD area of the disk.
As ocicat said, not every architecture uses MBR partitioning.. MBR was an IBM/MS idea, it supports 4 primary partitions.. or 3 primary partitions and 1 extended partition.. extended partitions are basically a daisy chained MBR that allows you to have additional partitions. In your case, you might want to create 2 MBR partitions.. one for OpenBSD, and one for Linux(EXT2). Also, most people place their first partition at LBA 63.. not LBA 0.. because you'll just trash your MBR. |
|
||||
Quote:
Quote:
Quote:
...& note that one of the 16 partitions that disklabel(8) can recognize is the entire disk, so an OpenBSD system can recognize only 15 configurable partitions at a time. Quote:
Two observations:
|
|
|||
Gosha. You can make 3 primary partitions/1 extended partition or 4 primary partitions. Then you subdivide the primary partition you select for BSD into slices.
|
|
|||
Thank you all, and especially ocicat, you're always very exhaustive.
Quote:
Quote:
Quote:
Now, what would you do in my place? I'll repeat the scenario: I have a mac mini ppc (G4) on which I have installed OpenBSD (now 4.3, but when I'll start using my new disk, I will do a backup of the whole system and do a clean install to 4.5). I have bought this 1T disk (WD My Book Essential, pretty nice) to use it for backup and to put in it all the data from three different disks I have hanging in two computers. I sometimes need to use my windows box, so I will probably need to access this disk with windows. Also, my mac mini is always on and I can access it from outside with ssh, and in my usb thumb I have a ssh directory with putty in it, so that I can access it from windows boxes also. So I will have access from the outside to the big drive this way. What should I do, trust apple hardware, and simply format it with my mac mini to ffs and use it only through it? What would you do in my place? And also, would you make smaller partitions or simply use one big 1T? Isn't it better to separate partitions I know will be written very often from those that are written to only seldom? |
|
||||
Quote:
I do not know the complete answer to your question, but I do know that the disklabel structure created can vary from one architecture to another -- possibly to the point of incompatibility. Whether you will run into this nit between the i386 & ppc ports is unknown to me. I suspect you need to simply set it up & test. The versions of OpenBSD used probably need to be very close as well. Your other choice is to post to misc@ & wait for an answer. Quote:
Quote:
It sounds like you are putting all of your eggs into one basket by completely trusting this one external drive. Your goose will be cooked if this drive:
Therefore, I would suggest using multiple methods in disaster recovery:
Finally, you are implying that this information is vital. The more important it is, more sophisticated solutions are warranted. As an OpenBSD newbie, you are having to learn more sophisticated technologies which can aid in disaster recovery. Give yourself time to learn them & learn them well. I suspect the first things you need to do are:
Quote:
I think you will find in the misc@ archives where Nick Holland states that mistakes happen. Accept it, & factor it into your world view. The real test of preparedness is how quickly can you recover from a catastrophic event -- in whatever form it happens. |
|
|||
Thank you for you answer and thank you to remind me I'm still a newby. I've been using OpenBSD exclusively since a year, and sometimes think I know quite a lot already, but I would not ask so many questions if I did.
Quote:
This time I want to do a new "inventary" while transferring data to the new drive. Why am I putting so much effort on this drive/backup/storage space thing? There are a few reasons: in my computing experience I found out that if you don't plan things well in advance and if you don't consider future compatibility, you might find yourself in trouble afterwards. Another reason is that I want to have a unique drive to be used to store my data (I can do further backups to cd dvd). Or even better, I have to learn to backup things in a clever way, that is with a software that backups only things that have changed since last backup (if I'm right dump option 0 to 9), because in the past I often found myself with changed files (the same file) in different places and at the end not knowing wich one I should have kept, and spending time in checking them all. This summer I should finally be able to by myself a notebook, I will need this even more. Another reason is that I lately heard very many scary story about data loss, the last one this winter when my sister had her notebook stolen, with everything in it and... no backup. Another reason is that I know by experience that hardware sooner or later will fail (if you remember, last year my notebook's embedded ram failed, so now it's unusable, it boots fine, but if you use it for a while it hangs forever). So this ppc i386 compatibility issue is very important to me. Quote:
Considering all this and you suggestions, I think I will do this: Simply format my drive with my mac mini and use it. Double check that everything is on dvd also. Then, from that point on, make sure that new data will be backed up regularly to cd or dvd (maybe get a rewritable cdrom and leave it inside). In the future I might as well consider on line storing to have an off site backup at least for most important things. How does it sound? |
|
|||
FFS is sensitive to Endian issues, you cannot mount a FFS partiton created on a macppc on an i386.
I'm about 80% positive that ext2 does not suffer from these Endian issues, you should be able to access the partition on both your i386 and your macppc. As I said in another similar topic, using FFS on a portable mass storage device is not really an option if you have a mixed environment like yours.. You can have several EXT2 partitions on the disk, that would be the safest bet.. there is FAT, but it does not support Unix file permissions.. so I did not mention it. Hope that helps. |
|
|||
thanks BSDfan666
I could implement my last solution using ext2 instead than ffs. Quote:
|
|
|||
I have managed to make the ext2 partition and it works also in windows (I downloaded the driver).
I have some questions: in the ext2 utilities there's a mkfs.ext3 which should enable journaling, I tried it but then OpenBSD would refuse to mount it. It works fine formatting with mkfs.ext2 though. Also, over 10 G have disappeared, I suppose it is this: Code:
3052383 blocks (5.00%) reserved for the super user Another question: why does Windows report a bigger size? Code:
/dev/sd0i 229G 20.0K 218G 0% /mnt |
|
|||
OpenBSD doesn't support the journaling features of ext3, it mounts it as ext2.. in your case, it didn't work at all.
Sizes are a confusing thing, some people define a kilobyte as 1024 bytes, some define it as 1000 bytes. Both FFS and EXT2 reserve some space for the superuser, the man page for both should explain how to reduce that reserved space.. but it's generally nothing worth worrying about. |
|
|||
Thanks for mentioning that, a couple people have experienced bugs on OpenBSD due to inode sizes different then 128.
A patch was sent to the list a couple months ago, but I don't think it had enough testers.. it wasn't committed. It shouldn't be a problem in gosha's situation, presumably he's going to create his ext2 partition(s) using the e2fsprogs port. |
|
|||
Quote:
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fdisk Question | Crotalus | FreeBSD Installation and Upgrading | 2 | 10th February 2010 08:10 AM |
looking for external drive buy suggestions | gosha | General Hardware | 20 | 5th September 2009 05:32 AM |
Problem Installing From External DVD Drive | jimnms | OpenBSD Installation and Upgrading | 8 | 16th July 2009 07:12 PM |
WD Passport Portable external drive | Beastie | General Hardware | 7 | 25th April 2009 12:50 PM |
Booting with external USB drive plugged in? | Bruco | FreeBSD General | 29 | 17th May 2008 05:39 PM |