Results 1 to 8 of 8
I've been searching alot and reading through the man page of the mount command. I also tested a lot of commands in on a test system, but still don't get ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-12-2007 #1Just Joined!
- Join Date
- Apr 2007
- Posts
- 3
Moving folder to existing partition without changing its "path"
I've been searching alot and reading through the man page of the mount command. I also tested a lot of commands in on a test system, but still don't get where i want to be.
But i'm still relativily new to linux, but i learned a lot the last few months.
I have this debian working samba/fileserver, no gui, kernel 2.6.8-3-686
Partition info
/dev/hda2 11G mounted on /
/dev/hda5 58G mounted on /home
/dev/hda6 3 G mounted on swap
i've a folder /data which is on /dev/hda2 and that one is out of space since my shares are in there (auto backups etc).
When i mount /data on /dev/hda5 it gets the contents of the /home folder.
# mount -t ext3 /dev/hda5 /data
i'm a bit stubborn but i really would like to have my /data at the / when i "ls" and still residing on the same partition as /home
Is there anyway i can do this without repartioning my /dev/hda5?
I can't get it to work though it seems a pretty stupid problem.
=> Long story, short story:
Any way in linux to have multiple folders be on one partition? Like the root (/) one? And is there a way to do this with partition that already exist?
thx in advance for reading.
GrMbL
- 04-12-2007 #2
So you want to move /dev/hda2/data to /dev/hda5/data or do you want to move /dev/hda2 to /dev/hda5 (that already has /home)? Perhaps a symlink so when you try look at /data on hda2 it sends you to /dev/hda5/home/data
The ln command could do thatBrilliant Mediocrity - Making Failure Look Good
- 04-13-2007 #3Just Joined!
- Join Date
- Apr 2007
- Posts
- 3
i want to move /dev/hda2/data to /dev/hda5/data.
the link you gave is interesting, but it doesn't let me physically move the data foldert to the other partition if i interpret the command correctly.
- 04-13-2007 #4
data is a folder not partition. its not possible to mount folder. create a folder 'data' in /dev/hda5 and copy files from /devhda2/data to /dev/hda5.
if everything works, delete /dev/hda2/data.Code:cd /dev/hda2/data find . -depth -print0 | cpio --null --sparse -pvd /dev/hda5/data
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 04-13-2007 #5
hda5 is actually mounted as /home so I don't see how you could also mount it as /data. You would have to make it /home/data or split off another partition from hda5 making it hda6 and mounting that as /data.
Then all you need to do is use your filemanager to drag all the files across.Pete
- 04-13-2007 #6Just Joined!
- Join Date
- Apr 2007
- Posts
- 3
i was obviously looking from a windows point of view. i thought i maybe missed something the way linux works with folders and partitions, but it seems there was a reason why i couldn't get it to work, simply 'cause it isn't possible.
I still think its kinda weird, but i'll get used to it
The / on my other partition does contain multiple folders, but i guess the "/" is the same sort of folder like my /home where all things start and spread out like the branches of a tree.
Anyway, thx for the answers.
- 04-13-2007 #7
check this link on Linux FileSystem.
if you are copying system and config files then you must preserve permissions and symlinks. simply copying will not work.It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 04-13-2007 #8I was, of course, assuming your /data folder was personal with personal files. As devils_casper says, my idea would only work if this was the case.
Originally Posted by devils_casper Pete


Reply With Quote
