DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-03-05 15:07:10

woody
Member
Registered: 2007-03-05
Posts: 31

more than 1 partition per drive possible

I'm awaiting the arrival of my DNS-323 and 2 500gb SATA.  I hope to use it to replace the 2 fileservers heating up my closet.  Looking through the user guide it seems that you can only create 1 partition for each disk.  I need to replace like 6 shares
mp3
flac
ogg
userdata (for user's My Documents)
backup
sw

Is this possible using 'vanilla' tools/interface?  Or, will have to fdisk disks by hand and congifure smb.conf by hand?

Thanks
Woody

Offline

 

#2 2007-03-05 15:13:53

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: more than 1 partition per drive possible

Why do you want to partition? Isn't subfolders good enought?
If you partition you might end up having diskspace available in the wrong partition....

Offline

 

#3 2007-03-05 18:48:17

LifeTap
Member
Registered: 2007-01-10
Posts: 30

Re: more than 1 partition per drive possible

create the following directories under volume_1

mp3
flac
ogg
userdata (for user's My Documents)
backup
sw


Then remove the volume_1 share and create a share for each directory.  You can then map to each directory separately.

Offline

 

#4 2007-03-05 23:31:07

woody
Member
Registered: 2007-03-05
Posts: 31

Re: more than 1 partition per drive possible

frodo wrote:

Why do you want to partition? Isn't subfolders good enought?
If you partition you might end up having diskspace available in the wrong partition....

Mis-allocation is a good point.  I was worried about permissions mostly.  For instance, I like to make the mp3, ogg, and flac shares read-only to everyone but me.  I guess I could put all the read-only stuff on 1 drive and the read-write stuff on the other.

Woody

Offline

 

#5 2007-03-05 23:32:52

woody
Member
Registered: 2007-03-05
Posts: 31

Re: more than 1 partition per drive possible

LifeTap wrote:

create the following directories under volume_1

mp3
flac
ogg
userdata (for user's My Documents)
backup
sw


Then remove the volume_1 share and create a share for each directory.  You can then map to each directory separately.

Can I do all of that througt the web ui, or will I have to telnet?

Offline

 

#6 2007-03-05 23:55:55

LifeTap
Member
Registered: 2007-01-10
Posts: 30

Re: more than 1 partition per drive possible

woody wrote:

Can I do all of that througt the web ui, or will I have to telnet?

You can do all of that with the web ui.

You can not however create different access rights to the same share, the unit creates a second share name for the second entry.  This would have to be done via telnet.  I haven't had a need to do this yet thou, just wanted to put that out there.

Offline

 

#7 2007-03-07 02:55:59

woody
Member
Registered: 2007-03-05
Posts: 31

Re: more than 1 partition per drive possible

LifeTap wrote:

woody wrote:

Can I do all of that througt the web ui, or will I have to telnet?

You can do all of that with the web ui.

You can not however create different access rights to the same share, the unit creates a second share name for the second entry.  This would have to be done via telnet.  I haven't had a need to do this yet thou, just wanted to put that out there.

I tried it and I see what you mean.  I created 2 groups: users and admins.  I created a few users and assigned them to appropriate group.  I created a share for Volume_1/mp3 and made it RO to users group.  When I shared the same folder to admins group RW, I got a second share named mp3-1...not what i want.

If I enable telnet and edit smb.conf, will the changes survive a reboot?

Offline

 

#8 2007-03-07 06:30:11

someguy
Member
Registered: 2007-01-17
Posts: 47

Re: more than 1 partition per drive possible

woody wrote:

If I enable telnet and edit smb.conf, will the changes survive a reboot?

if you telnet in and edit /etc/samba/smb.conf, only the RAM image will be modified.

the firmware ROM image that gets loaded every reboot will _NOT_ be modified.

to make a persistent change that survives reboot, you can modify your fun_plug script to edit the /etc/samba/smb.conf file.
you may also need to "smb restart", too, but I'm not positive.

you can read how to fun_plug here:
http://dns323.kood.org/howto:fun_plug

I haven't tested how modifications via a fun_plug script inter-operate with modifications via the d-link web interface.  Anyone know how/where the d-link web settings are persisted on the 323, and when they are applied?  It would be cool to have a graphical representation of what launches on boot.

Last edited by someguy (2007-03-07 06:32:17)

Offline

 

#9 2007-03-07 14:28:43

woody
Member
Registered: 2007-03-05
Posts: 31

Re: more than 1 partition per drive possible

I copied /etc/samba/smb.conf to /mnt/HD_a2/smb.conf and edited it with UltraEdit (to preserver Unix line terminators).

What are the commands to stop samba and restart with my alternate smb.conf?


[ lossless ]
comment =
path = /mnt/HD_b2/lossless
writable = no
write list = @admins
guest ok = no

[ mp3 ]
comment =
path = /mnt/HD_a2/mp3
writable = no
write list = @admins
guest ok = no

[ ogg ]
comment =
path = /mnt/HD_a2/ogg
writable = no
write list = @admins
guest ok = no

[ userdata ]
comment =
path = /mnt/HD_a2/userdata
writable = yes
guest ok = no
create mode = 0660
directory mode = 0770

[ backup ]
comment =
path = /mnt/HD_a2/backup
writable = yes
guest ok = no
create mode = 0660
directory mode = 0770

Offline

 

#10 2007-03-07 15:27:38

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: more than 1 partition per drive possible

woody wrote:

What are the commands to stop samba and restart with my alternate smb.conf?

Code:

# smb restart

Partly mentioned in the Wiki, but I cannot blame you for not finding the information in that particular section.


tip: Notepad++ is a free alternative to UltraEdit.

/Apan

Offline

 

#11 2007-03-07 15:50:19

woody
Member
Registered: 2007-03-05
Posts: 31

Re: more than 1 partition per drive possible

wouldn't that use /etc/samba/smb.conf?  I want samba to use /mnt/HD_a2/smb.conf.  Is there a way to pass smb an alternate config?  Something like

/usr/sbin/samba/smdb -s /mnt/HD_a2/smb.conf

Offline

 

#12 2007-03-07 15:55:01

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: more than 1 partition per drive possible

woody wrote:

wouldn't that use /etc/samba/smb.conf?  I want samba to use /mnt/HD_a2/smb.conf.  Is there a way to pass smb an alternate config?  Something like

/usr/sbin/samba/smdb -s /mnt/HD_a2/smb.conf

Yes. See also "man smbd" or "http://www.die.net/doc/linux/man/man8/smbd.8.html"

Btw, it's smbd, not smdb. And don't forget nmbd.

Offline

 

#13 2007-03-07 16:15:52

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: more than 1 partition per drive possible

woody wrote:

wouldn't that use /etc/samba/smb.conf?  I want samba to use /mnt/HD_a2/smb.conf.  Is there a way to pass smb an alternate config?  Something like

/usr/sbin/samba/smdb -s /mnt/HD_a2/smb.conf

Yes. Sorry, didn't pay attention and thought you copied the file back to the RAM disk.

/Apan

Offline

 

#14 2007-03-07 16:34:31

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: more than 1 partition per drive possible

One more thing: smbd and nmbd are usually started with -D to make it run in the background, so you
should use:

smbd -D -s /path/to/config
nmbd -D -s /path/to/config

If you're curious, have a look at /sys/crfs/samba/smb (using telnet, try "less /sys/crfs/samba/smb",
press "q" to exit less).

Last edited by fonz (2007-03-07 16:35:25)

Offline

 

#15 2007-03-07 16:56:37

woody
Member
Registered: 2007-03-05
Posts: 31

Re: more than 1 partition per drive possible

I wound up using fun_plug to copy alternate smb.conf to ramdisk.  Also, does anyone know of a way around the password limitations?  Seems they must be at least 5 characters and no more than 8.  My windows password is >8.  Here's a workaround if anyone is interested:


#
# Use my smb.conf
#
cp /mnt/HD_a2/smb.conf /etc/samba/smb.conf

#
# reset my samba password
#
(echo "windows_password"; echo "windows_password") | smbpasswd -s -a windws_user_account

#
# restart samba
#
smb restart

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB