VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Pages: 1 [2]

Author Topic: Controling HD partition information  (Read 4445 times)

uelsk8s

  • Administrator
  • Vectorian
  • *****
  • Posts: 2504
Re: Controling HD partition information
« Reply #15 on: December 27, 2007, 01:03:01 pm »

good idea freston

Reb can make a dir on /dev/sda2
Code: [Select]
mkdir /home/GAMESthen mount that dir in /usr/local/games
Code: [Select]
mount -o bind /home/GAMES /usr/local/gamesnow anything installed to /usr/local/games is actually residing on /dev/sda2.

a problem with that that i can foresee is that anything in  /usr/local/games before the mount is hidden by the mounted dir.
like this
Code: [Select]
root:# ls /usr/local/games/
KKD/
root:# mount -o bind /mnt/hdd2/GAMES/ /usr/local/games
root:# ls /usr/local/games/
ut2004/
root:# umount /usr/local/games/
root:# ls /usr/local/games/
KKD/
Logged

reb

  • Vectorite
  • ***
  • Posts: 136
  • The BOSS
Re: Controling HD partition information
« Reply #16 on: December 27, 2007, 02:27:43 pm »

Well Alright !!

bigpaws:
Freston:
uelsk8s:

Between the three of yu, I think I'm beginning to see a lot more of the whole Linux picture.  I have to admit that the linux hierarchy is quite different from that in ms-win.  However to make a short story longer,  I will try the suggestions  Freston and uelsk8s pointed out and see how it works.  I'm in a learning situation now anyway.  I have already re-loaded VL twice, so no matter what happens, if it works I'm ahead of the game, if it doesn't I just reload VL linux.   :D  So I see it as a win win situation.  One way or another I will learn a lot more. 

Give me some time to work on this and I'll get back to yu.   Thanks bunches.

reb
Logged
Ye Ole Montana Saddle Tramp
Nothing is right or wrong, good or bad, only thinking makes it so.  Think about it.
Running a Vector Linux VL3300 with 1 SATA 80GB HDD and 1GB DDR 400 ram, DVD+-RW , and VL 5.9 Delux

reb

  • Vectorite
  • ***
  • Posts: 136
  • The BOSS
Re: Controling HD partition information
« Reply #17 on: December 27, 2007, 03:40:30 pm »

OK, :
Before I go and make any changes,  would, or would it not, be advantageous to go ahead and resize my partitions now since my sda1 is already just about full.  I ask that because in the future if I need more space in sda1, wouldn't it be better to make some more room now, rather then wait, or just wait till I need more room, an then add what I need.

You guys have a lot more experience in these matters than I.   So once again, I am open to suggestions. :D

reb
Logged
Ye Ole Montana Saddle Tramp
Nothing is right or wrong, good or bad, only thinking makes it so.  Think about it.
Running a Vector Linux VL3300 with 1 SATA 80GB HDD and 1GB DDR 400 ram, DVD+-RW , and VL 5.9 Delux

Freston

  • Vectorite
  • ***
  • Posts: 165
Re: Controling HD partition information
« Reply #18 on: December 27, 2007, 05:05:31 pm »

Quote from: uelsk8s
a problem with that that i can foresee is that anything in  /usr/local/games before the mount is hidden by the mounted dir.
Yeah, that is one of the things I am afraid off. But that is easily solved by adding en entry in fstab. The best time to solve problems is before login (which applies equally well to marriage ;))
One other thing also is what happens to all data already present in /usr/local/games. It will remain present, but it wont get moved to the /dev/sda2 partition. I never looked into that. It'll keep under sda1, that I know... and new data gets written to sda2. But what if there is a config file or a safe file (some games do have 'm ;)) that gets written to. Will that change partition? And now we're discussing file system theory (at least as far as I'm concerned).

Quote from: reb
Before I go and make any changes,  would, or would it not, be advantageous to go ahead and resize my partitions now since my sda1 is already just about full.  I ask that because in the future if I need more space in sda1, wouldn't it be better to make some more room now, rather then wait, or just wait till I need more room, an then add what I need.
That is a very good question, and I'm glad you ask it before you make changes (I didn't say "proceed with caution" for nothing ;)) You will manually have to lift all your files off of sda1 and put them on sda2. If that makes enough room then there is no need to repartition.

In my experience it's best to have a root partition of 7.5GB. That is the perfect size for when I run a PC the way I want it. But the computer I'm running of right now has a hard disk of 4GB... And it's half empty. So it's very personal how you partition your disk. With a 6GB root, and a huge sda2, I would still repartition even though that takes longer than the mounting scheme we just set up. Or do them both ;)

But as I said, it's very personal.
« Last Edit: December 27, 2007, 05:07:21 pm by Freston »
Logged

GrannyGeek

  • Packager
  • Vectorian
  • ****
  • Posts: 2567
Re: Controling HD partition information
« Reply #19 on: December 28, 2007, 07:03:44 pm »

I never bother with multiple partitions. I use a swap partition of about 512 megs and make all the rest into / . Home is a directory off root (/). This way I don't have to worry about running out of room on one partition and having too much on another.

As I see it, the best reason for having /home as a separate partition is to preserve your settings and data in the event you reinstall or install a new version of Linux. I achieve the same thing by using an external hard drive formatted with a Linux file system. You *must* have a partition formatted with a Linux file system on the external hard drive if you want to preserve permissions and file ownership the easy way. I simply copy my /home onto the external drive as user, then I su to root and copy other files I want to have for reference (some in /etc, some in /opt, some in /usr). After I install or reinstall, I copy 'em back as desired.

You'd better have USB2 for this (or FireWire), because USB 1.1 is WAY too slow. Intall a USB2 card in a PCI slot if you don't have USB2 on the motherboard.
--GrannyGeek
Logged
Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller

reb

  • Vectorite
  • ***
  • Posts: 136
  • The BOSS
Re: Controling HD partition information
« Reply #20 on: December 31, 2007, 07:17:18 pm »

GrannyGeek, thanks for this input.  I would have gotten back to you sooner, but the holidays got in my way.  ;)

I like the overall concept of separating the operating system from data in order to avoid disastrous loss of data.  I can pretty well see what you have done, but I'm not clear on the details of how to do it because I'm still fuzzy on the overall hierarchy of the linux tree.  I still have a couple of tweaks and wrinkles to iron out before I can work on this.  Please let me get back to you later on this.   :)

reb
Logged
Ye Ole Montana Saddle Tramp
Nothing is right or wrong, good or bad, only thinking makes it so.  Think about it.
Running a Vector Linux VL3300 with 1 SATA 80GB HDD and 1GB DDR 400 ram, DVD+-RW , and VL 5.9 Delux

LeeDB

  • Member
  • *
  • Posts: 33
Re: Controling HD partition information
« Reply #21 on: December 31, 2007, 10:07:44 pm »

Hi all,

I like Freston's suggestion of using symlinks.  My work laptop has an encrypted home partition, but the root is not.  Recently I wanted a few of the directories in the root partition to be encrypted, and the easy way to solve it was to move the original directories from the root to a location of choice in the home, and then create symlinks in the root that pointed to the home locations.

Assuming for this example the games are installed in /usr/local/games, one could do the following to move the existing files to the home directory, which is in the spacious partition, and then create a symlink in the original location so that any programs that look for data in /user/local/games will still find it.

At a command line with root privileges:

mv /usr/local/games /home/games

ln -s /home/games /usr/local/games

My work laptop is running openSUSE, but I just tested the above in VL 5.9, and it worked.

You can do this with multiple directories in case your programs were installed in multiple locations in your root partition.
Logged
Pages: 1 [2]