[linux] Raid 변경 후 mountIT/linux2021. 5. 27. 16:48
Table of Contents
[junhee.lee:root@root ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Mon Apr 16 08:39:40 2018
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
LABEL=ROOT / ext4 noatime,nodiratime 1 1
LABEL=CDNET /usr/local/cdnet ext4 noatime,nodiratime 1 2
LABEL=SWAP swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
#/dev/sdb1 /data0 xfs noatime,nodiratime 1 1
/etc/fstab에서 /data0 주석
raid controller에서 raid 변경 reboot
2T 이하 fdisk
2T 이상 parted
[junhee.lee:root@root ~]# parted /dev/sdb
GNU Parted 2.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: DELL PERC H710 (scsi)
Disk /dev/sdb: 40.0TB
Sector size (logical/physical): 512B/512B
Partition Table: pc98
Number Start End Size File system Name Flags
(parted) help
align-check TYPE N check partition N for TYPE(min|opt) alignment
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkfs NUMBER FS-TYPE make a FS-TYPE file system on partition NUMBER
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a file system
move NUMBER START END move partition NUMBER
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices, free
space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and END
resize NUMBER START END resize partition NUMBER and its file system
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright information of
GNU Parted
(parted) mklabel
New disk label type? gpt
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes
(parted)
(parted) mkpart
Partition name? []?
File system type? [ext2]? xfs
Start? 0%
End? 100%
(parted)
(parted) print all
Model: DELL PERC H710 (scsi)
Disk /dev/sdb: 40.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 40.0TB 40.0TB
Model: DELL PERC H710 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 21.5GB 21.5GB primary ext4 boot
2 21.5GB 38.7GB 17.2GB primary linux-swap(v1)
3 38.7GB 253GB 215GB primary ext4
(parted) quit
Information: You may need to update /etc/fstab.
[junhee.lee:root@root ~]# mkfs.xfs -L DATA0 /dev/sdb1
meta-data=/dev/sdb1 isize=256 agcount=37, agsize=268435455 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=9766829568, imaxpct=5
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal log bsize=4096 blocks=521728, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[junhee.lee:root@root ~]# mount /dev/sdb1 /data0/
[junhee.lee:root@root ~]# mount -a
[junhee.lee:root@root ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 20G 1.3G 19G 7% /
tmpfs 16G 0 16G 0% /dev/shm
/dev/sda3 197G 386M 197G 1% /usr/local/cdnet
/dev/sdb1 37T 5.2M 37T 1% /data0
[junhee.lee:root@root ~]#
[junhee.lee:root@root ~]# blkid
/dev/sda1: LABEL="ROOT" UUID="..." TYPE="ext4"
/dev/sda2: LABEL="SWAP" UUID="..." TYPE="swap"
/dev/sda3: LABEL="CDNET" UUID="..." TYPE="ext4"
/dev/sdb1: LABEL="DATA0" UUID="..." TYPE="xfs"
/etc/fstab 주석 해제 후 mount
'IT > linux' 카테고리의 다른 글
[linux] unable to resolve host : Name or service not known (0) | 2022.08.25 |
---|---|
[linux] passwd: Authentication token manipulation error (0) | 2022.08.25 |
[firewalld] Failed to start firewalld.service: Unit is masked. (0) | 2021.02.19 |
[linux] [Hardware Error]: Machine check events logged (0) | 2021.01.28 |
[linux] vimrc (0) | 2020.10.28 |
@주니- :: 주니
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!