In Linux world, disk management is an important area. To know how to use the disk, there are a few basic concepts need to be well understood. The key tool to administrate disk is fdisk.
Basic concepts
1. naming conventions
Linux has the different naming conventions for IDE drives, SCSI Disks, SD card.
IDE drives: device names are like /dev/hda, /dev/hdb.
SCSI Drives: device names would be /dev/sda, /dev/sdb.
SD card: device names would be /dev/mmcblk0, /dev/mmcblk1.
Note: USB storage device is detected as SCSI drives.
Also there is a special device file /dev/loop[0-7], which can be used to link to a disk file. we will cover it in another post.
2. partitioning
There are two different partition types: primary and extended partition. On one physical disk, it can have up to 4 primary partitions only. In order to have more partitions to be created, extended partition is introduced. Inside the extended partition, the logical partition can be created. There is no limit of number of logical partitions to be created inside an extended partition.
3. file systems
A filesystem is the methods and data structures that an operating system uses to keep track of files on a partition. In Linux, there are a number of different file systems supported for disk: FAT, ext2, ext3, ext4. To find what are all supported file systems in a running linux, do “cat /proc/filesystems”.
weng@weng-u1604:~$ cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev ramfs
nodev bdev
nodev proc
nodev cpuset
nodev cgroup
nodev tmpfs
nodev devtmpfs
nodev debugfs
nodev tracefs
nodev securityfs
nodev sockfs
nodev pipefs
nodev devpts
ext3
ext2
ext4
nodev hugetlbfs
vfat
nodev ecryptfs
fuseblk
nodev fuse
nodev fusectl
nodev pstore
nodev mqueue
nodev autofs
nodev vboxsf
weng@weng-u1604:~$
There are many disk administrating tools to edit disk partitions: most popular tool is fdisk.
GParted is a fancy tool, can create, resize partitions. Here we focus on “fdisk” tool as it is avaiable in most linux enviroment.
1. Find the list of existing hard disks
Below is output from my ubuntu 16.04 VM running inside VirtualBox.
weng@weng-u1604:~$ sudo fdisk -l
Disk /dev/sda: 200 GiB, 214748364800 bytes, 419430400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size ( logical/physical) : 512 bytes / 512 bytes
I/O size ( minimum/optimal) : 512 bytes / 512 bytes
Disklabel type : dos
Disk identifier: 0x6bd39d03
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 411043839 411041792 196G 83 Linux
/dev/sda2 411045886 419428351 8382466 4G 5 Extended
/dev/sda5 411045888 419428351 8382464 4G 82 Linux swap / Solaris
weng@weng-u1604:~$
In this case, the majority space is allocated in primary parition “/dev/sda1”, and “/dev/sda2” is created as a extended partition, which has a logical partition “/dev/sda5” used as swap space.
Another example below from a centos box, which has a 1 T SCSI hard drive and a 1GB USB memory stick inserted.
[ root@sg-centos-hv1 scratch]# fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size ( logical/physical) : 512 bytes / 512 bytes
I/O size ( minimum/optimal) : 512 bytes / 512 bytes
Disk identifier: 0x000afcd6
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
/dev/sda2 64 121602 976248832 8e Linux LVM
Disk /dev/mapper/vg_sgcentoshv1-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size ( logical/physical) : 512 bytes / 512 bytes
I/O size ( minimum/optimal) : 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_sgcentoshv1-lv_swap: 25.3 GB, 25341984768 bytes
255 heads, 63 sectors/track, 3080 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size ( logical/physical) : 512 bytes / 512 bytes
I/O size ( minimum/optimal) : 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_sgcentoshv1-lv_home: 920.6 GB, 920645533696 bytes
255 heads, 63 sectors/track, 111928 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size ( logical/physical) : 512 bytes / 512 bytes
I/O size ( minimum/optimal) : 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdb: 1037 MB, 1037041664 bytes
185 heads, 1 sectors/track, 10948 cylinders
Units = cylinders of 185 * 512 = 94720 bytes
Sector size ( logical/physical) : 512 bytes / 512 bytes
I/O size ( minimum/optimal) : 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 10584 978943+ 6 FAT16
[ root@sg-centos-hv1 scratch]# fdisk -l /dev/sdb
Disk /dev/sdb: 1037 MB, 1037041664 bytes
185 heads, 1 sectors/track, 10948 cylinders
Units = cylinders of 185 * 512 = 94720 bytes
Sector size ( logical/physical) : 512 bytes / 512 bytes
I/O size ( minimum/optimal) : 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 10584 978943+ 6 FAT16
[ root@sg-centos-hv1 scratch]#
Some explanantions: there are two physical disks detected as “/dev/sda”, and “dev/sdb”.
"/dev/sda" is the 1T SCSI hard drive, it has one primary partition "/dev/sda1" which is marked bootable; there is second primary partition, which is configured to be usd by Logical Volume Manager (LVM). Inside this partition, there is one Volume Group, which has three Logical Volume created. See next post for details regarding LVM.
[ root@sg-centos-hv1 scratch]# vgdisplay
--- Volume group ---
VG Name vg_sgcentoshv1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read /write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 931.02 GiB
PE Size 4.00 MiB
Total PE 238341
Alloc PE / Size 238341 / 931.02 GiB
Free PE / Size 0 / 0
VG UUID 3CQarS-xJz8-rzmI-2nxh-j4pK-qUFr-wrRXki
[ root@sg-centos-hv1 scratch]# lvdisplay
--- Logical volume ---
LV Path /dev/vg_sgcentoshv1/lv_root
LV Name lv_root
VG Name vg_sgcentoshv1
LV UUID ebnL5k-Gmac-6gqE-PPF5-9925-qRUM-VH24Co
LV Write Access read /write
LV Creation host, time sg-centos-hv1.cisco.com, 2014-10-02 14:50:57 -0700
LV Status available
# open 1
LV Size 50.00 GiB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Path /dev/vg_sgcentoshv1/lv_home
LV Name lv_home
VG Name vg_sgcentoshv1
LV UUID qZYut3-A0vR-uKrO-fNR6-22Jp-oa0z-NqmfKy
LV Write Access read /write
LV Creation host, time sg-centos-hv1.cisco.com, 2014-10-02 14:51:23 -0700
LV Status available
# open 1
LV Size 857.42 GiB
Current LE 219499
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
--- Logical volume ---
LV Path /dev/vg_sgcentoshv1/lv_swap
LV Name lv_swap
VG Name vg_sgcentoshv1
LV UUID BpTs4P-7cIH-C1ee-tajj-lqx2-I2Pq-A9gy3s
LV Write Access read /write
LV Creation host, time sg-centos-hv1.cisco.com, 2014-10-02 14:58:08 -0700
LV Status available
# open 1
LV Size 23.60 GiB
Current LE 6042
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
[ root@sg-centos-hv1 scratch]#
"/dev/sdb" is 1GB USB memory stick, which has FAT16 file system. It will be used in the following to do some fdisk exercise.
2. Create partitions interactively
2.1 First delete the existing partition which takes all the space.
[ root@sg-centos-hv1 scratch]# fdisk /dev/sdb
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command ' c') and change display units to
sectors (command ' u').
Command (m for help): p
Disk /dev/sdb: 1037 MB, 1037041664 bytes
185 heads, 1 sectors/track, 10948 cylinders
Units = cylinders of 185 * 512 = 94720 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 10584 978943+ 6 FAT16
Command (m for help): d
Selected partition 1
Command (m for help): p
Disk /dev/sdb: 1037 MB, 1037041664 bytes
185 heads, 1 sectors/track, 10948 cylinders
Units = cylinders of 185 * 512 = 94720 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
2.2 Create three primary partitions and one extended partition
Command ( m for help ) : n
Command action
e extended
p primary partition ( 1-4)
p
Partition number ( 1-4) : 1
First cylinder ( 1-10948, default 1) :
Using default value 1
Last cylinder, +cylinders or +size{ K,M,G} ( 1-10948, default 10948) : +100M
Command ( m for help ) : p
Disk /dev/sdb: 1037 MB, 1037041664 bytes
185 heads, 1 sectors/track, 10948 cylinders
Units = cylinders of 185 * 512 = 94720 bytes
Sector size ( logical/physical) : 512 bytes / 512 bytes
I/O size ( minimum/optimal) : 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 1 1108 102489+ 83 Linux
Command ( m for help ) : n
Command action
e extended
p primary partition ( 1-4)
p
Partition number ( 1-4) : 2
First cylinder ( 1109-10948, default 1109) :
Using default value 1109
Last cylinder, +cylinders or +size{ K,M,G} ( 1109-10948, default 10948) : +200M
Command ( m for help ) : n
Command action
e extended
p primary partition ( 1-4)
p
Partition number ( 1-4) : 3
First cylinder ( 3324-10948, default 3324) :
Using default value 3324
Last cylinder, +cylinders or +size{ K,M,G} ( 3324-10948, default 10948) : +100M
Command ( m for help ) : n
Command action
e extended
p primary partition ( 1-4)
e
Selected partition 4
First cylinder ( 4432-10948, default 4432) :
Using default value 4432
Last cylinder, +cylinders or +size{ K,M,G} ( 4432-10948, default 10948) :
Using default value 10948
Command ( m for help ) : p
Disk /dev/sdb: 1037 MB, 1037041664 bytes
185 heads, 1 sectors/track, 10948 cylinders
Units = cylinders of 185 * 512 = 94720 bytes
Sector size ( logical/physical) : 512 bytes / 512 bytes
I/O size ( minimum/optimal) : 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 1 1108 102489+ 83 Linux
/dev/sdb2 1109 3323 204887+ 83 Linux
/dev/sdb3 3324 4431 102490 83 Linux
/dev/sdb4 4432 10948 602822+ 5 Extended
2.3 Create one logical partition inside extended partition
Command ( m for help ) : n
First cylinder ( 4432-10948, default 4432) :
Using default value 4432
Last cylinder, +cylinders or +size{ K,M,G} ( 4432-10948, default 10948) : +100M
Command ( m for help ) : p
Disk /dev/sdb: 1037 MB, 1037041664 bytes
185 heads, 1 sectors/track, 10948 cylinders
Units = cylinders of 185 * 512 = 94720 bytes
Sector size ( logical/physical) : 512 bytes / 512 bytes
I/O size ( minimum/optimal) : 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 1 1108 102489+ 83 Linux
/dev/sdb2 1109 3323 204887+ 83 Linux
/dev/sdb3 3324 4431 102490 83 Linux
/dev/sdb4 4432 10948 602822+ 5 Extended
/dev/sdb5 4432 5539 102489+ 83 Linux
Command ( m for help ) : n
First cylinder ( 5540-10948, default 5540) :
Using default value 5540
Last cylinder, +cylinders or +size{ K,M,G} ( 5540-10948, default 10948) :
Using default value 10948
Command ( m for help ) : p
Disk /dev/sdb: 1037 MB, 1037041664 bytes
185 heads, 1 sectors/track, 10948 cylinders
Units = cylinders of 185 * 512 = 94720 bytes
Sector size ( logical/physical) : 512 bytes / 512 bytes
I/O size ( minimum/optimal) : 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 1 1108 102489+ 83 Linux
/dev/sdb2 1109 3323 204887+ 83 Linux
/dev/sdb3 3324 4431 102490 83 Linux
/dev/sdb4 4432 10948 602822+ 5 Extended
/dev/sdb5 4432 5539 102489+ 83 Linux
/dev/sdb6 5540 10948 500332 83 Linux
2.4 Save the partition tables and recheck the table
Command ( m for help ) : w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[ root@sg-centos-hv1 scratch]# fdisk -l /dev/sdb
Disk /dev/sdb: 1037 MB, 1037041664 bytes
185 heads, 1 sectors/track, 10948 cylinders
Units = cylinders of 185 * 512 = 94720 bytes
Sector size ( logical/physical) : 512 bytes / 512 bytes
I/O size ( minimum/optimal) : 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 1 1108 102489+ 83 Linux
/dev/sdb2 1109 3323 204887+ 83 Linux
/dev/sdb3 3324 4431 102490 83 Linux
/dev/sdb4 4432 10948 602822+ 5 Extended
/dev/sdb5 4432 5539 102489+ 83 Linux
/dev/sdb6 5540 10948 500332 83 Linux
[ root@sg-centos-hv1 scratch]#
3. Create partitions through shell script
Soemtimes it is needed to do disk partition in an automatic way. See below that all above steps can be automated:
[ root@sg-centos-hv1 scratch]# D = "p \n d \n p \n "
[ root@sg-centos-hv1 scratch]# P1 = "n \n p \n 1 \n\n +100M \n "
[ root@sg-centos-hv1 scratch]# P2 = "n \n p \n 2 \n\n +100M \n "
[ root@sg-centos-hv1 scratch]# P3 = "n \n p \n 3 \n\n +100M \n "
[ root@sg-centos-hv1 scratch]# P4 = "n \n e \n\n\n "
[ root@sg-centos-hv1 scratch]# P5 = "n \n\n +100M \n "
[ root@sg-centos-hv1 scratch]# P6 = "n \n\n\n "
[ root@sg-centos-hv1 scratch]# FINAL = "p \n w \n q \n "
[ root@sg-centos-hv1 scratch]# echo -e $D$P1$P2$P3$P4$P5$P6$FINAL | fdisk /dev/sdb
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command ' c') and change display units to
sectors (command ' u').
Command (m for help):
Disk /dev/sdb: 1037 MB, 1037041664 bytes
32 heads, 62 sectors/track, 1020 cylinders
Units = cylinders of 1984 * 512 = 1015808 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 1 104 103137 83 Linux
Command (m for help): Selected partition 1
Command (m for help):
Disk /dev/sdb: 1037 MB, 1037041664 bytes
32 heads, 62 sectors/track, 1020 cylinders
Units = cylinders of 1984 * 512 = 1015808 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (1-1020, default 1): Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1020, default 1020):
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (105-1020, default 105): Using default value 105
Last cylinder, +cylinders or +size{K,M,G} (105-1020, default 1020):
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (209-1020, default 209): Using default value 209
Last cylinder, +cylinders or +size{K,M,G} (209-1020, default 1020):
Command (m for help): Command action
e extended
p primary partition (1-4)
Selected partition 4
First cylinder (313-1020, default 313): Using default value 313
Last cylinder, +cylinders or +size{K,M,G} (313-1020, default 1020): Using default value 1020
Command (m for help): First cylinder (313-1020, default 313): Using default value 313
Last cylinder, +cylinders or +size{K,M,G} (313-1020, default 1020):
Command (m for help): First cylinder (417-1020, default 417): Using default value 417
Last cylinder, +cylinders or +size{K,M,G} (417-1020, default 1020): Using default value 1020
Command (m for help):
Disk /dev/sdb: 1037 MB, 1037041664 bytes
32 heads, 62 sectors/track, 1020 cylinders
Units = cylinders of 1984 * 512 = 1015808 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 1 104 103137 83 Linux
/dev/sdb2 105 208 103168 83 Linux
/dev/sdb3 209 312 103168 83 Linux
/dev/sdb4 313 1020 702336 5 Extended
/dev/sdb5 313 416 103137 83 Linux
/dev/sdb6 417 1020 599137 83 Linux
Command (m for help): The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@sg-centos-hv1 scratch]#
4. Make file system on the partition
Now the disk /dev/sdb has been partitioned nicely. To use the parition, first we need make a file system on the partition, let’s pick partition /dev/sdb2 t be ext2 file system; /dev/sdb3 to be ext3 file system, and /dev/sdb5 to be ext4 file system.
[ root@sg-centos-hv1 scratch]# mkfs.ext2 /dev/sdb2
mke2fs 1.41.12 ( 17-May-2010)
Filesystem label =
OS type : Linux
Block size = 1024 ( log = 0)
Fragment size = 1024 ( log = 0)
Stride = 0 blocks, Stripe width = 0 blocks
25792 inodes, 103168 blocks
5158 blocks ( 5.00%) reserved for the super user
First data block = 1
Maximum filesystem blocks = 67371008
13 block groups
8192 blocks per group, 8192 fragments per group
1984 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[ root@sg-centos-hv1 scratch]# mkfs.ext3 /dev/sdb3
mke2fs 1.41.12 ( 17-May-2010)
Filesystem label =
OS type : Linux
Block size = 1024 ( log = 0)
Fragment size = 1024 ( log = 0)
Stride = 0 blocks, Stripe width = 0 blocks
25792 inodes, 103168 blocks
5158 blocks ( 5.00%) reserved for the super user
First data block = 1
Maximum filesystem blocks = 67371008
13 block groups
8192 blocks per group, 8192 fragments per group
1984 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729
Writing inode tables: done
Creating journal ( 4096 blocks) : done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[ root@sg-centos-hv1 scratch]# mkfs.ext4 /dev/sdb5
mke2fs 1.41.12 ( 17-May-2010)
Filesystem label =
OS type : Linux
Block size = 1024 ( log = 0)
Fragment size = 1024 ( log = 0)
Stride = 0 blocks, Stripe width = 0 blocks
25792 inodes, 103136 blocks
5156 blocks ( 5.00%) reserved for the super user
First data block = 1
Maximum filesystem blocks = 67371008
13 block groups
8192 blocks per group, 8192 fragments per group
1984 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729
Writing inode tables: done
Creating journal ( 4096 blocks) : done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[ root@sg-centos-hv1 scratch]# mkfs.ext4 /dev/sdb4
mke2fs 1.41.12 ( 17-May-2010)
mkfs.ext4: inode_size ( 128) * inodes_count ( 0) too big for a
filesystem with 0 blocks, specify higher inode_ratio ( -i )
or lower inode count ( -N ) .
[ root@sg-centos-hv1 scratch]#
Remeber here that /dev/sdb4 is an extended partition, It can not be formated to certain file system.
[ root@sg-centos-hv1 scratch]# mkfs.ext4 /dev/sdb4
mke2fs 1.41.12 ( 17-May-2010)
mkfs.ext4: inode_size ( 128) * inodes_count ( 0) too big for a
filesystem with 0 blocks, specify higher inode_ratio ( -i )
or lower inode count ( -N ) .
[ root@sg-centos-hv1 scratch]# mkfs.ext2 /dev/sdb4
mke2fs 1.41.12 ( 17-May-2010)
mkfs.ext2: inode_size ( 128) * inodes_count ( 0) too big for a
filesystem with 0 blocks, specify higher inode_ratio ( -i )
or lower inode count ( -N ) .
[ root@sg-centos-hv1 scratch]#
5. Mount the partition for OS to use
Now the partitions /dev/sdb2 , /dev/sdb3, /dev/sdb5 are formatted with ext2, ext3, ext4 file system, they can be mounted and used.
[ root@sg-centos-hv1 scratch]# mkdir /mnt/usb2 /mnt/usb3 /mnt/usb5
[ root@sg-centos-hv1 scratch]# mount /dev/sdb2 /mnt/usb2
[ root@sg-centos-hv1 scratch]# mount /dev/sdb3 /mnt/usb3
[ root@sg-centos-hv1 scratch]# mount /dev/sdb5 /mnt/usb5
[ root@sg-centos-hv1 scratch]# touch /mnt/ubs2/readme2.txt
[ root@sg-centos-hv1 scratch]# touch /mnt/usb2/readme2.txt
[ root@sg-centos-hv1 scratch]# touch /mnt/usb3/readme3.txt
[ root@sg-centos-hv1 scratch]# touch /mnt/usb5/readme5.txt
[ root@sg-centos-hv1 scratch]# ls -l /mnt/usb2/readme2.txt
-rw-r--r-- . 1 root root 0 Aug 8 16:13 /mnt/usb2/readme2.txt
[ root@sg-centos-hv1 scratch]# ls -l /mnt/usb3/readme3.txt
-rw-r--r-- . 1 root root 0 Aug 8 16:13 /mnt/usb3/readme3.txt
[ root@sg-centos-hv1 scratch]# ls -l /mnt/usb5/readme5.txt
-rw-r--r-- . 1 root root 0 Aug 8 16:13 /mnt/usb5/readme5.txt
[ root@sg-centos-hv1 scratch]# umount /mnt/usb[235]
[ root@sg-centos-hv1 scratch]#