LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-12-2009, 04:02 PM   #1
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Rep: Reputation: 56
editing fstab, setting up a network share with multiple drives


I have what will soon become a file server here running Mandriva 2009.1 and I need to set it up for use.

There are 6 physical drives, sda-sdf. According to my fstab (pasted below), the OS is installed on sdb.. and for some reason I have a swap partition on sda and sdb. I had a horrible time getting a working installation, and that's probably leftover from a previous attempt.

Question 1: Can I simply edit my fstab to remove the swap on sda, effectively confining all system resources to sdb?

The end result I want is all storage space over all drives accessible from a single mount point which can be accessed over the network.

Question 2: Once I sort out the weird fstab, what's the best way to go about setting this up? I imagine I need to format & partition the other drives (all but sdb).. but as far as organizing the free space, what's the best way? Is it possible to have multiple physical drives accessible from a single mount point? Or will the users have to use each drive separately? I was thinking I could create a directory on sdb (in /home?) to use as a root for the network share, and then automount the other 5 physical drives there. Does that make sense?

Thanks for any advice.

Code:
/etc/fstab:

# Entry for /dev/sdb1 :
UUID=7461ae34-aaa1-443d-82e1-fc9000afcc42 / ext3 relatime 1 1
# Entry for /dev/sdb6 :
UUID=41535e04-0368-4682-ab9c-5f791bfea803 /home ext3 relatime 1 2
/dev/cdrom /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
none /proc proc defaults 0 0
# Entry for /dev/sda5 :
UUID=9edbc49b-302c-43c8-8264-ed49a7f1fff2 swap swap defaults 0 0
# Entry for /dev/sdb5 :
UUID=b7039857-dfae-4a92-8ff4-9d1cdcf25351 swap swap defaults 0 0
 
Old 08-12-2009, 04:07 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
1 - yes, delete the entries and then the partitions, there's really nothing that can go wrong, as long as you ensure the swap is definitely not in use when you nuke the partitions

2 - lvm. combine an arbitrary number of partitions across multiple devices into a single filesystem. You can have a degree of redundancy in place too using the --mirror option during lvcreate, without needing exact matching geometries and such like you would for a raid0 or raid5 implementation. Simple example here: http://linuxdevcenter.com/pub/a/linu...-with-lvm.html

Last edited by acid_kewpie; 08-12-2009 at 04:09 PM.
 
Old 08-12-2009, 04:19 PM   #3
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Original Poster
Rep: Reputation: 56
Thanks for your quick reply.. and for the suggestion for lvm, I will check it out.

Quote:
delete the entries and then the partitions, there's really nothing that can go wrong, as long as you ensure the swap is definitely not in use when you nuke the partitions
Awesome.. how do I go about ensuring the swap partition in question is not in use? Will swapoff do the trick?

Thanks again.
 
Old 08-13-2009, 12:47 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
it should be fine, but ideally no swap shoud be in use in the first place. I've had some systems crash doing a swapoff of a swap partition whne it was already being used. safest is certainly to delete the fstab entry and then reboot.
 
Old 08-13-2009, 10:05 AM   #5
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Original Poster
Rep: Reputation: 56
Thanks, got the fstab sorted out.

I realized I forgot to mention that this file server will only be accessed from Mac computers (via NFS). Is that possible with LVM? It seems easier to do what I suggested above - create a root directory for the share in one drive, then mount the other 5 there. But maybe LVM will be easier in the long run?

[ETA: After thinking about it, I imagine it depends on the file system used, and that the client won't know the share it's connecting to is managed by LVM. Would ext3 be the best choice?]

Last edited by mattca; 08-13-2009 at 10:24 AM.
 
Old 08-13-2009, 10:27 AM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
...Mac computers (via NFS). Is that possible with LVM?
So far as I know, there shouldn't be any problem (No Mac to play with though). The network doesn't care what filesystem the files are on.

It's a nice idea, but I'd be careful with LVM - if there is data corruption or a disk error, recovering your data can be very tedious and complicated. Maybe you'd like to do a search on LVM Data Recovery - there are some horror stories:
http://www.linuxquestions.org/questi...h-data-561164/
http://www.linuxjournal.com/article/8874
Etc.

Maybe you have a good backup strategy though.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FSTAB Editing to Mount Cruzer Zip Drives MikRose Ubuntu 7 03-03-2009 02:27 AM
Network drives won't mount automatically from FSTAB khinch Linux - Networking 2 01-14-2009 12:44 PM
Help editing fstab to mount hard drives ChootarLaal Ubuntu 22 03-08-2008 02:43 PM
setting up multiple drives Jan Tanjo Linux - General 1 12-02-2007 04:17 PM
adding network drives the the fstab citrus Linux - General 1 03-17-2004 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:50 PM.

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