LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-09-2001, 12:25 AM   #1
katana
Member
 
Registered: Jun 2001
Posts: 100

Rep: Reputation: 15
Exclamation


hello all!
i got another assignment from my lecturer...he asked me to do 3 partitions on the comp, that is linux, windows and another partition exclusively for files (data).He wants the other partitions (linux at least) to be able to read data in that data partition...

the question is, how????this is pretty weird..somebody help me out please! I know that you've got to use mounting to read non-linux files,but to read other partition's files??

do i even make sense here??help!
 
Old 06-09-2001, 02:01 AM   #2
Trekker
LQ Newbie
 
Registered: Jun 2001
Posts: 19

Rep: Reputation: 0
Well, you could have a FAT32 as the data partition. Having a FAT32 or FAT partition will allow the greatest flexibility IMHO. Windoze can see it and and so can linux.

But, mounting the partition in linux only allows you to "see" the partitions and the files (filenames?) in it. Whether you can open up the files adn view them or to execute them is another matter.

You can mount FAT partitions in linux with "mkdir /mnt/win" and then "mount -t vfat /dev/hdxy /mnt/win" at the command line.

x : a for the 1st hard drive, b for the 2nd etc
y: the partitions no. e.g. 1, 2, 3, etc

HTH
 
Old 06-09-2001, 02:36 AM   #3
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Quote:
Originally posted by katana
hello all!
i got another assignment from my lecturer...he asked me to do 3 partitions on the comp, that is linux, windows and another partition exclusively for files (data).He wants the other partitions (linux at least) to be able to read data in that data partition...

the question is, how????this is pretty weird..somebody help me out please! I know that you've got to use mounting to read non-linux files,but to read other partition's files??

do i even make sense here??help!
You again.
I can reccommend three items that require action.

1) Get another lecturer.

2) No. Just Kidding. It's actually a pretty common task that he has asked you to do and it's for a couple of good reasons - security, speed, redundancy are the more common benefits.[list=1][*] security: a separate partition could be mounted ro (read only - good for static data) or append (good for log files, you can add to a file but not deleted it)[*] speed: if you are running a web and database server and you have 3 physical devices you could use a partition on the second device for your web pages and a partition on your third device for for your database files. This way your drives to not become a bottleneck for your system performance. This won't do you much good if you are hanging a bunch of slave drives on an IDE system, but if you have a lot of IDE conrollers and channels, or bettter yet a fast/wide/ultra/etc... SCSI sysem there should be some gains seen.[*] redundancy: you can duplicate a folder or filesystem to another directory. paraniod people like me do this when it's 3am and we need to backup a folder to a partition and unmount it to avoid tragedy.[/list=1]

But you want to know how to do it. Since I bored you with some dry boring stuff, here's the goods. (Please read this through and understand what you are doing before you go ahead and commit to it. You can break stuff if you aren't careful and I have been known to make a mistake or two in documentation.)

Since you already have an installed system (you still do, don't you? With qpopper and stuff?) you can take one of your directories and 'move' it to another partition. You've gotta have some free space to work with. If you need to resize a partition you'll need to do some searching and reading.

The How[list=1][*]Take that free space and create a partition (i use fdisk, some folks like diskdruid). 'Mark' the partition type - we need to give the OS (linux) a clue about what kind of partition it will be. 'Linux' (type 83)might be a good choice here. Write your changes and exit fdisk.[*]format the partition. What data are you putting in the partition? Regular files in the kilobyte to megabyte and up? Lots of small files? Database records? ext2 is the old standby but many people (myself included) are using reiserfs, a journaling filesystem. Really excels when you are working with lots of small files or data uptdates. Saves space too. Read up on inode density to find out why. (You need to do some research! readup on mk2fs and reiserfs)[*]Now we can mount the partition - i'll use /mnt for now. mount /dev/<your partition> /mnt. (I'll let the kernel sniff out which type of filesystem we used. You should readup on 'mount').[*]You can now see how much room you have on the mounted partition by using 'df -h' (free sisk space, show me in 'human' readable K/M/Gbytes)[*]Copy. [This copy routine works nice for me and I got it from the Linux RAID How To at linuxdoc.org or at the Author's web site). 'cd' to the directory you want to copy. Let's use your /home directory. 'cd /home'. 'find . -xdev | cpio -pm /mnt/' We're going to 'find' all the files from this directory down and pipe them to the 'cpio' command which will 'cp' them and keep permissions and attribues of the files the same. (Hey. Stop. When you think you know a lot just go and read the man pages for cpio. I dare you.)[*]'la /mnt' to see what stuff you've got there. Make sure all is well.[*]Now you can get out of the /home directory - 'cd /'. Log in as root (you probably already are). Unmout the /mnt folder 'umount /mnt' or 'umount /dev/<that partition you created>' Now try to mount that same partition to /home. Now let's say you made some changes to the data on this new partition which for all intents and purposes is your new home directory? What happens to your old /home directory? Mess with it, but treat everyhting you do as permanent.[*]If you haven't destroyed everything yet, you could probably go and change your /etc/fstab to mount this partition to /home every time you boot.[/list=1]
Do you need to read the Windows partition? Did you read the man pages for 'mount'?

Cheers,
mc9
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How can linux be installed on Windows partition's free space without repartitioning? khurdp Linux - Distributions 1 02-08-2005 11:51 AM
reading windows files on linux bugsbunny Linux - Newbie 1 01-29-2003 12:28 PM
Reading Windows files in Linux NiagraBob Linux - Newbie 4 11-18-2002 08:37 PM
Reading PDF files in linux Chijtska Linux - General 4 02-01-2002 07:55 PM
Reading Linux Files From WinMe/Win2K..... wzt29 Linux - Newbie 2 02-14-2001 05:20 AM


All times are GMT -5. The time now is 03:20 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration