Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

Need sample /etc/fstab for rhel5 or rhel4

SOLVED
Go to solution
Michael Steele_2
Honored Contributor

Need sample /etc/fstab for rhel5 or rhel4

10 points to the first copy and paste of an /etc/fstab from rhel5 or rhel4, fully configured with all standard mount points and tags.

Thanks!
Support Fatherhood - Stop Family Law
3 REPLIES
Matti_Kurkela
Honored Contributor
Solution

Re: Need sample /etc/fstab for rhel5 or rhel4

x86, Itanium or something else? LVM or not?

RHEL5:

https://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.4/html/Installation_Guide/ch04s19s04s02.html

suggests that in x86, there would be just /boot, swap and the root filesystem, unless a customized configuration was used.
I seem to recall that RHEL5 uses LVM by default.

So the default /etc/fstab on RHEL5 would look like this:

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0

We always use a customized LVM layout so I had to reconstruct this based on RedHat manuals.

------------
If you have lost your /etc/fstab for some reason and the system is still running, look into /proc/mounts and /proc/partitions: these can be very helpful in reconstructing /etc/fstab.

MK
MK
Michael Steele_2
Honored Contributor

Re: Need sample /etc/fstab for rhel5 or rhel4

Thanks!

What does your custom layout look like?
Support Fatherhood - Stop Family Law
Matti_Kurkela
Honored Contributor

Re: Need sample /etc/fstab for rhel5 or rhel4

First, I see no benefit in CamelCasing VG/LV names. I prefer lower-case /dev/vg*/lvol* style, like in HP-UX.

Second, with modern disks I round partition/LV sizes to the nearest GB, except for /boot. No reason to micro-manage.

1st primary partition: /boot (250 - 500 MB is plenty)

2nd primary partition: RHEL <5 diskdump area if necessary and supported.
With RHEL 5, this is no longer needed: kdump can write the dump on LVM too.

The rest of the disk is given to LVM.

/dev/vg00/lvol0: swap. Size according to the amount of RAM & sanity.

/dev/vg00/lvol1: root filesystem.
- includes /usr, so this should be fairly large. I've found 4 GB to be a good starting point. RHEL5 full installation requires about 5 GB, but we *don't* generally do full installations. We install the bare minimum of packages + whatever is required by the role of this server.

/dev/vg00/lvol2: /var filesystem.
- this includes /var/tmp, /var/spool and RPM package cache, so this can become big. 4 GB or more; especially if this is a high-volume mail or print server.
- NOTE: this requires the actions listed in http://kbase.redhat.com/faq/docs/DOC-17650 if the system is in a SAN environment.

/dev/vg00/lvol3: /tmp filesystem.
- at least 1 GB. Rationale: if you need to image mount an .iso image of a CD (about 700 MB), it can fit here with ease.

/dev/vg00/lvol4: /opt filesystem.
- role-specific, usually at least 2 GB to fit our standard monitoring agents etc.

/dev/vg00/lvol5: /usr/local filesystem.
- 2 GB is usually plenty.

/dev/vg00/lvol6: /home filesystem.
- 4 GB as a rule of thumb.
- can be smaller if you know there won't be active users (e.g. the system is a NTP server or something equally simple)
- this can become a separate VG if there are lots of active users with big stuff in their home directories (e.g. development systems)

Major applications and their data goes to their own VG(s) whenever possible.

If the OS needs to be reinstalled (or even changed to a different Linux distribution!) but the applications and/or user data must be saved, this layout makes it easy.

The installer is told to use the existing partitioning, mount /dev/vg00/lvol1 as root, /dev/vg00/lvol2 as /var and primary partition 1 as boot (and nuke their existing content) and ignore the rest.

After the OS reinstallation is completed and /etc configuration is restored, just add the other LVs back to /etc/fstab, mount them and you're back in business.

MK
MK