Article View: aus.computers.linux
Article #529Re: Where to put my files?
From: Moe Trin
Date: Wed, 31 Oct 2012 03:02
Date: Wed, 31 Oct 2012 03:02
84 lines
4923 bytes
4923 bytes
On Tue, 30 Oct 2012, in the Usenet newsgroup aus.computers.linux, in article
<k6mv7o$kuu$1@dont-email.me>, Jordan wrote:
Hmmm... no replies yet?
>I'm new (ish) to Linux, using Ubuntu.
>How compulsory is the default folder structure?
It's your system, you can do as you wish. But in reality, there is
a relative standard way of doing things - battle tested over 30+ years
of the UNIX operating systems. You might want to start with the
"Filesystem Hierarchy Standard" from http://www.pathname.com/fhs/ and
an explanatory guide named "Linux Filesystem Hierarchy" available from
http://tldp.org/guides.html.
>I'm running out of space on my hard drive.
Do you know why (found a bunch of neat stuff to download, or didn't
plan ahead to be doing so) or is it another mystery?
>Anything wrong with placing my stuff on another one?
Nothing at all. More experienced users may intentionally divide
things up such that /home/ is located on a different partition of the
same drive, or on a separate drive entirely. The rational is that
the installer program used when you update/replace your current
version can do it's thing on the main Linux partition, and it won't
mess with other partitions/disks so you have all of "your" files and
stuff on the new one.
[fermi ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 33661668 3384696 28567052 11% /
/dev/sda2 150205500 1793556 140781876 2% /home
tmpfs 1993988 380 1993608 1% /dev/shm
[fermi ~]$ ls /
bin dev home lost+found mnt opt root selinux sys usr
boot etc lib media net proc sbin srv tmp var
[fermi ~]$ grep sda /etc/fstab
/dev/sda1 / ext3 defaults 1 1
/dev/sda2 /home ext3 defaults 1 1
/dev/sda3 swap swap defaults 0 0
[fermi ~]$
What I did here is to install on the first partition. There is an
EMPTY directory called /home on that partition. The second line in
/etc/fstab shown causes the second partition with all of my users and
user files and stuff to be mounted automatically at boot in that
empty point - and now when I look in /home/ibuprofin/ I find all of
my stuff. This is essentially the only changes needed. The entry in
the password file is "normal"
[fermi ~]$ grep ibuprofin /etc/passwd
ibuprofin:x:504:100:Moe Trin:/home/ibuprofin:/bin/bash
[fermi ~]$
so everything is transparent. The other (normal) users on the system
also have their directories on /dev/sda2 which has a directory
structure like
home/user1 ---> and all of that user's stuff
home/user2 ---> and so on
What I did to make the change was to
1. use mkfs.ext3 to create a filesystem on the new place (same
idea as "format d:")
2. mount the new partition TEMPORARILY in /mnt (command syntax is
"mount /dev/sda2 /mnt")
3. Move all the stuff from /home/* to /mnt/* keeping the same
directory structure - many ways to do that
4. UNmount the new partition ("umount /dev/sda2")
5. mount the new partition over the "old" /home ((command syntax is
"mount /dev/sda2 /home")
6. edit /etc/fstab and add the line telling the system to mount the
new partition as shown above.
>Am I making sense?
Yup - except we don't call them "folders" - that's a windoze term
stolen from the Macintosh operating system who in turn stole it from
Xerox in the early 1980s. They're called "directories". ;-)
Old guy
Technical Details
Message-ID:
<slrnk9156r.nea.ibuprofin@fermi.phx.az.us>Path:
arc1-ca.pugleaf.net!q13ni110735wii.0!nntp.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!217.73.144.44.MISMATCH!feeder.ecngs.de!ecngs!feeder2.ecngs.de!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mailReferences:
<k6mv7o$kuu$1@dont-email.me>Show Full Headers
Complete Article Headers
X-Google-Thread: 102983,4fb20033bd521a82
X-Google-NewGroupId: yes
X-Google-Attributes: gidcfc73a2246,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.180.91.231 with SMTP id ch7mr14498wib.1.1351652573426;
Tue, 30 Oct 2012 20:02:53 -0700 (PDT)
Path: arc1-ca.pugleaf.net!q13ni110735wii.0!nntp.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!217.73.144.44.MISMATCH!feeder.ecngs.de!ecngs!feeder2.ecngs.de!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From: Moe Trin <ibuprofin@painkiller.example.tld.invalid>
Newsgroups: aus.computers.linux
Subject: Re: Where to put my files?
Date: Wed, 31 Oct 2012 03:02:53 +0000 (UTC)
Organization: You have GOT to be kidding
Lines: 84
Message-ID: <slrnk9156r.nea.ibuprofin@fermi.phx.az.us>
References: <k6mv7o$kuu$1@dont-email.me>
Mime-Version: 1.0
Injection-Date: Wed, 31 Oct 2012 03:02:53 +0000 (UTC)
Injection-Info: mx04.eternal-september.org; posting-host="147c9d506b11406671f4cf6e049b7603";
logging-data="27204"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+66Bo1CZBKzcS/B9qJAdRvGMSiZrlhNNE="
User-Agent: slrn/0.9.9p1 (Linux)
Cancel-Lock: sha1:iz71Sh9+/HfkQq5V4IftQFsFZxc=
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit