Blog

Resize Linux Disk Partition

Expand Partition Size #

growpart /dev/sda 1
resize2fs /dev/sda1

Shrink Partition Size #

Shrink Filesystem

resize2fs /dev/sdb1 24G

Multiply the output 4k value by 4 for the following operations

Resize Partition

fdisk /dev/sdb
d
n

Using Samba on Debian

Server #

Install Samba

apt install samba -y

Enable write permission

Locate the definition of the homes share

   read only = no

Add Samba user

smbpasswd -a $USER

Restart Samba service

service smbd restart

Client #

Install cifs-utils

apt install cifs-utils -y

Mount Samba

mount -t cifs -o username=xxx,uid=xxx,gid=xxx //server_ip/user /path/to/mount