LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
LinkBack Search this Thread
Old 04-12-2011, 06:57 PM   #31
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Ubuntu, OEL
Posts: 9,163

Rep: Reputation: 238Reputation: 238Reputation: 238

Quote:
Originally Posted by LauMars View Post
I'm sorry, but that doesn't sit comfortably with me. It strikes me as a very dangerous practice on a live system.
What makes you believe having the same hostid for different non virtualized OS instances hosted in a single physical machine and thus running only once at a time is a dangerous practice ?
Quote:
Well I'm sorry but then that makes you narrow minded. There's no such thing as a perfect solution for everything - not even ZFS achieves this.
I didn't wrote that. You missed the "almost".
Quote:
As I said before, I love ZFS, but even I'm aware that there are some scenarios that it's not ideal for and this is one of them. If you want a shared ZFS volume then do what I did and build a cheap homebrew NAS.
I wasn't talking about a file system shared on a network, which would be NFS or CIFS with a NAS anyway, not ZFS or whatever, but about a partition containing a ZFS pool that is used by different OSes on a multi-boot configuration, i.e. once at a time.

Back to your suggestions, you claim ZFS isn't a good choice because "it is not a good 'sharing' file system as it's expected to be only running on one host OS." However, the alternatives you suggest (ReiserFS, FAT32 and NTFS) are also very expected to run on one host OS at a time, and would be quickly destroyed otherwise. Only shared file systems like GFS and OCFS2 support that on Linux but I don't think there is any support for them on FreeBSD.
 
Old 04-13-2011, 01:36 AM   #32
LauMars
Member
 
Registered: Sep 2007
Location: /root/
Distribution: Arch, CentOS, Debian, FreeBSD, Slackware, Solaris, SuSE (Open & SLES)
Posts: 110

Rep: Reputation: 16
Quote:
Originally Posted by jlliagre View Post
What makes you believe having the same hostid for different non virtualized OS instances hosted in a single physical machine and thus running only once at a time is a dangerous practice ?
Well I'm no expert on the difference between export and unmounting in ZFS, but the very fact that you have to use the -f (force) switch to remount screams bad practice to me.

The export and import options were built specifically with migrating ZFS volumes between OSs in mind. So to intentionally avoid that while depending on the volume for your data just strikes me as risky. Particularly on something as complex as ZFS.

Unfortunately I can't find any documentation online (albeit after only a brief search) that goes into the specifics of what happens during a ZFS export, but it is worth baring in mind that ZFS is more than just a file system (in the traditional sense).
In a traditional fs things like the journal transactions are marked completed during the unmount thus come system restart the fs drivers know that each fs write had completed unencumbered (ie there wasn't a power failure). It's reasonably safe to assume that ZFS will do the same during a normal system shutdown. However without documentation stating the difference between umounting and exporting, I wouldn't recommend your method as there's no guarantee that compression, dedupping or even any of the non-fs settings (eg SMB et al) will be written to an internal fs log instead of a log on the OSs own directory structure. Sure, that would be bad practice on the ZFS team, but it's also a huge gamble (ie all of your data) to assume that every "best practice" has been adheared to (after all, ZFS has already made a number of fs experts nervous by bucking a number of trends such as lumping lower level (eg RAID controllers) and high level (eg SMB) in the same fs drivers.

In short, I think it's at least worth raising the question on Oracles forums to see what the difference is between unmount and export. I might be kicking up a s**t storm over nothing, however (in my opinion) forced imported is a large gamble to pay when it's your data at stake.

Quote:
Originally Posted by jlliagre View Post
I didn't wrote that. You missed the "almost".
I didn't. The 'almost' part seemed like a token gesture given the context of the post.
However I was still harsh and the "narrow minded" comment was unnecessary. Sorry.

Quote:
Originally Posted by jlliagre View Post
I wasn't talking about a file system shared on a network, which would be NFS or CIFS with a NAS anyway, not ZFS or whatever, but about a partition containing a ZFS pool that is used by different OSes on a multi-boot configuration, i.e. once at a time.
I know exactly what you were talking about however you didn't read my response correctly. I said if you want a shared ZFS volume then the best practice is a file server. Your method is sharing a file system locally (albeit not simultaneously) using forced imports. My method uses a static ZFS volume with network shares (which could be written into the guests fstab should they want). Both methods ultimately achieve the same result. Granted yours will have better bandwidth but, until the safety of forced imports are cleared up, I feel safer with recommending SMB/SSHFS network shares as opposed to local hostid duplication when sharing ZFS volumes.

After all, the purpose of this thread is to advise, so I personally think it's better to advise best practices than our own experimental hacks (unless of course you have some documentation proving the security of the data using forced imports, which you've not linked to thus far)

Quote:
Originally Posted by jlliagre View Post
Back to your suggestions, you claim ZFS isn't a good choice because "it is not a good 'sharing' file system as it's expected to be only running on one host OS." However, the alternatives you suggest (ReiserFS, FAT32 and NTFS) are also very expected to run on one host OS at a time, and would be quickly destroyed otherwise. Only shared file systems like GFS and OCFS2 support that on Linux but I don't think there is any support for them on FreeBSD.
You're really not reading what I'm saying properly. I'm not talking about simultaneous OS access, I'm purely talking about one file system that gets auto-mounted across difference OSs at different times. I'm talking about having a dual boot OS with a shared partition. This is easy (in fact common practice) with ReiserFS, FAT32 and NTFS however it's not so easy with ZFS as you have to remember to export the volume with every shutdown.

Also, I never once recommended FAT32. In fact I had a whole rant about who crappy FAT32 is.


I seriously think you're best off moving this discussion to Oracles forums because you seem to be getting your wires crossed as to what people are posting as well as good and bad ZFS practices.
 
Old 04-13-2011, 02:59 AM   #33
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Ubuntu, OEL
Posts: 9,163

Rep: Reputation: 238Reputation: 238Reputation: 238
Quote:
Originally Posted by LauMars View Post
Well I'm no expert on the difference between export and unmounting in ZFS, but the very fact that you have to use the -f (force) switch to remount screams bad practice to me.
Please read again my suggestion. I don't have to use the "-f" switch to remount because my server has a single hostid shared by OS instances.
Quote:
The export and import options were built specifically with migrating ZFS volumes between OSs in mind. So to intentionally avoid that while depending on the volume for your data just strikes me as risky.
There is absolutely no risk. This is even the standard way on SPARC hardware where multiple OS instances on a dual/multi boot configuration share the same hostid.
Quote:
However without documentation stating the difference between umounting and exporting, I wouldn't recommend your method as there's no guarantee that compression, dedupping or even any of the non-fs settings (eg SMB et al) will be written to an internal fs log instead of a log on the OSs own directory structure.
The difference between unmounting and exporting is clear to me. Unmount applies to file systems while export applies to ZFS pools. A prerequisite to an export is all file systems involved are unmounted.
Quote:
I didn't. The 'almost' part seemed like a token gesture given the context of the post.
It wasn't a gesture. I certainly recommend other file systems than ZFS to other people and customers depending on the situation. However, this thread is about a file system to be shared between FreeBSD and Linux and ZFS seems to me the best choice.
Quote:
However I was still harsh and the "narrow minded" comment was unnecessary. Sorry.
No problem.
Quote:
I know exactly what you were talking about however you didn't read my response correctly. I said if you want a shared ZFS volume then the best practice is a file server.
I got it but I was confused about your reference to a NAS (or file server) as you are actualy talking about a SAN (or storage server). Sharing a volume on iscsi or similar is indeed a situation where exporting/importing a ZFS pool located on the volume must be done properly and where my hostid hack (or import -f) would be disastrous. A reiserFS, ext2/3/4, UFS or whatever non shareable file system would equally suffer from the same situation, and do not have, as far as I know, any internal mechanism in place to avoid such a situation, unlike ZFS.
Quote:
Your method is sharing a file system locally (albeit not simultaneously) using forced imports.
Again, I do not use forced imports for local file systems. Only for USB devices when I forgot to export the file system at shutdown.
Quote:
My method uses a static ZFS volume with network shares (which could be written into the guests fstab should they want). Both methods ultimately achieve the same result.
These methods are addressing different situations. While I travel a lot with my laptop, I have no mobile NAS.
Quote:
After all, the purpose of this thread is to advise, so I personally think it's better to advise best practices than our own experimental hacks (unless of course you have some documentation proving the security of the data using forced imports, which you've not linked to thus far)
Although I do not use forced imports in my solution, I have no doubt about the security of data present on a ZFS pool that would be forcefully imported.
Quote:
You're really not reading what I'm saying properly.
An reciprocally, at least something we agree on
Quote:
I'm not talking about simultaneous OS access, I'm purely talking about one file system that gets auto-mounted across difference OSs at different times. I'm talking about having a dual boot OS with a shared partition. This is easy (in fact common practice) with ReiserFS, FAT32 and NTFS however it's not so easy with ZFS as you have to remember to export the volume with every shutdown.
so this is exactly what I was talking about to, and I explained how to do it with ZFS without the export/import burden on x86 hardware, just like it works naturally on SPARC one.
Just like multiple OSes on a single machine will share the same ethernet addresse(s), there is nothing wrong with having them sharing the same hostid.
Quote:
Also, I never once recommended FAT32.
I didn't wrote you recommended FAT32, just you were suggesting it as a possible solution, which it always is.

Last edited by jlliagre; 04-13-2011 at 03:03 AM.
 
Old 04-13-2011, 04:12 AM   #34
LauMars
Member
 
Registered: Sep 2007
Location: /root/
Distribution: Arch, CentOS, Debian, FreeBSD, Slackware, Solaris, SuSE (Open & SLES)
Posts: 110

Rep: Reputation: 16
Quote:
Originally Posted by jlliagre View Post
There is absolutely no risk. This is even the standard way on SPARC hardware where multiple OS instances on a dual/multi boot configuration share the same hostid.
Ok, well this was the crux i was trying to get to the bottom of: whether your method was standard practice or a personal hack.

Up until now I'd never heard of sharing the hostid like that on SPARC systems so was surprised to hear anyone suggest such a method. However assuming you're right it does seem a good solution and reasonable grounds to recommend ZFS.

However I'd still like a link to somewhere you read if you wouldn't mind, not because I want to drag this discussion on with further disagreements but purely to further my own knowledge as you've clearly highlighted gaps in it.

Quote:
Originally Posted by jlliagre View Post
The difference between unmounting and exporting is clear to me. Unmount applies to file systems while export applies to ZFS pools. A prerequisite to an export is all file systems involved are unmounted.
You miss the point. You're loading the ZFS pool in each OS thus (from my experience) you've need to export the pool before importing.
However I wasn't aware of hostid sharing on SPARC being a standard work around.

Quote:
Originally Posted by jlliagre View Post
I got it but I was confused about your reference to a NAS (or file server) as you are actualy talking about a SAN (or storage server). Sharing a volume on iscsi or similar is indeed a situation where exporting/importing a ZFS pool located on the volume must be done properly and where my hostid hack (or import -f) would be disastrous. A reiserFS, ext2/3/4, UFS or whatever non shareable file system would equally suffer from the same situation, and do not have, as far as I know, any internal mechanism in place to avoid such a situation, unlike ZFS.
No, I was talking about a NAS where the host OS manages the fs. Not SAN which would suffer the problems you described.
You can't go around assuming I meant something other that what I stated and then use that to prove a point I never argued.

Quote:
Originally Posted by jlliagre View Post
An reciprocally, at least something we agree on so this is exactly what I was talking about to, and I explained how to do it with ZFS without the export/import burden on x86 hardware, just like it works naturally on SPARC one.
Just like multiple OSes on a single machine will share the same ethernet addresse(s), there is nothing wrong with having them sharing the same hostid.
Genuine question, what difference does CPU architecture make? I know ZFS prefers 64bit to 32bit on x86, but I assumed that was down to the 128bit addressing in ZFS. However I'd expect the CPU to be transparent to the fs (ie a more powerful processor will obviously run quicker, but it wouldn't change the administration handling of the fs). I may be just misunderstanding your point about SPARC, but you discuss it as if SPARC ZFS is a different beast to manage

Quote:
Originally Posted by jlliagre View Post
I didn't wrote you recommended FAT32, just you were suggesting it as a possible solution, which it always is.
[/quote]
I didn't even suggest it as a possible solution. Plus now you're just arguing semantics. If you or I suggest a solution, then that's as good as a recommendation (why else suggest it?).
 
Old 04-14-2011, 03:19 AM   #35
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Ubuntu, OEL
Posts: 9,163

Rep: Reputation: 238Reputation: 238Reputation: 238
Quote:
Originally Posted by LauMars View Post
Up until now I'd never heard of sharing the hostid like that on SPARC systems so was surprised to hear anyone suggest such a method.
There is not really a method, it is just the way it works on SPARC hardware. The fact the hostid isn't shared by OS instances on x86 is just due to the lack of hardware persistent general purpose storage with BIOS. Just like the Ethernet hardware address is permanently stored in NICs, SPARC main boards are providing a boot PROM and an NVRAM allowing configuration storage. The hostid is just stored there. On x86 hardware, this hostid is stored on the OS file system using an undocumented method (at least until Solaris source code was open sourced in 2005). When you upgrade the OS, whether regular or live upgrade, the hostid is preserved. However, if you install another OS instance along with the first one for dual booting, a new hostid is created. This is a deficiency that is clearly exhibited in the ZFS pool sharing situation.
Quote:
However I'd still like a link to somewhere you read if you wouldn't mind, not because I want to drag this discussion on with further disagreements but purely to further my own knowledge as you've clearly highlighted gaps in it.
Here is a blog post that explains how the hostid is stored on x86: http://blogs.sun.com/ambiguous/entry/introducing_myself
Quote:
You miss the point. You're loading the ZFS pool in each OS thus (from my experience) you've need to export the pool before importing.
However I wasn't aware of hostid sharing on SPARC being a standard work around.
No. It is a work around on x86, on SPARC, it is just the way it works. Not sharing the hostid on SPARC would require a hack.
Quote:
No, I was talking about a NAS where the host OS manages the fs. Not SAN which would suffer the problems you described.
You can't go around assuming I meant something other that what I stated and then use that to prove a point I never argued.
Then the vocabulary you choose was confusing. In ZFS terms, a "shared ZFS volume" means a zvol (i.e. a dataset providing a raw device) that can be shared through iscsi to remote client(s).
Quote:
Genuine question, what difference does CPU architecture make?
It makes no difference by itself. The limitation comes from the IBM-PC architecture which hopefully has never be used with SPARC but unfortunately still plague x86 hardware.
Quote:
I didn't even suggest it as a possible solution.
Never mind, I was understanding this sentence of yours to mean FAT32 is a possible solution: "reiserfs is supported on both FreeBSD and Linux and would make a better alternative for those who (understandably) don't want to use FAT32."

Last edited by jlliagre; 04-14-2011 at 03:21 AM.
 
Old 04-14-2011, 07:51 AM   #36
LauMars
Member
 
Registered: Sep 2007
Location: /root/
Distribution: Arch, CentOS, Debian, FreeBSD, Slackware, Solaris, SuSE (Open & SLES)
Posts: 110

Rep: Reputation: 16
Interesting stuff (re SPARC). Thank you for taking the time to elaborate, much appretiated

About to go read the link too now...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Will Debian 6 stable have ext4 filesystem? Mr. Alex Debian 10 12-14-2010 07:42 PM
tar.gz of a gnome-panel more stable for debian stable :lol frenchn00b Debian 4 05-07-2008 10:32 AM
LXer: For me, Debian Testing is more stable than Stable LXer Syndicated Linux News 0 04-22-2008 05:20 AM
Need a downgrade from etch/stable to sarge/stable raven Debian 2 06-08-2007 09:43 PM
how can i upgrade my squid 2.5 stable 1 to stable 3 in RH9? debloxie Linux - Networking 0 05-12-2004 08:49 PM


All times are GMT -5. The time now is 07:22 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration