注意点:こちらで説明する方法は必ずしも成功するということではないので、at your own riskで試してください。

# mount
/dev/sda1 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sdb on /mnt type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sdf1 on /mnt/data1 type ext3 (rw)
# tune2fs -O ^has_journal /dev/sdf1
tune2fs 1.39 (29-May-2006)

# e2fsck -f /dev/sdf1
e2fsck 1.39 (29-May-2006)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdf1: 112549/655360 files (0.4% non-contiguous), 748397/2621440 blocks

# resize2fs /dev/sdf1 20G
resize2fs 1.39 (29-May-2006)
Resizing the filesystem on /dev/sdf1 to 5242880 (4k) blocks.
The filesystem on /dev/sdf1 is now 5242880 blocks long.

# tune2fs -j /dev/sdf1
tune2fs 1.39 (29-May-2006)
Creating journal inode: done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

# mount /dev/sdf1 /mnt/data1
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             9.9G  2.9G  6.6G  31% /
/dev/sdb              414G  199M  393G   1% /mnt
none                  3.8G     0  3.8G   0% /dev/shm
/dev/sdf1              20G  2.8G   16G  15% /mnt/data1

参考: http://www.adamsinfo.com/shrinking-resizing-ext3-partitions/

About tkobayashi

#aws #cloud #programming #web #ninja #gym #movies #scuba #twoandahalfmen http://www.koba206.com
This entry was posted in amazon web services and tagged , . Bookmark the permalink.

Leave a Reply