LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-03-2007, 02:00 PM   #1
jborn
Member
 
Registered: Oct 2005
Distribution: FC 8
Posts: 53

Rep: Reputation: 15
How to grow a directory with a new hard drive


Hi,

I just finished updating my system from FC4 to FC6 and did so with a new hard drive. The old hard drive has been fdisk(ed) to delete the original partitions and repartitioned with one big partition

I have the majority of the new disk devoted to /video

In fstab I have for this one mount:

LABEL=/video /video ext3 defaults 1 2

Can I add the following:

/dev/sda1 /video ext3 defaults 1 2

Or will this new line be the only active line?

Is what I'm trying to do possible?

Thanks
 
Old 02-03-2007, 02:28 PM   #2
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Århus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Rep: Reputation: 45
Do you want to move the original video directory to a new hard drive/partition? If so, you have to mount the new partition to a temporary place (e.g. /mnt/tmp), copy all the necessary files from /video to /mnt/tmp, delete original /video, and remount the new video partition to /video. Make the relevant changes in /etc/fstab. It is quite straightforward, just be careful (and do backups!).

All the best,
Ott
 
Old 02-03-2007, 03:03 PM   #3
jborn
Member
 
Registered: Oct 2005
Distribution: FC 8
Posts: 53

Original Poster
Rep: Reputation: 15
I want one big directory

df -k Give this:
/dev/sdb5 269531896 63930056 191689552 26% /video

I want it to be something like:

/dev/sdb5 /dev/sda1 469531896 63930056 291689552 8% /video

Two devices making up one directory
 
Old 02-03-2007, 03:16 PM   #4
smoon
LQ Newbie
 
Registered: Feb 2007
Posts: 4

Rep: Reputation: 0
Quote:
Originally Posted by jborn
I want one big directory

df -k Give this:
/dev/sdb5 269531896 63930056 191689552 26% /video

I want it to be something like:

/dev/sdb5 /dev/sda1 469531896 63930056 291689552 8% /video

Two devices making up one directory
Sounds like a job for Unionfs. URL will follow in my next reply since the forum software does not allow me to post links in my first post
 
Old 02-03-2007, 03:17 PM   #5
smoon
LQ Newbie
 
Registered: Feb 2007
Posts: 4

Rep: Reputation: 0
Quote:
Originally Posted by smoon
Sounds like a job for Unionfs. URL will follow in my next reply since the forum software does not allow me to post links in my first post
Ok, here it is: http://www.fsl.cs.sunysb.edu/project-unionfs.html
 
Old 02-03-2007, 03:24 PM   #6
willia01
LQ Newbie
 
Registered: Jan 2007
Posts: 10

Rep: Reputation: 0
can also use the Logical volume manager to group the disks into a volume group and create one large logical volume which you can mount as a filesystem and resize on the fly .
Included in some distro's notably suse , can be downloaded and added afterwards.
The only problem with this in your situation is the fact that you need to pull in the entire disk.
 
Old 02-03-2007, 03:29 PM   #7
jborn
Member
 
Registered: Oct 2005
Distribution: FC 8
Posts: 53

Original Poster
Rep: Reputation: 15
This is going to be a ongoing project with drives being added to /video as needed, or replacing a 150 gigger with a 750 GB drive.

With that is mind is one approach better than the other? I want this to be as painfree as possible after I get it setup. Not to worried about how difficult it is to setup this time through.

Thanks for the information and advice
 
Old 02-03-2007, 04:25 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I'm surprised you're not already using LVM with Fedora.
It'd be perfect for something like you're contemplating.

You still need to be able to grow the underlying filesystem - I've had issues with ext3 in the past. Others say it's fine.
Then there is the issue of performance as you get bigger. Might be worth also investing some time checking alternate filesystems - xfs, jfs, (ext4 ???) whatever.
 
Old 02-04-2007, 05:35 AM   #9
willia01
LQ Newbie
 
Registered: Jan 2007
Posts: 10

Rep: Reputation: 0
Thumbs up

If you are looking for ease of management and configuration then I would recommend using LVM.
You can add physical volumes to the volume group on the fly , extend the filesystem on the fly , even reduce it on the fly , (that is dangerous though , you can very easily destroy your data so backup before you do that)
If you wish to migrate to another PV then you can mirror to it and reduce the mirrors online .
One limitation that could still be in force on opensource lvm is that the largest physical volume that you specify at volume group creation time is the largest pv you will ever be able to add to that Volume group.
In this instance a create a new vg with larger disk , create lv , mount it as a temp name and copy data across.

or backup , recreate including larger disk and restore.
I have been using reiserfs with lvm on suse and I must say i have no hassles with dynamic filesystem resizing.

LVM is also what is used by default on most of the non open source ux distros out there , although the filesystem used on them is normally a jfs version.
It makes life a lot easier for an admin.

Here is some of the relevant lvm commands in order of use

pvcreate (formats a disk for lvm use , destroys all data currently on disk)

vgcreate

lvcreate

lvextend (allows mirroring as well)

mkreiserfs (8) - The create tool for the Linux ReiserFS filesystem.

resize_reiserfs (8) - resizer tool for the ReiserFS filesystem

reiserfsck (8) - The checking tool for the ReiserFS filesystem.

reiserfstune (8) - The tunning tool for the ReiserFS filesystem.

fsck.reiserfs (8) - The checking tool for the ReiserFS filesystem.

mkfs.reiserfs (8) - The create tool for the Linux ReiserFS filesystem.

debugreiserfs (8) - The debugging tool for the ReiserFS filesystem.

mount (obviously)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
2nd hard drive for home directory? morghanphoenix Ubuntu 2 09-20-2006 09:37 PM
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
How do you install a new hard drive and make it the new /home directory??? anilnatha Linux - Hardware 4 08-02-2005 04:39 PM
backing up a directory to another hard drive aducarrab Linux - Newbie 1 01-29-2005 09:27 PM
2 hard drive in system mirror 1st hard drive sburns76247 Linux - General 2 12-21-2004 01:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration