Storage Partition - So Glad I Did It

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
red-e-made
Level 5
Level 5
Posts: 526
Joined: Sat Jul 14, 2007 11:31 am

Storage Partition - So Glad I Did It

Post by red-e-made »

As I'm always looking for new things to do with my machine, I recently explored the idea of setting up a separate partition for my Home directory. I read different pros and cons about this, which I won't get into, and in the end decided against it. However, I *did* decide on creating a 10GB partition to be used solely for backing up data.

Using the LiveCD, logging in as root and opening gparted (as per usual), I shrank /dev/sda1 by 10GB and created a new ext3 (same as my file system) partition with the 10GB a space created that became /dev/sda3. Upon rebooting without the LiveCD, I changed the permissions of the new partition so I can read and write on it with ease.

What I love about this is, the flash drive I've been using to back everything up can now be put to better use. Data writes to the new partition a lot faster than the flash drive, I can adjust how much or little space I want for it, it doesn't mount automatically when I start the machine but I can see it whenever I save anything so I can save it in two partitions simultaneously. I also reckon this is going to save me a lot of time with the next install. It's one of the best decisions I've ever made with this system.

How about you all? Has anyone else tried this? What advantages or disadvantages do you think there is to doing this?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Fred

Re: Storage Partition - So Glad I Did It

Post by Fred »

red-e-made,

There are all kinds of options available to you.

Read my post in the thread below first for a little background.

http://www.linuxmint.com/forum/viewtopi ... 90&t=11447

Then read my long post about half way down the page in this thread. Maybe that will give you a few more ideas. :-)

http://www.linuxmint.com/forum/viewtopi ... a&start=15

Here is another thread, below, that has some good information in it.

http://www.linuxmint.com/forum/viewtopi ... &sk=t&sd=a

If you are interested in what a multi-distro boot set-up would look like using something similar to this look at my post below.

http://www.linuxmint.com/forum/viewtopi ... 3&start=30

If you use a small compact / (root) partition even without separate home or boot partitions, and put your data on separate partitions, it will be faster also. The bigger a partition is the slower it is. Between 10 - 15 Gig for the whole install, not counting data and swap is plenty of space. You probably won't live long enough to fill up that much space using it as a general desk top. Most of your growth will be in your data partitions.

Fred
Last edited by Fred on Wed Apr 16, 2008 8:38 pm, edited 2 times in total.
red-e-made
Level 5
Level 5
Posts: 526
Joined: Sat Jul 14, 2007 11:31 am

Re: Storage Partition - So Glad I Did It

Post by red-e-made »

Fred, whoah! Now that's a wellspring of valuable information. Multi-distro boot set-ups are not quite on my to-do list yet, but I did find the entry about back-ups intriguing (http://www.linuxmint.com/forum/viewtopi ... a&start=15). Do I understand correctly that those instructions can enable something saved to automatically back itself up in a separate partition?
Fred

Re: Storage Partition - So Glad I Did It

Post by Fred »

red-e-made,

All your data will live in separate partitions. So even if you destroy your system, the data will be safe on its' own partition. Of course you could have a backup partition too and duplicate the most valuable data on another partition.

Fred

EDIT: The first link I gave you is the most important one. Until you get your head wrapped around the concepts described there, you won't ever understand what I am really doing in the other threads.
red-e-made
Level 5
Level 5
Posts: 526
Joined: Sat Jul 14, 2007 11:31 am

Re: Storage Partition - So Glad I Did It

Post by red-e-made »

All your data will live in separate partitions. So even if you destroy your system, the data will be safe on its' own partition. Of course you could have a backup partition too and duplicate the most valuable data on another partition.
That was exactly my intention in setting up the 10GB partition, so that's good to know. To be more clear, what I meant was: is it possible to create a symbolic link between two separate partitions so that data saved to one (images, video, what have you) saves to the other simultaneously? Yes, I am still learning. I'll read the first link more closely. Thanks again for the info.
red-e-made
Level 5
Level 5
Posts: 526
Joined: Sat Jul 14, 2007 11:31 am

Re: Storage Partition - So Glad I Did It

Post by red-e-made »

Fred wrote:If you use a small compact / (root) partition with no separate home or boot partitions, and put your data on separate partitions, it will be faster also. The bigger a partition is the slower it is. Between 10 - 15 Gig for the whole install, not counting data and swap is plenty of space. You probably won't live long enough to fill up that much space using it as a general desk top. Most of your growth will be in your data partitions.
Ah, now that's interesting, too: a smaller partition is a faster one! A project for the morning :)
Fred

Re: Storage Partition - So Glad I Did It

Post by Fred »

red-e-made,

You could create another folder and mount it to the same partition but call it something else... like "Backup" but it would be just an illusion. It would just be two windows or portals to the same partition. You can't mount two partitions to the same folder so you can write to them both at the same time.

I am sure there is a utility around somewhere that would automatically sync two folders on some time schedule or some event, I just can't think of one right now. It wouldn't be that difficult to write a small shell script to do that however.

Fred
Last edited by Fred on Wed Apr 16, 2008 9:42 pm, edited 1 time in total.
red-e-made
Level 5
Level 5
Posts: 526
Joined: Sat Jul 14, 2007 11:31 am

Re: Storage Partition - So Glad I Did It

Post by red-e-made »

OK just one more thing. I'd like your thoughts on this, since you seem to really know what you're talking about here.

I was trying to come up with a way to avoid saving something twice - in the home folder and in the back-up partition. I decided to go with a symbolic link. I mounted the back-up partition, made a folder "Data" inside it, and ran for example:

Code: Select all

ln -s /media/disk/Data portal
This of course created a folder in my home folder called "portal" which linked to a folder called "Data" in the back-up partition. Save an image to "portal" and it's there as well as in "Data" (provided the volume is mounted). But I noticed that if I deleted "portal" and its contents with it, those contents remained in "Data", even after rebooting.

After reading some more of your posts, I think I'm going to do a fresh install, make a small / (root) partition, and then a few data partitions with room to spare, but I thought this symbolic linking thing was an interesting way to save data in two different partitions at once.
Fred

Re: Storage Partition - So Glad I Did It

Post by Fred »

red-e-made,

What you are saying is what I was talking about as far as an illusion. You are passing the info to a folder that is bound to a data partition. That is where it is stored. A folder is nothing unless it is mounted to something. If you create a folder in home you are automatically mounting it to the partition that your user name is mounted to. If you make a link to another folder that is bound to another partition you are not storing anything in home. A link can't be mounted. It just points to a folder somewhere that is mounted to a partition. Does that make sense?

You could have a /home/fred folder mounted to sda5 and have two links and three folders in that directory, all pointing to or mounted to different partitions, none of which has to be sda5.

Fred
Fred

Re: Storage Partition - So Glad I Did It

Post by Fred »

red-e-made,

Let me try again to make this clearer. I am not very good at explaining things sometimes.

When we mount / (root) to a partition, / (root) and all the folders under it are mounted to that partition also, including /home/fred and all the files under it. Lets call the partition it is mounted to sda5.

If we create a folder in /home/fred called "My_data" it too would be automatically mounted to sda5, along with any folders we create under it, like "Music," "Pictures," or whatever.

Now if we had decided instead that we wanted to mount /home/fred/My_Data to sda6, we could have done that. If we had done that all the folders and files in "My_Data" would have existed on sda6, even though the icon itself for "My_Data" would be on sda5.

If on the other hand we had created a link in /home/fred/ called "Portal" that pointed to a folder in /mnt/media called "My_Data" that was mounted to sda7, all the folders and files in "My_Data" would be stored on sda7. The icon for "My_Data" would be on sda5 as would the icon for the link in /home/fred called "Portal." Putting data in "Portal" would put it into sda7 because that is where /mnt/media/My_Data is mounted.

We can make these mounting decisions automatically take effect on boot by putting the appropriate entry into a file called /etc/fstab. This would be what is called making it persistent. This file keeps us from having to manually mount all the folders in the file system each time we boot. Remember, the file system is not tied to any storage until it is done on boot, either manually or automatically. Linux does not recognize drives or partitions. We must tell it were its' file tree folders exist and also what storage partition each of those folders is tied or mounted to.

Now..... do I have you totally confused? lol

Fred
red-e-made
Level 5
Level 5
Posts: 526
Joined: Sat Jul 14, 2007 11:31 am

Re: Storage Partition - So Glad I Did It

Post by red-e-made »

Fred wrote:If you create a folder in home you are automatically mounting it to the partition that your user name is mounted to. If you make a link to another folder that is bound to another partition you are not storing anything in home. A link can't be mounted. It just points to a folder somewhere that is mounted to a partition. Does that make sense?
It does make sense, because that's what I was hoping to do - "save" to one partition but have its data stored in another. It does work, but it's clumsy and unnecessary. I just had to try it though, for the hell of it.
Fred wrote:Now..... do I have you totally confused? lolFred
More intrigued than confused, but learning. Thanks again for the links; partitioning is a really fascinating aspect to Linux that I'm just starting to get acquainted with.
Fred

Re: Storage Partition - So Glad I Did It

Post by Fred »

red-e-made,

You are welcome. I hope this has been helpful to you. Feel free to post back if you have additional questions.

If I can't help you, I am sure someone else can. :-)

Fred
red-e-made
Level 5
Level 5
Posts: 526
Joined: Sat Jul 14, 2007 11:31 am

Re: Storage Partition - So Glad I Did It

Post by red-e-made »

OK, so after reading Fred's helpful links and looking at the way my partitions were, I did a fresh install (superstitious like that) and set up my partitions thusly:

/boot ext3 300MB
/ [root] ext3 12GB
/home/red-e-made ext3 65GB
/swap swap 2GB

I chose ext3 and put /swap last because that's how it was beforehand. Boot and shutdown are slightly faster, but mostly I like the peace of mind of having my data files in a separate partition. I might tweak the sizes of the partitions later, but I'm happy with this set-up.

EDIT: Also, while boot and shutdown are slightly faster, applications run a lot faster.
Lantesh

Re: Storage Partition - So Glad I Did It

Post by Lantesh »

red-e-made, it sounds like you have been busy, and having a lot of fun while doing it. To answer a question from your original post, yes I do keep my data separate. It's actually on a totally different hard drive. I bought a 500 gig SATA drive last year to use strictly for storage. My other hard drive contains all my OS's, XP for games, Mint for 99% of my activity, and just yesterday installed Edebuntu for the kids. I have spent my share of time with gparted and "sudo gedit /apt/fstab is burned in my brain, lol.
red-e-made
Level 5
Level 5
Posts: 526
Joined: Sat Jul 14, 2007 11:31 am

Re: Storage Partition - So Glad I Did It

Post by red-e-made »

Thanks, Lantesh. Actually, upon further study I decided to go a step further. Here's my current partition set-up:

sda1: / (root) | 5GB | ext2 | boot
sda2: /home/red-e-made | 5GB | ext2
sda4: swap | 2GB
sda3: extended
sda5: /home/red-e-made/Desktop/Docs | 2GB | ext2
sda6: /home/red-e-made/Desktop/Images | 20GB | ext2
sda7: /home/red-e-made/Desktop/Music | 40GB | ext2

I do wish swap was sda3 and the extended partition was sda4, but that's how it turned out. Swap used to be the partition furthest to the right in gparted - I've since learned that keeping it closer to boot is a better idea. Also, I needed to change the permissions for Desktop and the folders therein, but it works great now. Boot time has been cut from 30 seconds to 20 seconds, applications run faster, and I have the anal retentive peace of mind that comes from having my data sorted, each on its own partition.
User avatar
MALsPa
Level 8
Level 8
Posts: 2040
Joined: Mon Nov 19, 2007 10:17 pm
Location: albuquerque

Re: Storage Partition - So Glad I Did It

Post by MALsPa »

I use storage partitions in my multi-boot set-up, too. Works out quite nicely!
red-e-made
Level 5
Level 5
Posts: 526
Joined: Sat Jul 14, 2007 11:31 am

Re: Storage Partition - So Glad I Did It

Post by red-e-made »

Well, I popped my fstab cherry, as it were. Using the Live CD, I reduced the sizes of my images and music partitions, and created a new one, for videos. The results are such:

sda1: / (root) | 5GB | ext2 | boot
sda2: /home/red-e-made | 5GB | ext2
sda4: swap | 2GB
sda3: extended
sda5: /home/red-e-made/Desktop/Docs | 2GB | ext2
sda6: /home/red-e-made/Desktop/Images | 10GB | ext2
sda7: /home/red-e-made/Desktop/Music | 20GB | ext2
sda8: /home/red-e-made/Desktop/Video | 30GB | ext2

Making this new partition mount to the folder "Video" on my desktop, and then editing /etc/fstab to mount the partition at start-up, was done easily enough, thanks to this Mint wiki page (which even though is about moving Home to its own partition, applies just fine to affixing any folder to a partition): http://linuxmint.com/wiki/index.php/Mov ... _partition
Locked

Return to “Other topics”