Skip to content

Instantly share code, notes, and snippets.

@whizzalan
Last active January 18, 2018 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whizzalan/42ce9ba0d87c2ab2d808832f901196fc to your computer and use it in GitHub Desktop.
Save whizzalan/42ce9ba0d87c2ab2d808832f901196fc to your computer and use it in GitHub Desktop.
新增硬碟空間
# linux 新增硬碟空間作法
```shell=
# 卸載先前 pure Storage
umount /data1
# 無法卸載,仍有user再上面使用,列出user 並將user執行程序殺除 <數字>c 表示正在執行
fuser -m /data1
# 檢查新的 storage 是否有抓到,device應該要可以看到!
ls /dev/[sh]d*
# 一開始應該還沒有做partition
fdisk -l /dev/sdd
# 互動模式像進行磁碟分割, n -> p -> 1 -> enter -> w
fdisk /dev/sdc
# 格式化
mkfs -t ext4 /dev/sdd
# 掛載上去檔案系統目錄
mount /data1
# 找尋UUID
blkid
# 將設定寫入fstab讓系統自動抓到
vim /etc/fstab
```
others
```shell=
id
```
> 由於一直無法mount上去, reboot後就可以看到, 原因猜測可能 disk 再做 mirror 或是 mount上去的檔案目錄相同可能設定還沒有更新所以失效。
Supplement: G.T.Wang 大大的文章真的有點強...
+ https://blog.gtwang.org/linux/linux-add-format-mount-harddisk/
PureStorage
+ 很大一台Server.....
@whizzalan
Copy link
Author

130758

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment