●ファイルサーバー化 続き
ファイルシステムがNTFSだとめっちゃ遅いので、ext4にきりなおす。
参考
ファイルシステムがNTFSだとめっちゃ遅いので、ext4にきりなおす。
参考
1.マウント済みディスクのアンマウント
$ sudo umount /dev/sda2
2.3TBなのでpartedでパーティションをきりなおす
$ sudo parted -l
Model: I-O DATA HDJ-U (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags 1 17.4kB 134MB 134MB Microsoft
reserved partition msftres
2 135MB 3001GB 3000GB ntfs Basic data partition
Model: SD (sd/mmc)
Disk /dev/mmcblk0: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 4194kB 1445MB 1441MB primary fat32 lba
2 1447MB 16.0GB 14.5GB extended
5 1451MB 1514MB 62.9MB logical fat32 lba
6 1518MB 16.0GB 14.5GB logical ext4
3 16.0GB 16.0GB 33.6MB primary ext4
$ sudo parted /dev/sda
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: I-O DATA HDJ-U (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags 1 17.4kB 134MB 134MB Microsoft
reserved partition msftres
2 135MB 3001GB 3000GB ntfs Basic data partition
3.パーティションテーブルの変更
(parted) mklabel
New disk label type? gpt
Warning: The existing disk label on /dev/sda will be destroyed and all data on
this disk will be lost. Do you want to continue?
Yes/No? y
4.パーティションの作成
(parted) mkpart
Partition name? usbdisk
File system type? [ext2]? ext3
Start? 0%
End? 3001GB
(parted) print
Model: I-O DATA HDJ-U (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 3001GB 3001GB usbdisk
5.ファイルシステムの作成
$ sudo mkfs -t ext4 /dev/sda1
mke2fs 1.42.5 (29-Jul-2012)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
183148544 inodes, 732566272 blocks
36628313 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
22357 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872,
71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
6.fstabの修正
/dev/sda1 /mnt/usbdisk1 ext4 defaults,noatime,nobh,data=writeback,commit=60 0 0
7.マウント
$ sudo mount /mnt/usbdisk1
8./etc/samba/smb.confの修正
[nas]
comment = nas directory
path = /mnt/usbdisk1/nas
guest ok = yes
read only = No
writable = Yes
hosts allow = 192.168.0.0/255.255.255.0
security = server
valid users = foo
create mode = 0666
directory mode = 0777
9.samba再起動
$ sudo service samba restart
体感的には早くなったように思う。
0 件のコメント:
コメントを投稿