- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: migrate /var into nfs server
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2009 04:08 AM
тАО07-03-2009 04:08 AM
migrate /var into nfs server
this is interesting task i need to do for one of my linux server, its redhat EP 4, i need to move /var in to nfs due to some space issue,
i had created nfs drive and put entry in fstab.
and rebooted server but it does not work as /var is require to write some logs and other stuff, it just stop in half boot,
i think i need to change system path which are pointing to /var to write messages, while booting,
anybody having any good suggestion,
surely assign point for each reply and full point for correct answer,
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2009 04:42 AM
тАО07-03-2009 04:42 AM
Re: migrate /var into nfs server
check on wich runlevel is nfs client starting,
you could change the startup prioriy with the start scripts.
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2009 05:13 AM
тАО07-03-2009 05:13 AM
Re: migrate /var into nfs server
This is not a good idea.
Problem is the system wants to mount /var and start writing files to it before it starts the NFS client.
So where will all that output go?
To the root fs. Then when /var mounts on NFS you won't even be able to see or erase this output because there will be a file system mounted on /var
I call this the old hidden file trick.
Better strategy:
cd /var
du -sk | sort -rn | more
Identify a big directory.
See what is in it.
Lets say /var/log/httpd is huge.
You can safely move /var/log/httpd to NFS without doing yourself in with the old hidden file trick.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2009 07:28 AM
тАО07-03-2009 07:28 AM
Re: migrate /var into nfs server
i have no other choise need to migrate it in nfs
any other clue?
as steven mentioned while booting up system want to write some files in /var and nfs will mount later so i can just change fstab and boot up system?
appricate any other suggestion here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2009 07:49 AM
тАО07-03-2009 07:49 AM
Re: migrate /var into nfs server
Again:
cd /var
du -k | sort -rn | more
Pick three big directories.
say
/var/log/httpd
/var/log
Create nfs mount and make:
/var/log/httpd
/var/log
file systems located on nfs
mount -t nfs server:/path /var/log
now its on nfs.
Copy the data out first.
Please read the hidden file trick remakrs carefully. Moving all of /var will eventually lead to a clogged and potentially filled / filesystem.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2009 05:44 PM
тАО07-03-2009 05:44 PM
Re: migrate /var into nfs server
as i mentioned i have no choise i need to migrate i have few other reason to migrate it not only space,
please advice if you have any other better suggestion, how i can boot my system to point out nfs /var while it trying to write some files in booting period thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2009 05:55 PM
тАО07-03-2009 05:55 PM
Re: migrate /var into nfs server
If, for some other reason you haven't explained, it is mandatory that /var be NFS mounted, then you'll need to do a lot of research. At a minimum, you'll need to replace /var/run (on both the local file system and on the NFS mounted /var) with a symbolic link to something like /var_local/run, on local storage mounted before any of the other startup scripts run. Change the netfs startup script to run immediately after the nfslock startup script (you may need to renumber, e.g., the mdmonitor script so that it runs after netfs). All the script renumberings will be subject to reversal if you ever apply patches to the packages owning the startup scripts, so be ready to deal with that. Read /etc/rc.d/rc.sysinit and all the other startup scripts preceding netfs, and note where they attempt to use /var, replacing any file or directory mentioned with a symlink such as that for /run. Keep detailed notes as you do all this on a test system, so that you haven't broken the production system while discovering all the little pieces you missed. I run a virtual machine hosted by my laptop for just this kind of research. Even better, write a script that performs all the changes, so that you can test the script on your test image - programs are less likely to miss a step than humans.
Now that you have an idea what you're in for, consider Mr. Protter's advice again ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2009 01:18 AM
тАО07-04-2009 01:18 AM
Re: migrate /var into nfs server
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1346628
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2009 05:16 PM
тАО07-04-2009 05:16 PM
Re: migrate /var into nfs server
i may create one folder call /n-var and do link here so while bootup system can write all files here, what you guys think, thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2009 08:16 PM
тАО07-04-2009 08:16 PM
Re: migrate /var into nfs server
Why bother thinking, just create symlinks for every directory under /var and see which are changed.