Quote:
Originally Posted by textillis
1. Please, could people share their thoughts on:
- the best way to structure one's file system before starting to download tar balls and making a mess everywhere.
2. An important associated question:
- when creating such a file structure, how do I make sure that it is owned by both me and root?
Tex
|
Usually, you need 3 partitions to hold a Linux operating system on a workstation.
/ that receives the operating system proper (kernel, executables, libraries, documentation etc...) typically 10 Gb for a workstation.
/home that will receive the user files.
a swap partition (twice your RAM in size: bigger is normally useless).
/ and /home will have to be mounted at boot time (entries in /etc/fstab).
You can create a single large / partition instead of / and /home, but it is not practical when you upgrade the system since it will force you to restore the user files from backups. Concerning the filesystems you can use,
you have the choice between ext3/4, jfs, xfs and btrfs. I would not recommend btrfs as it is still an experimental filesystem. ext3/4 is the standard linux journaling filesystem. It is very reliable and supported by all Linux distributions.jfs is another journaling filesystem provided by IBM and used on AIX. It is said to be less demanding in terms of CPU power. xfs is a third journaling filesystem provided by SGI and used on Irix. It demands more memory, but is good for large files. One inconvenient is that you can only enlarge xfs partitions, but you
can't shrink them. A common inconvenient of jfs and xfs is that they are not all supported by all Linux distributions. In particular, RedHat Linux and its derivatives (CentOS, Scientific Linux) only support xfs in
the 64-bit version. If for some reason you have to replace Slackware with one of those distros, you will be forced
to reinstall /home from backups if you used jfs or xfs. For that reason, I would recommend you to use ext4 or ext3
for your / and /home unless you have some special needs to work with very large files or spare your CPU power. In that case use xfs or jfs for /home and leave / as ext3/4.
/ and /home are owned by root. You add users with the adduser command. A directory owned by the user will be created under /home. root can access any file on the system, so there is no need to add root as owner. If you
need finer control on file access, you may use ACLs (supported on ext3/4, jfs and xfs).
If you are going to use linux on flash devices, you should not use any journaling filesystem (jfs,xfs,ext3/4). Flash devices die after a rather small number of writes compared to magnetic devices so you don't want Linux
to write constantly to a journal file. A simple option is to use ext2 format on these devices, or if you don't
need to preserve permissions, user and group, vfat. There are also some optimized filesystems for those devices (yaffs, etc...).
If you are thinking of a server configuration, you should add a /tmp and a /var partition. These partitions must be sufficiently large not to get filled by the normal operation of your server. Again, the choice of xfs, jfs or ext3/4 depends on your particular needs.