Mailinglist Archive: opensuse (3441 mails)

< Previous Next >
Re: [opensuse] trying to figure out how to share a data drive
  • From: "David C. Rankin" <drankinatty@xxxxxxxxxxxxxxxxxx>
  • Date: Mon, 19 Jan 2009 23:42:28 -0600
  • Message-id: <49756444.7030301@xxxxxxxxxxxxxxxxxx>
George Olson wrote:
David C. Rankin wrote:
Whoa George,

Your moving kind of fast for a newbie here... First, lets get a little
information about your linux setup so I can make sure we are talking
apples-to-apples here. Open konsole and post the output of the following two

cat /proc/partitions

/Ok, here it is:
george@linux-8rby:~> cat /proc/partitions
major minor #blocks name

8 0 244198584 sda
8 1 35840983 sda1
8 2 163838902 sda2
8 3 1 sda3
8 5 2104483 sda5
8 6 17125258 sda6
8 7 25286278 sda7/


/george@linux-8rby:~> mount
/dev/sda6 on / type ext3 (rw,acl,user_xattr)
/dev/sda7 on /home type ext3 (rw,acl,user_xattr)
/dev/sda1 on /windows/C type fuseblk
/dev/sda2 on /windows/D type fuseblk
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sr0 on /media/SU1110.001 type iso9660
gvfs-fuse-daemon on /home/george/.gvfs type fuse.gvfs-fuse-daemon

Basically what you are going to need to do is to select an empty
partition and
then format it in FAT32. That is the only way (absent a couple of tools under
development) to share a partition on the same machine between windows and
linux. Linux can read NTFS just fine, but writing to it directly from linux
worse than Russian roulette. If the disks are on separate computers, then
is no problem at all with the SAMBA/CIFS set of tools. But to write to a
partition that windows can read in a dual-boot scenario, fat32 is the ticket.

/Ok, this gives me a couple of follow up questions. I have a ton of data
on the drive I want to share, and everything is NTFS (I am pretty sure).
I can back it all up, re-format to FAT32, and then copy it all back on
the newly formatted drive again. But the question I have about that is,
isn't there a size limit to a drive formatted in FAT32? I am looking at
160 gigs or so.


In order to overcome the volume size limit of FAT16, while still allowing DOS
real mode code to handle the format without unnecessarily reducing the
available conventional memory, Microsoft implemented a newer generation of FAT,
known as FAT32, with cluster values held in a 32-bit field, of which 28 bits
are used to hold the cluster number, for a maximum of approximately 268 million
(228) clusters. This allows for drive sizes of up to 8 tebibytes with 32KB
clusters, but the boot sector uses a 32-bit field for the sector count,
limiting volume size to 2 TiB on a hard disk with 512 byte sectors.

I think your covered...

I don't have the whole thing full, but that is the size
of the drive I would like, if it is possible./
There is of course the solution of virtualizing windows within linux
running samba on linux, then you can share disk space just as if the
systems were running on separate boxes. See:

Here is a screenshot to whet your couriosity:

/That looks really cool. It seems like I need to try and get samba
running. Can you (or anyone) give me a brief layman's description of how
samba works?/

Samba uses the smb protocol to provide access to data on 'shares' defined in
its /etc/samba/smb.conf file. The smb protocol is how windows machines talk to
each other to share data. Since samba does that for linux, windows and linux
machines can access common data on a share hosted either on a windows box or a
linux box.

** Note: the following quick and dirty howto will get you running, but is no
substitute for:

The following will get your linux box sharing data with your other windows
boxes or other linux boxes. Where ever you FAT32 drive is now mounted, that
will be the path to your 'data' share. (you can call the share name anything
you like, but the 'path' must be correct). Do the following to get samba
running. As root, from the command line:

(1) copy your original config to another file name

cp /etc/samba/smb.conf /etc/samba/smb.conf.orig

(2) copy and paste the following to /etc/samba/smb.conf (read the comments
below and make changes for your system. The comments start with a ';'. (you can
also use '#' as comments for samba) For the following config, I have ASSUMED
your user name is 'george' If it's not, change it.

If your having trouble copying this information to the smb.conf, just select
the text below with your mouse and then do:

use sendfile = No
disable spoolss = yes

; Change the workgroup to your workgroup

workgroup = rb_law
server string = Samba %v
disable spoolss = yes
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
usershare allow guests = No
admin users = george
smb ports = 139
time server = yes

; Change 192.168.1. to your local subnet

hosts allow = 127. 192.168.1.
domain logons = yes
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd

; If you have no other wins server, leave as is, if you do, then
; uncomment the second line and give it the right IP and then
; comment out the 'wins support = yes'

wins support = yes
; wins server =

comment = Home Directories
browseable = No
read only = No
inherit acls = Yes

comment = Alchemy Config

; change the path to where your FAT32 data is

path = /home/data
admin users = george

; Note: you can also designate a group as valid users with @groupname
; just delete everything after george if you don't have other users

valid users = george, user2, @yourgroup
force group = users
browseable = no
writeable = Yes

comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No

echo ' {now paste the text by pressing your middle mouse button}
' {type the closing ' and then hit return}
{if you don't have a middle mouse button shift+insert will paste}

(3) If the directory in the path = statement above doesn't exist, create it.
The permissions on the directory must be 0755 (that's drwxr-xr-x) Remember the
x or execute bit controls your ability to 'descend' into that directory. (the
files permissions can be adjusted to tailor security, but that's beyond this
discussion) So:

mkdir /path/to/your/FAT32/files

chmod 0755

(make that 0775 if you want to give group write permission)

(4) Test the /etc/samba/smb.conf for errors and see your share definitions:


or, if using an alternate config:

testparm /path/to/config/file

(5) now create a smbpasswd entry (samba user and samba password) that you will
use to access the samba shares:

smbpasswd -a george

{enter your password at the prompts}

do the same thing for any more users you want to give access to.

** Note: I recommend using the same username/password combinations for windows
users that they use to log in to windows. That way windows will automatically
authenticate for access to your samba shares in network neighborhood. It's not
required, you can use something different, but be aware your users will be
prompted for a username and password (Which usually fries their brains on the

() start nmbd (the netbios nameservice daemon) and smbd (the samba daemon).
openSuSE splits the startup scripts, other distros don't. So to get things



Your samba is now up and running

(7) To make sure samba starts at boot (or any other system process you want to
start at boot) use chkconfig:

chkconfig smb on
chkconfig nmb on

to look at all the process you can turn on at boot:

chkconfig --list

***** DO NOT TURN kbd OFF -- you will have no keyboard forevermore...

** You can also use yast -> system -> system services to turn things on at
boot, but why waste the time clicking the mouse.

David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups