View previous topic :: View next topic |
Author |
Message |
Paczesiowa Guru
Joined: 06 Mar 2006 Posts: 593 Location: Oborniki Śląskie, Poland
|
Posted: Sat Jan 31, 2009 9:35 pm Post subject: hibernation on diskless machine - possible? |
|
|
hi,
is it possible to have diskless (nfs root) machine that can hibernate? I think it would work, but I don't want to try and find out later that first couple times I got lucky and then, I'm out of luck and whole fs gets corrupted. I heard that hibernating with mounted readonly media can work (even if files change during sleep) if you sync and drop caches before suspending, would it work for things mounted rw (and being written all the time)?
thanks in advance. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23066
|
Posted: Sun Feb 01, 2009 1:15 am Post subject: |
|
|
It is acceptable to hibernate while a filesystem is mounted read-write if the hibernating machine is the only thing that writes to that filesystem, and thus the filesystem does not change between hibernation and resume. Since this restriction is imposed primarily by the fact that the hibernated image retains details about the filesystem, and does not discard them on resume, it might not apply for NFS mounted systems. The client can probably cope with the NFS server changing files while the client sleeps, since such changes can happen without notification while the client is awake, too. However, I have not tested this. What type of diskless system do you have that hibernation is worth the effort over a simple halt? Most diskless devices have such a simple purpose that rebooting them is an acceptable alternative. |
|
Back to top |
|
|
Paczesiowa Guru
Joined: 06 Mar 2006 Posts: 593 Location: Oborniki Śląskie, Poland
|
Posted: Sun Feb 01, 2009 12:10 pm Post subject: |
|
|
I put hdd from my desktop machine to my server (in another room) because it was too noisy. hibernation is nice for not losing all terminals with running things inside. so if I export on server my whole disk as a single mountpoint it should work? how would I secure it from other things on server? file permissions have to be not so secure, so that non-root users on client can work with them. how about other alternatives than nfs? |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23066
|
Posted: Sun Feb 01, 2009 6:03 pm Post subject: |
|
|
Paczesiowa wrote: | so if I export on server my whole disk as a single mountpoint it should work? |
Give it a try.
Paczesiowa wrote: | how would I secure it from other things on server? |
You could use virtualization, paravirtualization, or possibly the namespace support.
Paczesiowa wrote: | file permissions have to be not so secure, so that non-root users on client can work with them. |
Why do permissions need to be changed at all? If the client and server use the same user IDs, users should have access to the same content whether the disk is local or remote.
Paczesiowa wrote: | how about other alternatives than nfs? |
Run VNC on the server, so all the terminals are on the server. Your desktop would run just an X server and VNC viewer, so there would be no meaningful state lost on shutdown. Alternately, get a quieter hard drive. This seems like a lot of work to combat a little noise pollution. |
|
Back to top |
|
|
jordanwb l33t
Joined: 10 Jul 2008 Posts: 642 Location: Ottawa, Canada
|
Posted: Mon Feb 02, 2009 11:12 pm Post subject: |
|
|
How about using a flash drive for hibernation? |
|
Back to top |
|
|
Paczesiowa Guru
Joined: 06 Mar 2006 Posts: 593 Location: Oborniki Śląskie, Poland
|
Posted: Tue Feb 03, 2009 2:01 pm Post subject: |
|
|
you mean one of those ssds? can't afford one now unfortunately.
I'll try tonight with ata over ethernet - if I can get it to work there shouldn't be any corruption problems possible. |
|
Back to top |
|
|
szczerb Veteran
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Tue Feb 03, 2009 2:26 pm Post subject: |
|
|
I think he meant a normal pendrive or a CF card. |
|
Back to top |
|
|
Paczesiowa Guru
Joined: 06 Mar 2006 Posts: 593 Location: Oborniki Śląskie, Poland
|
Posted: Tue Feb 03, 2009 3:20 pm Post subject: |
|
|
but how would I "use" it for hibernation? I'd have to put / and /home/ there, which would kill it pretty quickly. |
|
Back to top |
|
|
szczerb Veteran
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Tue Feb 03, 2009 3:23 pm Post subject: |
|
|
You just make a swap partition and hibernate to it. (at least that's the basic idea...) |
|
Back to top |
|
|
Paczesiowa Guru
Joined: 06 Mar 2006 Posts: 593 Location: Oborniki Śląskie, Poland
|
Posted: Tue Feb 03, 2009 4:35 pm Post subject: |
|
|
it it not a technical problem with swap partition. the real problem is that my hibernated system has opened handles to files that can disappear after resume (that's why they tell you not to hibernate with mounted windows partition, if you are going to use windows. but it's much worse when you leave / mounted rw) or change location on disk layout and when I resume my new kernel will probably corrupt something. |
|
Back to top |
|
|
szczerb Veteran
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Tue Feb 03, 2009 4:42 pm Post subject: |
|
|
How can an nfs share change the disk layout? Does it have a disk layout at all? |
|
Back to top |
|
|
Paczesiowa Guru
Joined: 06 Mar 2006 Posts: 593 Location: Oborniki Śląskie, Poland
|
Posted: Tue Feb 03, 2009 4:54 pm Post subject: |
|
|
I don't know and that's the problem:) |
|
Back to top |
|
|
szczerb Veteran
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Tue Feb 03, 2009 5:13 pm Post subject: |
|
|
What would happen if you just unmounted the share on hibernation and mounted on resume? |
|
Back to top |
|
|
Paczesiowa Guru
Joined: 06 Mar 2006 Posts: 593 Location: Oborniki Śląskie, Poland
|
Posted: Tue Feb 03, 2009 5:29 pm Post subject: |
|
|
try it:>
umount / |
|
Back to top |
|
|
szczerb Veteran
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Tue Feb 03, 2009 6:33 pm Post subject: |
|
|
Yeah...basicaly that's why I used the "What would happen if ... ?" syntax
But isn't it a bit different during hibernation? |
|
Back to top |
|
|
x22 Apprentice
Joined: 24 Apr 2006 Posts: 208
|
Posted: Wed Feb 04, 2009 11:15 am Post subject: |
|
|
Disk layout is controlled exclusively by NFS server so no FS corruption can happen this way.
What can happen is client seeing stale data or getting "ESTALE" errors. This risk can be eliminated if you make sure that the files which are mounted through NFS are not modified by the server or another NFS client. |
|
Back to top |
|
|
szczerb Veteran
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Wed Feb 04, 2009 12:37 pm Post subject: |
|
|
So basicaly he needs to unmount all shares other than / /home etc. and keep the server on a UPS, right? |
|
Back to top |
|
|
|